From 0fb8fdb9096371b2ed43cbddb151b3989eb80123 Mon Sep 17 00:00:00 2001 From: Dmytro Kozhevin Date: Mon, 8 Jan 2024 20:13:36 -0500 Subject: [PATCH] Bump Soroban env to v20.1.0 --- Cargo.lock | 36 +++++++++---------- src/rust/Cargo.toml | 12 +++---- src/rust/src/host-dep-tree-curr.txt | 8 ++--- .../test/InvokeHostFunctionTests.cpp | 20 +++++------ 4 files changed, 37 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4db7d1bf5b..75e8799897 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -919,8 +919,8 @@ dependencies = [ [[package]] name = "soroban-builtin-sdk-macros" -version = "20.0.1" -source = "git+https://github.com/stellar/rs-soroban-env?rev=2569460880ee16db43b1cd4efb39bc4e5dbb7376#2569460880ee16db43b1cd4efb39bc4e5dbb7376" +version = "20.1.0" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c1b238b65bfd13666be4ac14e0e390c31b549caf#c1b238b65bfd13666be4ac14e0e390c31b549caf" dependencies = [ "itertools", "proc-macro2", @@ -945,14 +945,14 @@ dependencies = [ [[package]] name = "soroban-env-common" -version = "20.0.1" -source = "git+https://github.com/stellar/rs-soroban-env?rev=2569460880ee16db43b1cd4efb39bc4e5dbb7376#2569460880ee16db43b1cd4efb39bc4e5dbb7376" +version = "20.1.0" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c1b238b65bfd13666be4ac14e0e390c31b549caf#c1b238b65bfd13666be4ac14e0e390c31b549caf" dependencies = [ "crate-git-revision", "ethnum", "num-derive", "num-traits", - "soroban-env-macros 20.0.1", + "soroban-env-macros 20.1.0", "soroban-wasmi 0.31.1-soroban.20.0.0", "static_assertions", "stellar-xdr 20.0.2", @@ -986,8 +986,8 @@ dependencies = [ [[package]] name = "soroban-env-host" -version = "20.0.1" -source = "git+https://github.com/stellar/rs-soroban-env?rev=2569460880ee16db43b1cd4efb39bc4e5dbb7376#2569460880ee16db43b1cd4efb39bc4e5dbb7376" +version = "20.1.0" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c1b238b65bfd13666be4ac14e0e390c31b549caf#c1b238b65bfd13666be4ac14e0e390c31b549caf" dependencies = [ "curve25519-dalek", "ed25519-dalek", @@ -1002,8 +1002,8 @@ dependencies = [ "rand_chacha", "sha2", "sha3", - "soroban-builtin-sdk-macros 20.0.1", - "soroban-env-common 20.0.1", + "soroban-builtin-sdk-macros 20.1.0", + "soroban-env-common 20.1.0", "soroban-wasmi 0.31.1-soroban.20.0.0", "static_assertions", "stellar-strkey", @@ -1026,8 +1026,8 @@ dependencies = [ [[package]] name = "soroban-env-macros" -version = "20.0.1" -source = "git+https://github.com/stellar/rs-soroban-env?rev=2569460880ee16db43b1cd4efb39bc4e5dbb7376#2569460880ee16db43b1cd4efb39bc4e5dbb7376" +version = "20.1.0" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c1b238b65bfd13666be4ac14e0e390c31b549caf#c1b238b65bfd13666be4ac14e0e390c31b549caf" dependencies = [ "itertools", "proc-macro2", @@ -1040,20 +1040,20 @@ dependencies = [ [[package]] name = "soroban-synth-wasm" -version = "20.0.1" -source = "git+https://github.com/stellar/rs-soroban-env?rev=2569460880ee16db43b1cd4efb39bc4e5dbb7376#2569460880ee16db43b1cd4efb39bc4e5dbb7376" +version = "20.1.0" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c1b238b65bfd13666be4ac14e0e390c31b549caf#c1b238b65bfd13666be4ac14e0e390c31b549caf" dependencies = [ "arbitrary", - "soroban-env-common 20.0.1", - "soroban-env-macros 20.0.1", + "soroban-env-common 20.1.0", + "soroban-env-macros 20.1.0", "wasm-encoder", "wasmparser", ] [[package]] name = "soroban-test-wasms" -version = "20.0.1" -source = "git+https://github.com/stellar/rs-soroban-env?rev=2569460880ee16db43b1cd4efb39bc4e5dbb7376#2569460880ee16db43b1cd4efb39bc4e5dbb7376" +version = "20.1.0" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c1b238b65bfd13666be4ac14e0e390c31b549caf#c1b238b65bfd13666be4ac14e0e390c31b549caf" [[package]] name = "soroban-wasmi" @@ -1113,7 +1113,7 @@ dependencies = [ "rand", "rustc-simple-version", "soroban-env-host 20.0.0-rc2", - "soroban-env-host 20.0.1", + "soroban-env-host 20.1.0", "soroban-synth-wasm", "soroban-test-wasms", "toml", diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index 1e2c323c4a..a5b8e4b919 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -32,10 +32,10 @@ toml = "=0.7.8" # N. [dependencies.soroban-env-host-curr] -version = "=20.0.1" +version = "=20.1.0" git = "https://github.com/stellar/rs-soroban-env" package = "soroban-env-host" -rev = "2569460880ee16db43b1cd4efb39bc4e5dbb7376" +rev = "c1b238b65bfd13666be4ac14e0e390c31b549caf" # 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 @@ -62,14 +62,14 @@ package = "soroban-env-host" rev = "bed170cde09a53c85ae2e02f9278ef0dfa4e0900" [dependencies.soroban-test-wasms] -version = "=20.0.1" +version = "=20.1.0" git = "https://github.com/stellar/rs-soroban-env" -rev = "2569460880ee16db43b1cd4efb39bc4e5dbb7376" +rev = "c1b238b65bfd13666be4ac14e0e390c31b549caf" [dependencies.soroban-synth-wasm] -version = "=20.0.1" +version = "=20.1.0" git = "https://github.com/stellar/rs-soroban-env" -rev = "2569460880ee16db43b1cd4efb39bc4e5dbb7376" +rev = "c1b238b65bfd13666be4ac14e0e390c31b549caf" [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 434e8c7988..35f71855a0 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 20.0.1 git+https://github.com/stellar/rs-soroban-env?rev=2569460880ee16db43b1cd4efb39bc4e5dbb7376#2569460880ee16db43b1cd4efb39bc4e5dbb7376 +soroban-env-host 20.1.0 git+https://github.com/stellar/rs-soroban-env?rev=c1b238b65bfd13666be4ac14e0e390c31b549caf#c1b238b65bfd13666be4ac14e0e390c31b549caf ├── tracy-client 0.15.2 checksum:434ecabbda9f67eeea1eab44d52f4a20538afa3e2c2770f2efc161142b25b608 │ ├── tracy-client-sys 0.20.0 checksum:e8cf8aeb20e40d13be65a0b134f8d82d360e72b2793a11de8867d7fbc0f9d6f6 │ │ └── cc 1.0.79 checksum:50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f @@ -97,7 +97,7 @@ soroban-env-host 20.0.1 git+https://github.com/stellar/rs-soroban-env?rev=256946 │ ├── wasmi_arena 0.4.0 git+https://github.com/stellar/wasmi?rev=ab29800224d85ee64d4ac127bac84cdbb0276721#ab29800224d85ee64d4ac127bac84cdbb0276721 │ ├── spin 0.9.8 checksum:6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67 │ └── smallvec 1.10.0 checksum:a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0 -├── soroban-env-common 20.0.1 git+https://github.com/stellar/rs-soroban-env?rev=2569460880ee16db43b1cd4efb39bc4e5dbb7376#2569460880ee16db43b1cd4efb39bc4e5dbb7376 +├── soroban-env-common 20.1.0 git+https://github.com/stellar/rs-soroban-env?rev=c1b238b65bfd13666be4ac14e0e390c31b549caf#c1b238b65bfd13666be4ac14e0e390c31b549caf │ ├── tracy-client 0.15.2 checksum:434ecabbda9f67eeea1eab44d52f4a20538afa3e2c2770f2efc161142b25b608 │ ├── stellar-xdr 20.0.2 checksum:e9f00a85bd9b1617d4cb7e741733889c9940e6bdeca360db81752b0ef04fe3a5 │ │ ├── stellar-strkey 0.0.8 checksum:12d2bf45e114117ea91d820a846fd1afbe3ba7d717988fee094ce8227a3bf8bd @@ -107,7 +107,7 @@ soroban-env-host 20.0.1 git+https://github.com/stellar/rs-soroban-env?rev=256946 │ │ └── base64 0.13.1 checksum:9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8 │ ├── static_assertions 1.1.0 checksum:a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f │ ├── soroban-wasmi 0.31.1-soroban.20.0.0 git+https://github.com/stellar/wasmi?rev=ab29800224d85ee64d4ac127bac84cdbb0276721#ab29800224d85ee64d4ac127bac84cdbb0276721 -│ ├── soroban-env-macros 20.0.1 git+https://github.com/stellar/rs-soroban-env?rev=2569460880ee16db43b1cd4efb39bc4e5dbb7376#2569460880ee16db43b1cd4efb39bc4e5dbb7376 +│ ├── soroban-env-macros 20.1.0 git+https://github.com/stellar/rs-soroban-env?rev=c1b238b65bfd13666be4ac14e0e390c31b549caf#c1b238b65bfd13666be4ac14e0e390c31b549caf │ │ ├── syn 2.0.39 checksum:23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a │ │ ├── stellar-xdr 20.0.2 checksum:e9f00a85bd9b1617d4cb7e741733889c9940e6bdeca360db81752b0ef04fe3a5 │ │ ├── serde_json 1.0.108 checksum:3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b @@ -123,7 +123,7 @@ soroban-env-host 20.0.1 git+https://github.com/stellar/rs-soroban-env?rev=256946 │ │ └── 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 20.0.1 git+https://github.com/stellar/rs-soroban-env?rev=2569460880ee16db43b1cd4efb39bc4e5dbb7376#2569460880ee16db43b1cd4efb39bc4e5dbb7376 +├── soroban-builtin-sdk-macros 20.1.0 git+https://github.com/stellar/rs-soroban-env?rev=c1b238b65bfd13666be4ac14e0e390c31b549caf#c1b238b65bfd13666be4ac14e0e390c31b549caf │ ├── syn 2.0.39 checksum:23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a │ ├── quote 1.0.33 checksum:5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae │ ├── proc-macro2 1.0.69 checksum:134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da diff --git a/src/transactions/test/InvokeHostFunctionTests.cpp b/src/transactions/test/InvokeHostFunctionTests.cpp index 0614db9458..2f703b5520 100644 --- a/src/transactions/test/InvokeHostFunctionTests.cpp +++ b/src/transactions/test/InvokeHostFunctionTests.cpp @@ -579,11 +579,9 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") SECTION("malformed parameters") { SCVal badSCVal(SCV_LEDGER_KEY_NONCE); - auto invocation = addContract.prepareInvocation( - fnName, {sc7, badSCVal}, invocationSpec); - REQUIRE(!invocation.invoke()); - // This is an internal error currently. - REQUIRE(invocation.getResultCode() == std::nullopt); + REQUIRE(failedInvoke(addContract, fnName, {sc7, badSCVal}, + invocationSpec) == + INVOKE_HOST_FUNCTION_TRAPPED); } } @@ -3188,8 +3186,8 @@ TEST_CASE("Soroban classic account authentication", "[soroban]") SECTION("uninitialized vector signature") { baseCredentials.address().signature = SCVal(SCV_VEC); - // This fails at tx level due to internal error in env. - REQUIRE(singleInvocation(signer, baseCredentials) == std::nullopt); + REQUIRE(singleInvocation(signer, baseCredentials) == + InvokeHostFunctionResultCode::INVOKE_HOST_FUNCTION_TRAPPED); } SECTION("empty vector signature") { @@ -3204,8 +3202,8 @@ TEST_CASE("Soroban classic account authentication", "[soroban]") SCVal signature(SCV_VEC); signature.vec().activate().push_back(SCVal(SCV_MAP)); baseCredentials.address().signature = signature; - // This fails at tx level due to internal error in env. - REQUIRE(singleInvocation(signer, baseCredentials) == std::nullopt); + REQUIRE(singleInvocation(signer, baseCredentials) == + InvokeHostFunctionResultCode::INVOKE_HOST_FUNCTION_TRAPPED); } SECTION("empty map") { @@ -3484,8 +3482,8 @@ TEST_CASE("Soroban custom account authentication", "[soroban]") SECTION("uninitialized vector signature") { baseCredentials.address().signature = SCVal(SCV_VEC); - // This fails at tx level due to internal error in env. - REQUIRE(singleInvocation(signer, baseCredentials) == std::nullopt); + REQUIRE(singleInvocation(signer, baseCredentials) == + InvokeHostFunctionResultCode::INVOKE_HOST_FUNCTION_TRAPPED); } SECTION("empty bytes signature") {