diff --git a/Cargo.lock b/Cargo.lock index e8158ac87e..9b20ba2e8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -940,8 +940,8 @@ dependencies = [ [[package]] name = "soroban-builtin-sdk-macros" -version = "21.0.0" -source = "git+https://github.com/stellar/rs-soroban-env?rev=cd534ed18dc44368b26e0c5089756cd1bcde0bc1#cd534ed18dc44368b26e0c5089756cd1bcde0bc1" +version = "21.0.2" +source = "git+https://github.com/stellar/rs-soroban-env?rev=6ddc1d05380646f88447c4e78390784df2269737#6ddc1d05380646f88447c4e78390784df2269737" dependencies = [ "itertools", "proc-macro2", @@ -966,17 +966,17 @@ dependencies = [ [[package]] name = "soroban-env-common" -version = "21.0.0" -source = "git+https://github.com/stellar/rs-soroban-env?rev=cd534ed18dc44368b26e0c5089756cd1bcde0bc1#cd534ed18dc44368b26e0c5089756cd1bcde0bc1" +version = "21.0.2" +source = "git+https://github.com/stellar/rs-soroban-env?rev=6ddc1d05380646f88447c4e78390784df2269737#6ddc1d05380646f88447c4e78390784df2269737" dependencies = [ "crate-git-revision", "ethnum", "num-derive", "num-traits", - "soroban-env-macros 21.0.0", + "soroban-env-macros 21.0.2", "soroban-wasmi", "static_assertions", - "stellar-xdr 21.0.0", + "stellar-xdr 21.0.1", "tracy-client", "wasmparser", ] @@ -1008,8 +1008,8 @@ dependencies = [ [[package]] name = "soroban-env-host" -version = "21.0.0" -source = "git+https://github.com/stellar/rs-soroban-env?rev=cd534ed18dc44368b26e0c5089756cd1bcde0bc1#cd534ed18dc44368b26e0c5089756cd1bcde0bc1" +version = "21.0.2" +source = "git+https://github.com/stellar/rs-soroban-env?rev=6ddc1d05380646f88447c4e78390784df2269737#6ddc1d05380646f88447c4e78390784df2269737" dependencies = [ "curve25519-dalek", "ecdsa", @@ -1029,8 +1029,8 @@ dependencies = [ "sec1", "sha2", "sha3", - "soroban-builtin-sdk-macros 21.0.0", - "soroban-env-common 21.0.0", + "soroban-builtin-sdk-macros 21.0.2", + "soroban-env-common 21.0.2", "soroban-wasmi", "static_assertions", "stellar-strkey", @@ -1054,35 +1054,35 @@ dependencies = [ [[package]] name = "soroban-env-macros" -version = "21.0.0" -source = "git+https://github.com/stellar/rs-soroban-env?rev=cd534ed18dc44368b26e0c5089756cd1bcde0bc1#cd534ed18dc44368b26e0c5089756cd1bcde0bc1" +version = "21.0.2" +source = "git+https://github.com/stellar/rs-soroban-env?rev=6ddc1d05380646f88447c4e78390784df2269737#6ddc1d05380646f88447c4e78390784df2269737" dependencies = [ "itertools", "proc-macro2", "quote", "serde", "serde_json", - "stellar-xdr 21.0.0", + "stellar-xdr 21.0.1", "syn", ] [[package]] name = "soroban-synth-wasm" -version = "21.0.0" -source = "git+https://github.com/stellar/rs-soroban-env?rev=cd534ed18dc44368b26e0c5089756cd1bcde0bc1#cd534ed18dc44368b26e0c5089756cd1bcde0bc1" +version = "21.0.2" +source = "git+https://github.com/stellar/rs-soroban-env?rev=6ddc1d05380646f88447c4e78390784df2269737#6ddc1d05380646f88447c4e78390784df2269737" dependencies = [ "arbitrary", - "soroban-env-common 21.0.0", - "soroban-env-macros 21.0.0", - "stellar-xdr 21.0.0", + "soroban-env-common 21.0.2", + "soroban-env-macros 21.0.2", + "stellar-xdr 21.0.1", "wasm-encoder", "wasmparser", ] [[package]] name = "soroban-test-wasms" -version = "21.0.0" -source = "git+https://github.com/stellar/rs-soroban-env?rev=cd534ed18dc44368b26e0c5089756cd1bcde0bc1#cd534ed18dc44368b26e0c5089756cd1bcde0bc1" +version = "21.0.2" +source = "git+https://github.com/stellar/rs-soroban-env?rev=6ddc1d05380646f88447c4e78390784df2269737#6ddc1d05380646f88447c4e78390784df2269737" [[package]] name = "soroban-wasmi" @@ -1131,7 +1131,7 @@ dependencies = [ "rand", "rustc-simple-version", "soroban-env-host 20.3.0", - "soroban-env-host 21.0.0", + "soroban-env-host 21.0.2", "soroban-synth-wasm", "soroban-test-wasms", "toml", @@ -1163,9 +1163,9 @@ dependencies = [ [[package]] name = "stellar-xdr" -version = "21.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193cef4375f498306b3b39d2182b8e1192904fc90dd2eec8b3f3007b87c427c7" +checksum = "88e716110d5e050e528820217f84d4667e166ced841ba48d074152d4ad4ab884" dependencies = [ "base64", "crate-git-revision", diff --git a/README.md b/README.md index 87d28060ed..37eb237678 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/protocol-curr/xdr b/src/protocol-curr/xdr index 2ba4049554..1a04392432 160000 --- a/src/protocol-curr/xdr +++ b/src/protocol-curr/xdr @@ -1 +1 @@ -Subproject commit 2ba4049554bb0564950e6d9213e01a60fc190f54 +Subproject commit 1a04392432dacc0092caaeae22a600ea1af3c6a5 diff --git a/src/protocol-next/xdr b/src/protocol-next/xdr index e93d612659..4bd4827b33 160000 --- a/src/protocol-next/xdr +++ b/src/protocol-next/xdr @@ -1 +1 @@ -Subproject commit e93d612659437d8e89631a382e4888b52c130bfa +Subproject commit 4bd4827b3361f266d295cbc83c5d7f7396d782d9 diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index 98be3d3103..ce7fad5a28 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -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 @@ -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" diff --git a/src/rust/src/host-dep-tree-curr.txt b/src/rust/src/host-dep-tree-curr.txt index 7b10ab7be6..41bcb2df92 100644 --- a/src/rust/src/host-dep-tree-curr.txt +++ b/src/rust/src/host-dep-tree-curr.txt @@ -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 @@ -103,10 +103,10 @@ 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 @@ -114,9 +114,9 @@ soroban-env-host 21.0.0 git+https://github.com/stellar/rs-soroban-env?rev=cd534e │ │ └── 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 @@ -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 diff --git a/src/transactions/InvokeHostFunctionOpFrame.cpp b/src/transactions/InvokeHostFunctionOpFrame.cpp index 7e796b4251..38c7a56cbd 100644 --- a/src/transactions/InvokeHostFunctionOpFrame.cpp +++ b/src/transactions/InvokeHostFunctionOpFrame.cpp @@ -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::enum_values().size(); - cpu.resize(numCostTypes); - mem.resize(numCostTypes); - } -#endif - info.cpu_cost_params = toCxxBuf(cpu); info.mem_cost_params = toCxxBuf(mem);