Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update env to 20.0.2 #4301

Merged
merged 4 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Stellar-core is a replicated state machine that maintains a local copy of a cryptographic ledger and processes transactions against it, in consensus with a set of peers.
It implements the [Stellar Consensus Protocol](https://github.com/stellar/stellar-core/blob/master/src/scp/readme.md), a _federated_ consensus protocol.
It is written in C++14 and runs on Linux, OSX and Windows.
It is written in C++17 and runs on Linux, OSX and Windows.
Learn more by reading the [overview document](https://github.com/stellar/stellar-core/blob/master/docs/readme.md).

# Documentation
Expand Down
2 changes: 1 addition & 1 deletion src/protocol-curr/xdr
Submodule xdr updated 1 files
+0 −8 Stellar-contract-spec.x
2 changes: 1 addition & 1 deletion src/protocol-next/xdr
Submodule xdr updated 1 files
+0 −8 Stellar-contract-spec.x
12 changes: 6 additions & 6 deletions src/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ itertools = "=0.11.0"
# N.

[dependencies.soroban-env-host-curr]
version = "=21.0.0"
version = "=21.0.2"
git = "https://github.com/stellar/rs-soroban-env"
package = "soroban-env-host"
rev = "cd534ed18dc44368b26e0c5089756cd1bcde0bc1"
rev = "6ddc1d05380646f88447c4e78390784df2269737"

# This copy of the soroban host is _optional_ and only enabled during protocol
# transitions. When transitioning from protocol N to N+1, the `curr` copy
Expand All @@ -63,14 +63,14 @@ package = "soroban-env-host"
rev = "93120b6b32cd910fcc224cbf6aec1333f771a8bc"

[dependencies.soroban-test-wasms]
version = "=21.0.0"
version = "=21.0.2"
git = "https://github.com/stellar/rs-soroban-env"
rev = "cd534ed18dc44368b26e0c5089756cd1bcde0bc1"
rev = "6ddc1d05380646f88447c4e78390784df2269737"

[dependencies.soroban-synth-wasm]
version = "=21.0.0"
version = "=21.0.2"
git = "https://github.com/stellar/rs-soroban-env"
rev = "cd534ed18dc44368b26e0c5089756cd1bcde0bc1"
rev = "6ddc1d05380646f88447c4e78390784df2269737"

[dependencies.cargo-lock]
version = "=9.0.0"
Expand Down
12 changes: 6 additions & 6 deletions src/rust/src/host-dep-tree-curr.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
soroban-env-host 21.0.0 git+https://github.com/stellar/rs-soroban-env?rev=cd534ed18dc44368b26e0c5089756cd1bcde0bc1#cd534ed18dc44368b26e0c5089756cd1bcde0bc1
soroban-env-host 21.0.2 git+https://github.com/stellar/rs-soroban-env?rev=6ddc1d05380646f88447c4e78390784df2269737#6ddc1d05380646f88447c4e78390784df2269737
├── wasmparser 0.116.1 checksum:a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50
│ ├── semver 1.0.17 checksum:bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed
│ │ └── serde 1.0.192 checksum:bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001
Expand Down Expand Up @@ -103,20 +103,20 @@ soroban-env-host 21.0.0 git+https://github.com/stellar/rs-soroban-env?rev=cd534e
│ ├── wasmi_arena 0.4.0 git+https://github.com/stellar/wasmi?rev=0ed3f3dee30dc41ebe21972399e0a73a41944aa0#0ed3f3dee30dc41ebe21972399e0a73a41944aa0
│ ├── spin 0.9.8 checksum:6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67
│ └── smallvec 1.10.0 checksum:a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0
├── soroban-env-common 21.0.0 git+https://github.com/stellar/rs-soroban-env?rev=cd534ed18dc44368b26e0c5089756cd1bcde0bc1#cd534ed18dc44368b26e0c5089756cd1bcde0bc1
├── soroban-env-common 21.0.2 git+https://github.com/stellar/rs-soroban-env?rev=6ddc1d05380646f88447c4e78390784df2269737#6ddc1d05380646f88447c4e78390784df2269737
│ ├── wasmparser 0.116.1 checksum:a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50
│ ├── tracy-client 0.15.2 checksum:434ecabbda9f67eeea1eab44d52f4a20538afa3e2c2770f2efc161142b25b608
│ ├── stellar-xdr 21.0.0 checksum:193cef4375f498306b3b39d2182b8e1192904fc90dd2eec8b3f3007b87c427c7
│ ├── stellar-xdr 21.0.1 checksum:88e716110d5e050e528820217f84d4667e166ced841ba48d074152d4ad4ab884
│ │ ├── stellar-strkey 0.0.8 checksum:12d2bf45e114117ea91d820a846fd1afbe3ba7d717988fee094ce8227a3bf8bd
│ │ ├── hex 0.4.3 checksum:7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70
│ │ ├── escape-bytes 0.1.1 checksum:2bfcf67fea2815c2fc3b90873fae90957be12ff417335dfadc7f52927feb03b2
│ │ ├── crate-git-revision 0.0.6 checksum:c521bf1f43d31ed2f73441775ed31935d77901cb3451e44b38a1c1612fcbaf98
│ │ └── base64 0.13.1 checksum:9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8
│ ├── static_assertions 1.1.0 checksum:a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f
│ ├── soroban-wasmi 0.31.1-soroban.20.0.1 git+https://github.com/stellar/wasmi?rev=0ed3f3dee30dc41ebe21972399e0a73a41944aa0#0ed3f3dee30dc41ebe21972399e0a73a41944aa0
│ ├── soroban-env-macros 21.0.0 git+https://github.com/stellar/rs-soroban-env?rev=cd534ed18dc44368b26e0c5089756cd1bcde0bc1#cd534ed18dc44368b26e0c5089756cd1bcde0bc1
│ ├── soroban-env-macros 21.0.2 git+https://github.com/stellar/rs-soroban-env?rev=6ddc1d05380646f88447c4e78390784df2269737#6ddc1d05380646f88447c4e78390784df2269737
│ │ ├── syn 2.0.39 checksum:23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a
│ │ ├── stellar-xdr 21.0.0 checksum:193cef4375f498306b3b39d2182b8e1192904fc90dd2eec8b3f3007b87c427c7
│ │ ├── stellar-xdr 21.0.1 checksum:88e716110d5e050e528820217f84d4667e166ced841ba48d074152d4ad4ab884
│ │ ├── serde_json 1.0.108 checksum:3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b
│ │ ├── serde 1.0.192 checksum:bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001
│ │ ├── quote 1.0.33 checksum:5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae
Expand All @@ -130,7 +130,7 @@ soroban-env-host 21.0.0 git+https://github.com/stellar/rs-soroban-env?rev=cd534e
│ │ └── proc-macro2 1.0.69 checksum:134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da
│ ├── ethnum 1.5.0 checksum:b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c
│ └── crate-git-revision 0.0.6 checksum:c521bf1f43d31ed2f73441775ed31935d77901cb3451e44b38a1c1612fcbaf98
├── soroban-builtin-sdk-macros 21.0.0 git+https://github.com/stellar/rs-soroban-env?rev=cd534ed18dc44368b26e0c5089756cd1bcde0bc1#cd534ed18dc44368b26e0c5089756cd1bcde0bc1
├── soroban-builtin-sdk-macros 21.0.2 git+https://github.com/stellar/rs-soroban-env?rev=6ddc1d05380646f88447c4e78390784df2269737#6ddc1d05380646f88447c4e78390784df2269737
│ ├── syn 2.0.39 checksum:23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a
│ ├── quote 1.0.33 checksum:5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae
│ ├── proc-macro2 1.0.69 checksum:134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da
Expand Down
16 changes: 0 additions & 16 deletions src/transactions/InvokeHostFunctionOpFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,6 @@ getLedgerInfo(AbstractLedgerTxn& ltx, Application& app,
auto cpu = sorobanConfig.cpuCostParams();
auto mem = sorobanConfig.memCostParams();

// The host expects this vector to be the size of the # of cost types in the
// xdr, but the v20 ledgers only have a subset due to the xdr for v21, so we
// need to resize them before passing them to a host that supports v21. This is
// not true for the prev build though because that one will be on the old xdr,
// which is why we compile this resizing out here if we're NOT using prev.
#ifndef ENABLE_PROTOCOL_UPGRADE_VIA_SOROBAN_ENV_HOST_PREV
if (protocolVersionEquals(ltx.loadHeader().current().ledgerVersion,
ProtocolVersion::V_20))
{
auto numCostTypes =
xdr::xdr_traits<ContractCostType>::enum_values().size();
cpu.resize(numCostTypes);
mem.resize(numCostTypes);
}
#endif

info.cpu_cost_params = toCxxBuf(cpu);
info.mem_cost_params = toCxxBuf(mem);

Expand Down
Loading