From 1306a47e94aa56eb527dff17ecce9db25a008d90 Mon Sep 17 00:00:00 2001 From: Dmytro Kozhevin Date: Tue, 20 Jun 2023 14:20:02 -0400 Subject: [PATCH 1/2] Bump Soroban env & XDR. This includes the changes to use address in contract data ledger keys and the storage type changes. --- Cargo.lock | 595 ++++++++++++++---- src/bucket/Bucket.cpp | 3 +- src/bucket/LedgerCmp.h | 4 +- src/bucket/test/BucketIndexTests.cpp | 7 +- src/herder/Upgrades.cpp | 3 +- src/herder/test/UpgradesTests.cpp | 7 +- src/invariant/ConservationOfLumens.cpp | 3 +- ...ucketListIsConsistentWithDatabaseTests.cpp | 2 +- src/ledger/LedgerHashUtils.h | 15 +- src/ledger/LedgerTxnContractDataSQL.cpp | 8 +- src/ledger/test/LedgerTxnTests.cpp | 4 +- src/protocol-next/xdr | 2 +- src/rust/Cargo.toml | 6 +- src/rust/src/contract.rs | 4 +- src/rust/src/host-dep-tree-curr.txt | 216 +++++-- src/rust/src/lib.rs | 2 +- src/test/FuzzerImpl.cpp | 8 +- .../InvokeHostFunctionOpFrame.cpp | 2 +- src/transactions/InvokeHostFunctionOpFrame.h | 2 +- src/transactions/TransactionFrame.cpp | 2 +- src/transactions/TransactionUtils.cpp | 8 +- src/transactions/TransactionUtils.h | 7 +- .../test/InvokeHostFunctionTests.cpp | 404 +++++------- src/transactions/test/TxEnvelopeTests.cpp | 12 +- src/util/types.cpp | 2 +- 25 files changed, 836 insertions(+), 492 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4ef682da62..b556a47ccb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,12 +38,30 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base32" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" + [[package]] name = "base64" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "block-buffer" version = "0.9.0" @@ -53,6 +71,21 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + [[package]] name = "byteorder" version = "1.4.3" @@ -83,11 +116,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "const-oid" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" + [[package]] name = "cpufeatures" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" +checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" dependencies = [ "libc", ] @@ -103,24 +142,46 @@ dependencies = [ "serde_json", ] +[[package]] +name = "crypto-bigint" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "curve25519-dalek" -version = "3.2.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", - "digest", - "rand_core", + "digest 0.9.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "cxx" -version = "1.0.93" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c00419335c41018365ddf7e4d5f1c12ee3659ddcf3e01974650ba1de73d038" +checksum = "e88abab2f5abbe4c56e8f1fb431b784d710b709888f35755a160e62e33fe38e8" dependencies = [ "cc", "cxxbridge-flags", @@ -130,19 +191,29 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.93" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc52e2eb08915cb12596d29d55f0b5384f00d697a646dbd269b6ecb0fbd9d31" +checksum = "8d3816ed957c008ccd4728485511e3d9aaf7db419aa321e3d2c5a2f3411e36c8" [[package]] name = "cxxbridge-macro" -version = "1.0.93" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631569015d0d8d54e6c241733f944042623ab6df7bc3be7466874b05fcdb1c5f" +checksum = "a26acccf6f445af85ea056362561a24ef56cdc15fcc685f03aec50b9c702cb6d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.10", + "syn 2.0.18", +] + +[[package]] +name = "der" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17" +dependencies = [ + "const-oid", + "zeroize", ] [[package]] @@ -154,19 +225,45 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + [[package]] name = "downcast-rs" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "ecdsa" +version = "0.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature 2.1.0", + "spki", +] + [[package]] name = "ed25519" version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ - "signature", + "signature 1.6.4", ] [[package]] @@ -179,7 +276,7 @@ dependencies = [ "ed25519", "rand", "serde", - "sha2", + "sha2 0.9.9", "zeroize", ] @@ -189,12 +286,41 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +[[package]] +name = "elliptic-curve" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "ethnum" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0198b9d0078e0f30dedc7acbb21c974e838fc8fae3ee170128658a98cb2c1c04" +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "fixedbitset" version = "0.4.2" @@ -203,21 +329,22 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -228,14 +355,38 @@ checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] [[package]] name = "hashbrown" @@ -249,11 +400,20 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -296,17 +456,49 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.7", + "signature 2.1.0", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + [[package]] name = "libc" -version = "0.2.140" +version = "0.2.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" [[package]] name = "libm" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "link-cplusplus" @@ -319,12 +511,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "memchr" @@ -373,13 +562,19 @@ dependencies = [ [[package]] name = "object" -version = "0.30.3" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "memchr", ] +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + [[package]] name = "opaque-debug" version = "0.3.0" @@ -394,9 +589,9 @@ checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "petgraph" @@ -408,6 +603,16 @@ dependencies = [ "indexmap", ] +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -416,18 +621,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.53" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] @@ -438,10 +643,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.16", "libc", "rand_chacha", - "rand_core", + "rand_core 0.5.1", "rand_hc", ] @@ -452,7 +657,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", ] [[package]] @@ -461,7 +666,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.10", ] [[package]] @@ -470,14 +684,24 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", ] [[package]] name = "rustc-demangle" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-simple-version" @@ -491,6 +715,20 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +[[package]] +name = "sec1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "semver" version = "1.0.17" @@ -502,29 +740,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.158" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" +checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.158" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" +checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.10", + "syn 2.0.18", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a" dependencies = [ "itoa", "ryu", @@ -533,9 +771,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" dependencies = [ "serde", ] @@ -546,19 +784,50 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + [[package]] name = "signature" version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +[[package]] +name = "signature" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + [[package]] name = "smallvec" version = "1.10.0" @@ -568,129 +837,137 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "soroban-env-common" version = "0.0.16" -source = "git+https://github.com/stellar/rs-soroban-env?rev=a531f7213604f8776547b257f402de6247ec5a6f#a531f7213604f8776547b257f402de6247ec5a6f" +source = "git+https://github.com/stellar/rs-soroban-env?rev=16bdf376278e1f6322beebad0a11e3c484b1eef9#16bdf376278e1f6322beebad0a11e3c484b1eef9" dependencies = [ "crate-git-revision", "ethnum", - "soroban-env-macros 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=a531f7213604f8776547b257f402de6247ec5a6f)", + "soroban-env-macros 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=16bdf376278e1f6322beebad0a11e3c484b1eef9)", "soroban-wasmi", "static_assertions", - "stellar-xdr 0.0.16 (git+https://github.com/stellar/rs-stellar-xdr?rev=ba1ff9231ae81793d470db93815ead664eb21fb2)", + "stellar-xdr", ] [[package]] name = "soroban-env-common" version = "0.0.16" -source = "git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c#d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c" +source = "git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519#e6e02dc4b5cf946028e51603883bd81ca38ce519" dependencies = [ "crate-git-revision", "ethnum", - "soroban-env-macros 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c)", + "soroban-env-macros 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519)", "soroban-wasmi", "static_assertions", - "stellar-xdr 0.0.16 (git+https://github.com/stellar/rs-stellar-xdr?rev=3429ea634df58aadf836790de8bbea21b7e82651)", + "stellar-xdr", ] [[package]] name = "soroban-env-host" version = "0.0.16" -source = "git+https://github.com/stellar/rs-soroban-env?rev=a531f7213604f8776547b257f402de6247ec5a6f#a531f7213604f8776547b257f402de6247ec5a6f" +source = "git+https://github.com/stellar/rs-soroban-env?rev=16bdf376278e1f6322beebad0a11e3c484b1eef9#16bdf376278e1f6322beebad0a11e3c484b1eef9" dependencies = [ "backtrace", "curve25519-dalek", "ed25519-dalek", + "getrandom 0.2.10", "hex", + "k256", "log", "num-derive", "num-integer", "num-traits", "rand", "rand_chacha", - "sha2", - "soroban-env-common 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=a531f7213604f8776547b257f402de6247ec5a6f)", - "soroban-native-sdk-macros 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=a531f7213604f8776547b257f402de6247ec5a6f)", + "sha2 0.9.9", + "sha3", + "soroban-env-common 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=16bdf376278e1f6322beebad0a11e3c484b1eef9)", + "soroban-native-sdk-macros 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=16bdf376278e1f6322beebad0a11e3c484b1eef9)", "soroban-wasmi", "static_assertions", + "stellar-strkey", ] [[package]] name = "soroban-env-host" version = "0.0.16" -source = "git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c#d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c" +source = "git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519#e6e02dc4b5cf946028e51603883bd81ca38ce519" dependencies = [ "backtrace", "curve25519-dalek", "ed25519-dalek", + "getrandom 0.2.10", "hex", + "k256", "log", "num-derive", "num-integer", "num-traits", "rand", "rand_chacha", - "sha2", - "soroban-env-common 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c)", - "soroban-native-sdk-macros 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c)", + "sha2 0.9.9", + "sha3", + "soroban-env-common 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519)", + "soroban-native-sdk-macros 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519)", "soroban-wasmi", "static_assertions", + "stellar-strkey", ] [[package]] name = "soroban-env-macros" version = "0.0.16" -source = "git+https://github.com/stellar/rs-soroban-env?rev=a531f7213604f8776547b257f402de6247ec5a6f#a531f7213604f8776547b257f402de6247ec5a6f" +source = "git+https://github.com/stellar/rs-soroban-env?rev=16bdf376278e1f6322beebad0a11e3c484b1eef9#16bdf376278e1f6322beebad0a11e3c484b1eef9" dependencies = [ "itertools", "proc-macro2", "quote", "serde", "serde_json", - "stellar-xdr 0.0.16 (git+https://github.com/stellar/rs-stellar-xdr?rev=ba1ff9231ae81793d470db93815ead664eb21fb2)", - "syn 2.0.10", + "stellar-xdr", + "syn 2.0.18", "thiserror", ] [[package]] name = "soroban-env-macros" version = "0.0.16" -source = "git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c#d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c" +source = "git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519#e6e02dc4b5cf946028e51603883bd81ca38ce519" dependencies = [ "itertools", "proc-macro2", "quote", "serde", "serde_json", - "stellar-xdr 0.0.16 (git+https://github.com/stellar/rs-stellar-xdr?rev=3429ea634df58aadf836790de8bbea21b7e82651)", - "syn 2.0.10", + "stellar-xdr", + "syn 2.0.18", "thiserror", ] [[package]] name = "soroban-native-sdk-macros" version = "0.0.16" -source = "git+https://github.com/stellar/rs-soroban-env?rev=a531f7213604f8776547b257f402de6247ec5a6f#a531f7213604f8776547b257f402de6247ec5a6f" +source = "git+https://github.com/stellar/rs-soroban-env?rev=16bdf376278e1f6322beebad0a11e3c484b1eef9#16bdf376278e1f6322beebad0a11e3c484b1eef9" dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.10", + "syn 2.0.18", ] [[package]] name = "soroban-native-sdk-macros" version = "0.0.16" -source = "git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c#d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c" +source = "git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519#e6e02dc4b5cf946028e51603883bd81ca38ce519" dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.10", + "syn 2.0.18", ] [[package]] name = "soroban-test-wasms" version = "0.0.16" -source = "git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c#d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c" +source = "git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519#e6e02dc4b5cf946028e51603883bd81ca38ce519" [[package]] name = "soroban-wasmi" @@ -718,9 +995,19 @@ dependencies = [ [[package]] name = "spin" -version = "0.9.6" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5d6e0250b93c8427a177b849d144a96d5acc57006149479403d7861ab721e34" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der", +] [[package]] name = "static_assertions" @@ -737,25 +1024,24 @@ dependencies = [ "cxx", "log", "rustc-simple-version", - "soroban-env-host 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=a531f7213604f8776547b257f402de6247ec5a6f)", - "soroban-env-host 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c)", + "soroban-env-host 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=16bdf376278e1f6322beebad0a11e3c484b1eef9)", + "soroban-env-host 0.0.16 (git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519)", "soroban-test-wasms", ] [[package]] -name = "stellar-xdr" -version = "0.0.16" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=3429ea634df58aadf836790de8bbea21b7e82651#3429ea634df58aadf836790de8bbea21b7e82651" +name = "stellar-strkey" +version = "0.0.7" +source = "git+https://github.com/stellar/rs-stellar-strkey?rev=e6ba45c60c16de28c7522586b80ed0150157df73#e6ba45c60c16de28c7522586b80ed0150157df73" dependencies = [ - "base64", - "crate-git-revision", - "hex", + "base32", + "thiserror", ] [[package]] name = "stellar-xdr" version = "0.0.16" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=ba1ff9231ae81793d470db93815ead664eb21fb2#ba1ff9231ae81793d470db93815ead664eb21fb2" +source = "git+https://github.com/stellar/rs-stellar-xdr?rev=f7b43ea2a4a36a87ebde2cb6050ea4bd7540df21#f7b43ea2a4a36a87ebde2cb6050ea4bd7540df21" dependencies = [ "base64", "crate-git-revision", @@ -781,27 +1067,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.10" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aad1363ed6d37b84299588d62d3a7d95b5a5c2d9aad5c85609fda12afaa1f40" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - [[package]] name = "thiserror" version = "1.0.40" @@ -819,7 +1093,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.10", + "syn 2.0.18", ] [[package]] @@ -839,9 +1113,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" dependencies = [ "serde", "serde_spanned", @@ -851,18 +1125,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.8" +version = "0.19.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" dependencies = [ "indexmap", "serde", @@ -885,9 +1159,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] name = "unicode-normalization" @@ -898,17 +1172,11 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -927,6 +1195,66 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.18", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + [[package]] name = "wasmi_arena" version = "0.4.0" @@ -943,30 +1271,29 @@ dependencies = [ [[package]] name = "winnow" -version = "0.4.1" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" dependencies = [ "memchr", ] [[package]] name = "zeroize" -version = "1.3.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure", + "syn 2.0.18", ] diff --git a/src/bucket/Bucket.cpp b/src/bucket/Bucket.cpp index d3466f0729..82fabd829b 100644 --- a/src/bucket/Bucket.cpp +++ b/src/bucket/Bucket.cpp @@ -719,8 +719,7 @@ refersToSameEntry(T const& lhs, T const& rhs) { if (lhs.type() == CONTRACT_DATA) { - return lhs.contractData().contractID == - rhs.contractData().contractID && + return lhs.contractData().contract == rhs.contractData().contract && lhs.contractData().key == rhs.contractData().key; } else if (lhs.type() == CONTRACT_CODE) diff --git a/src/bucket/LedgerCmp.h b/src/bucket/LedgerCmp.h index d825312f34..5321c177a7 100644 --- a/src/bucket/LedgerCmp.h +++ b/src/bucket/LedgerCmp.h @@ -88,8 +88,8 @@ struct LedgerEntryIdCmp #ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION case CONTRACT_DATA: { - return lexCompare(a.contractData().contractID, - b.contractData().contractID, a.contractData().key, + return lexCompare(a.contractData().contract, + b.contractData().contract, a.contractData().key, b.contractData().key, a.contractData().type, b.contractData().type, getLeType(a), getLeType(b)); diff --git a/src/bucket/test/BucketIndexTests.cpp b/src/bucket/test/BucketIndexTests.cpp index 0f9d075908..12449303a9 100644 --- a/src/bucket/test/BucketIndexTests.cpp +++ b/src/bucket/test/BucketIndexTests.cpp @@ -264,9 +264,10 @@ class BucketIndexTest return le; }; - std::vector entries = {generateEntry(TEMPORARY), - generateEntry(MERGEABLE), - generateEntry(EXCLUSIVE)}; + std::vector entries = { + generateEntry(ContractDataType::TEMPORARY), + generateEntry(ContractDataType::PERSISTENT), + }; for (auto const& e : entries) { auto k = LedgerEntryKey(e); diff --git a/src/herder/Upgrades.cpp b/src/herder/Upgrades.cpp index f9acc62254..1bdc85b976 100644 --- a/src/herder/Upgrades.cpp +++ b/src/herder/Upgrades.cpp @@ -1344,7 +1344,8 @@ ConfigUpgradeSetFrame::getLedgerKey(ConfigUpgradeSetKey const& upgradeKey) LedgerKey lk; lk.type(CONTRACT_DATA); - lk.contractData().contractID = upgradeKey.contractID; + lk.contractData().contract.type(SC_ADDRESS_TYPE_CONTRACT); + lk.contractData().contract.contractId() = upgradeKey.contractID; lk.contractData().key = v; return lk; } diff --git a/src/herder/test/UpgradesTests.cpp b/src/herder/test/UpgradesTests.cpp index 5bebfad801..52d6f0498c 100644 --- a/src/herder/test/UpgradesTests.cpp +++ b/src/herder/test/UpgradesTests.cpp @@ -241,7 +241,8 @@ makeConfigUpgradeSet(AbstractLedgerTxn& ltx, ConfigUpgradeSet configUpgradeSet) LedgerEntry le; le.data.type(CONTRACT_DATA); le.data.contractData().body.leType(DATA_ENTRY); - le.data.contractData().contractID = contractID; + le.data.contractData().contract.type(SC_ADDRESS_TYPE_CONTRACT); + le.data.contractData().contract.contractId() = contractID; le.data.contractData().key = key; le.data.contractData().body.data().val = val; @@ -720,7 +721,9 @@ TEST_CASE("config upgrade validation", "[upgrades]") LedgerEntry le; le.data.type(CONTRACT_DATA); le.data.contractData().body.leType(DATA_ENTRY); - le.data.contractData().contractID = contractID; + le.data.contractData().contract.type( + SC_ADDRESS_TYPE_CONTRACT); + le.data.contractData().contract.contractId() = contractID; le.data.contractData().key = key; le.data.contractData().body.data().val = val; diff --git a/src/invariant/ConservationOfLumens.cpp b/src/invariant/ConservationOfLumens.cpp index 3e4f3805ad..41df40022f 100644 --- a/src/invariant/ConservationOfLumens.cpp +++ b/src/invariant/ConservationOfLumens.cpp @@ -82,7 +82,8 @@ calculateDeltaBalance(LedgerEntry const* current, LedgerEntry const* previous) { auto const& contractData = current ? current->data.contractData() : previous->data.contractData(); - if (contractData.contractID != lumenContractID || + if (contractData.contract.type() != SC_ADDRESS_TYPE_CONTRACT || + contractData.contract.contractId() != lumenContractID || contractData.key.type() != SCV_VEC || !contractData.key.vec() || contractData.key.vec().size() == 0) { diff --git a/src/invariant/test/BucketListIsConsistentWithDatabaseTests.cpp b/src/invariant/test/BucketListIsConsistentWithDatabaseTests.cpp index 03402b1dde..1d8aa2e6d3 100644 --- a/src/invariant/test/BucketListIsConsistentWithDatabaseTests.cpp +++ b/src/invariant/test/BucketListIsConsistentWithDatabaseTests.cpp @@ -507,7 +507,7 @@ class ApplyBucketsWorkModifyEntry : public ApplyBucketsWork entry.data.contractData() = LedgerTestUtils::generateValidContractDataEntry(5); - entry.data.contractData().contractID = cd.contractID; + entry.data.contractData().contract = cd.contract; entry.data.contractData().key = cd.key; } diff --git a/src/ledger/LedgerHashUtils.h b/src/ledger/LedgerHashUtils.h index a777852840..055fddb3ad 100644 --- a/src/ledger/LedgerHashUtils.h +++ b/src/ledger/LedgerHashUtils.h @@ -143,8 +143,19 @@ template <> class hash break; #ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION case stellar::CONTRACT_DATA: - stellar::hashMix(res, std::hash()( - lk.contractData().contractID)); + switch (lk.contractData().contract.type()) + { + case stellar::SC_ADDRESS_TYPE_ACCOUNT: + stellar::hashMix( + res, std::hash()( + lk.contractData().contract.accountId().ed25519())); + break; + case stellar::SC_ADDRESS_TYPE_CONTRACT: + stellar::hashMix(res, + std::hash()( + lk.contractData().contract.contractId())); + break; + } stellar::hashMix( res, stellar::shortHash::xdrComputeHash(lk.contractData().key)); break; diff --git a/src/ledger/LedgerTxnContractDataSQL.cpp b/src/ledger/LedgerTxnContractDataSQL.cpp index d4e19dae17..ead3499052 100644 --- a/src/ledger/LedgerTxnContractDataSQL.cpp +++ b/src/ledger/LedgerTxnContractDataSQL.cpp @@ -33,7 +33,7 @@ LedgerTxnRoot::Impl::loadContractData(LedgerKey const& k) const return nullptr; } - auto contractID = toOpaqueBase64(k.contractData().contractID); + auto contractID = toOpaqueBase64(k.contractData().contract); auto key = toOpaqueBase64(k.contractData().key); int32_t type = k.contractData().type; std::string contractDataEntryStr; @@ -116,7 +116,7 @@ class BulkLoadContractDataOperation } mContractIDs.emplace_back( - toOpaqueBase64(k.contractData().contractID)); + toOpaqueBase64(k.contractData().contract)); mKeys.emplace_back(toOpaqueBase64(k.contractData().key)); mTypes.emplace_back(k.contractData().type); } @@ -244,7 +244,7 @@ class BulkDeleteContractDataOperation } mContractIDs.emplace_back( - toOpaqueBase64(e.key().ledgerKey().contractData().contractID)); + toOpaqueBase64(e.key().ledgerKey().contractData().contract)); mKeys.emplace_back( toOpaqueBase64(e.key().ledgerKey().contractData().key)); mTypes.emplace_back(e.key().ledgerKey().contractData().type); @@ -338,7 +338,7 @@ class BulkUpsertContractDataOperation throwIfNotContractData(entry.data.type()); mContractIDs.emplace_back( - toOpaqueBase64(entry.data.contractData().contractID)); + toOpaqueBase64(entry.data.contractData().contract)); mKeys.emplace_back(toOpaqueBase64(entry.data.contractData().key)); mTypes.emplace_back(entry.data.contractData().type); mContractDataEntries.emplace_back(toOpaqueBase64(entry)); diff --git a/src/ledger/test/LedgerTxnTests.cpp b/src/ledger/test/LedgerTxnTests.cpp index aecc68bf41..79ab666750 100644 --- a/src/ledger/test/LedgerTxnTests.cpp +++ b/src/ledger/test/LedgerTxnTests.cpp @@ -110,8 +110,8 @@ generateLedgerEntryWithSameKey(LedgerEntry const& leBase) case CONTRACT_DATA: le.data.contractData() = LedgerTestUtils::generateValidContractDataEntry(); - le.data.contractData().contractID = - leBase.data.contractData().contractID; + le.data.contractData().contract = + leBase.data.contractData().contract; le.data.contractData().key = leBase.data.contractData().key; le.data.contractData().type = leBase.data.contractData().type; break; diff --git a/src/protocol-next/xdr b/src/protocol-next/xdr index 72c85fd191..25363a72e9 160000 --- a/src/protocol-next/xdr +++ b/src/protocol-next/xdr @@ -1 +1 @@ -Subproject commit 72c85fd191a460bad69926024d76b18db55d381b +Subproject commit 25363a72e9bbbb6621d888dde3b36c0a196fb84d diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index 101e2c5463..c0aaea7967 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -27,7 +27,7 @@ rustc-simple-version = "0.1.0" version = "0.0.16" git = "https://github.com/stellar/rs-soroban-env" package = "soroban-env-host" -rev = "d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c" +rev = "e6e02dc4b5cf946028e51603883bd81ca38ce519" # 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 @@ -51,11 +51,11 @@ optional = true version = "0.0.16" git = "https://github.com/stellar/rs-soroban-env" package = "soroban-env-host" -rev = "a531f7213604f8776547b257f402de6247ec5a6f" +rev = "16bdf376278e1f6322beebad0a11e3c484b1eef9" [dependencies.soroban-test-wasms] git = "https://github.com/stellar/rs-soroban-env" -rev = "d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c" +rev = "e6e02dc4b5cf946028e51603883bd81ca38ce519" [dependencies.cargo-lock] git = "https://github.com/rustsec/rustsec" diff --git a/src/rust/src/contract.rs b/src/rust/src/contract.rs index c554fe1ded..0fe6152c69 100644 --- a/src/rust/src/contract.rs +++ b/src/rust/src/contract.rs @@ -45,7 +45,7 @@ impl From for LedgerInfo { network_id: c.network_id.try_into().unwrap(), base_reserve: c.base_reserve, min_temp_entry_expiration: c.min_temp_entry_expiration, - min_restorable_entry_expiration: c.min_restorable_entry_expiration, + min_persistent_entry_expiration: c.min_persistent_entry_expiration, } } } @@ -211,7 +211,7 @@ fn ledger_entry_to_ledger_key(le: &LedgerEntry) -> Result Ok(LedgerKey::ContractData(LedgerKeyContractData { - contract_id: cd.contract_id.clone(), + contract: cd.contract.clone(), key: cd.key.clone(), type_: cd.type_.clone(), le_type: match &cd.body { diff --git a/src/rust/src/host-dep-tree-curr.txt b/src/rust/src/host-dep-tree-curr.txt index 7a52c50bc3..4e3c61d022 100644 --- a/src/rust/src/host-dep-tree-curr.txt +++ b/src/rust/src/host-dep-tree-curr.txt @@ -1,77 +1,96 @@ -soroban-env-host 0.0.16 git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c#d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c +soroban-env-host 0.0.16 git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519#e6e02dc4b5cf946028e51603883bd81ca38ce519 +├── stellar-strkey 0.0.7 git+https://github.com/stellar/rs-stellar-strkey?rev=e6ba45c60c16de28c7522586b80ed0150157df73#e6ba45c60c16de28c7522586b80ed0150157df73 +│ ├── thiserror 1.0.40 checksum:978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac +│ │ └── thiserror-impl 1.0.40 checksum:f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f +│ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e +│ │ │ ├── unicode-ident 1.0.9 checksum:b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0 +│ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ │ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ │ │ │ └── unicode-ident 1.0.9 checksum:b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0 +│ │ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ └── base32 0.4.0 checksum:23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa ├── static_assertions 1.1.0 checksum:a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f ├── soroban-wasmi 0.30.0-soroban git+https://github.com/stellar/wasmi?rev=1a2bc7f#1a2bc7f3801c565c2dab22021255a164c05a7f76 │ ├── wasmparser-nostd 0.100.1 checksum:9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724 │ │ └── indexmap-nostd 0.4.0 checksum:8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590 │ ├── wasmi_arena 0.4.0 git+https://github.com/stellar/wasmi?rev=1a2bc7f#1a2bc7f3801c565c2dab22021255a164c05a7f76 -│ ├── spin 0.9.6 checksum:b5d6e0250b93c8427a177b849d144a96d5acc57006149479403d7861ab721e34 +│ ├── spin 0.9.8 checksum:6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67 │ ├── soroban-wasmi_core 0.30.0-soroban git+https://github.com/stellar/wasmi?rev=1a2bc7f#1a2bc7f3801c565c2dab22021255a164c05a7f76 │ │ ├── paste 1.0.12 checksum:9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79 │ │ ├── num-traits 0.2.15 checksum:578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd │ │ │ └── autocfg 1.1.0 checksum:d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa -│ │ ├── libm 0.2.6 checksum:348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb +│ │ ├── libm 0.2.7 checksum:f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4 │ │ └── downcast-rs 1.2.0 checksum:9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650 │ ├── smallvec 1.10.0 checksum:a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0 │ └── intx 0.1.0 checksum:f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75 -├── soroban-native-sdk-macros 0.0.16 git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c#d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c -│ ├── syn 2.0.10 checksum:5aad1363ed6d37b84299588d62d3a7d95b5a5c2d9aad5c85609fda12afaa1f40 -│ │ ├── unicode-ident 1.0.8 checksum:e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4 -│ │ ├── quote 1.0.26 checksum:4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc -│ │ │ └── proc-macro2 1.0.53 checksum:ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73 -│ │ │ └── unicode-ident 1.0.8 checksum:e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4 -│ │ └── proc-macro2 1.0.53 checksum:ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73 -│ ├── quote 1.0.26 checksum:4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc -│ ├── proc-macro2 1.0.53 checksum:ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73 +├── soroban-native-sdk-macros 0.0.16 git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519#e6e02dc4b5cf946028e51603883bd81ca38ce519 +│ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e +│ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ ├── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 │ └── itertools 0.10.5 checksum:b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473 │ └── either 1.8.1 checksum:7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91 -├── soroban-env-common 0.0.16 git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c#d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c -│ ├── stellar-xdr 0.0.16 git+https://github.com/stellar/rs-stellar-xdr?rev=3429ea634df58aadf836790de8bbea21b7e82651#3429ea634df58aadf836790de8bbea21b7e82651 +├── soroban-env-common 0.0.16 git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519#e6e02dc4b5cf946028e51603883bd81ca38ce519 +│ ├── stellar-xdr 0.0.16 git+https://github.com/stellar/rs-stellar-xdr?rev=f7b43ea2a4a36a87ebde2cb6050ea4bd7540df21#f7b43ea2a4a36a87ebde2cb6050ea4bd7540df21 │ │ ├── hex 0.4.3 checksum:7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70 │ │ ├── crate-git-revision 0.0.4 checksum:f998aef136a4e7833b0e4f0fc0939a59c40140b28e0ffbf524ad84fb2cc568c8 -│ │ │ ├── serde_json 1.0.94 checksum:1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea -│ │ │ │ ├── serde 1.0.158 checksum:771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9 -│ │ │ │ │ └── serde_derive 1.0.158 checksum:e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad -│ │ │ │ │ ├── syn 2.0.10 checksum:5aad1363ed6d37b84299588d62d3a7d95b5a5c2d9aad5c85609fda12afaa1f40 -│ │ │ │ │ ├── quote 1.0.26 checksum:4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc -│ │ │ │ │ └── proc-macro2 1.0.53 checksum:ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73 +│ │ │ ├── serde_json 1.0.97 checksum:bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a +│ │ │ │ ├── serde 1.0.164 checksum:9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d +│ │ │ │ │ └── serde_derive 1.0.164 checksum:d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68 +│ │ │ │ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e +│ │ │ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ │ │ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 │ │ │ │ ├── ryu 1.0.13 checksum:f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041 │ │ │ │ └── itoa 1.0.6 checksum:453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6 -│ │ │ ├── serde_derive 1.0.158 checksum:e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad -│ │ │ └── serde 1.0.158 checksum:771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9 +│ │ │ ├── serde_derive 1.0.164 checksum:d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68 +│ │ │ └── serde 1.0.164 checksum:9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d │ │ └── base64 0.13.1 checksum:9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8 │ ├── static_assertions 1.1.0 checksum:a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f │ ├── soroban-wasmi 0.30.0-soroban git+https://github.com/stellar/wasmi?rev=1a2bc7f#1a2bc7f3801c565c2dab22021255a164c05a7f76 -│ ├── soroban-env-macros 0.0.16 git+https://github.com/stellar/rs-soroban-env?rev=d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c#d83c7e90dc8abcf7f141fdc13b0f85f8f08f8b0c +│ ├── soroban-env-macros 0.0.16 git+https://github.com/stellar/rs-soroban-env?rev=e6e02dc4b5cf946028e51603883bd81ca38ce519#e6e02dc4b5cf946028e51603883bd81ca38ce519 │ │ ├── thiserror 1.0.40 checksum:978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac -│ │ │ └── thiserror-impl 1.0.40 checksum:f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f -│ │ │ ├── syn 2.0.10 checksum:5aad1363ed6d37b84299588d62d3a7d95b5a5c2d9aad5c85609fda12afaa1f40 -│ │ │ ├── quote 1.0.26 checksum:4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc -│ │ │ └── proc-macro2 1.0.53 checksum:ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73 -│ │ ├── syn 2.0.10 checksum:5aad1363ed6d37b84299588d62d3a7d95b5a5c2d9aad5c85609fda12afaa1f40 -│ │ ├── stellar-xdr 0.0.16 git+https://github.com/stellar/rs-stellar-xdr?rev=3429ea634df58aadf836790de8bbea21b7e82651#3429ea634df58aadf836790de8bbea21b7e82651 -│ │ ├── serde_json 1.0.94 checksum:1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea -│ │ ├── serde 1.0.158 checksum:771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9 -│ │ ├── quote 1.0.26 checksum:4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc -│ │ ├── proc-macro2 1.0.53 checksum:ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73 +│ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e +│ │ ├── stellar-xdr 0.0.16 git+https://github.com/stellar/rs-stellar-xdr?rev=f7b43ea2a4a36a87ebde2cb6050ea4bd7540df21#f7b43ea2a4a36a87ebde2cb6050ea4bd7540df21 +│ │ ├── serde_json 1.0.97 checksum:bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a +│ │ ├── serde 1.0.164 checksum:9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d +│ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ ├── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 │ │ └── itertools 0.10.5 checksum:b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473 │ ├── ethnum 1.3.2 checksum:0198b9d0078e0f30dedc7acbb21c974e838fc8fae3ee170128658a98cb2c1c04 │ └── crate-git-revision 0.0.4 checksum:f998aef136a4e7833b0e4f0fc0939a59c40140b28e0ffbf524ad84fb2cc568c8 +├── sha3 0.10.8 checksum:75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60 +│ ├── keccak 0.1.4 checksum:8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940 +│ │ └── cpufeatures 0.2.8 checksum:03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c +│ │ └── libc 0.2.146 checksum:f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b +│ └── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292 +│ ├── subtle 2.5.0 checksum:81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc +│ ├── crypto-common 0.1.6 checksum:1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3 +│ │ ├── typenum 1.16.0 checksum:497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba +│ │ └── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a +│ │ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 +│ │ │ └── zeroize_derive 1.4.2 checksum:ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69 +│ │ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e +│ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ │ ├── version_check 0.9.4 checksum:49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f +│ │ └── typenum 1.16.0 checksum:497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba +│ ├── const-oid 0.9.2 checksum:520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913 +│ └── block-buffer 0.10.4 checksum:3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71 +│ └── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a ├── sha2 0.9.9 checksum:4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800 │ ├── opaque-debug 0.3.0 checksum:624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5 │ ├── digest 0.9.0 checksum:d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066 -│ │ └── generic-array 0.14.6 checksum:bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9 -│ │ ├── version_check 0.9.4 checksum:49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f -│ │ └── typenum 1.16.0 checksum:497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba -│ ├── cpufeatures 0.2.6 checksum:280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181 -│ │ └── libc 0.2.140 checksum:99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c +│ │ └── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a +│ ├── cpufeatures 0.2.8 checksum:03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c │ ├── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd │ └── block-buffer 0.9.0 checksum:4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4 -│ └── generic-array 0.14.6 checksum:bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9 +│ └── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a ├── rand_chacha 0.2.2 checksum:f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402 │ ├── rand_core 0.5.1 checksum:90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19 │ │ └── getrandom 0.1.16 checksum:8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce │ │ ├── wasi 0.9.0+wasi-snapshot-preview1 checksum:cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519 -│ │ ├── libc 0.2.140 checksum:99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c +│ │ ├── libc 0.2.146 checksum:f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b │ │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd │ └── ppv-lite86 0.2.17 checksum:5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de ├── rand 0.7.3 checksum:6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03 @@ -79,7 +98,7 @@ soroban-env-host 0.0.16 git+https://github.com/stellar/rs-soroban-env?rev=d83c7e │ │ └── rand_core 0.5.1 checksum:90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19 │ ├── rand_core 0.5.1 checksum:90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19 │ ├── rand_chacha 0.2.2 checksum:f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402 -│ ├── libc 0.2.140 checksum:99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c +│ ├── libc 0.2.146 checksum:f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b │ └── getrandom 0.1.16 checksum:8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce ├── num-traits 0.2.15 checksum:578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd ├── num-integer 0.1.45 checksum:225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9 @@ -87,45 +106,112 @@ soroban-env-host 0.0.16 git+https://github.com/stellar/rs-soroban-env?rev=d83c7e │ └── autocfg 1.1.0 checksum:d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa ├── num-derive 0.3.3 checksum:876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d │ ├── syn 1.0.109 checksum:72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237 -│ │ ├── unicode-ident 1.0.8 checksum:e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4 -│ │ ├── quote 1.0.26 checksum:4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc -│ │ └── proc-macro2 1.0.53 checksum:ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73 -│ ├── quote 1.0.26 checksum:4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc -│ └── proc-macro2 1.0.53 checksum:ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73 -├── log 0.4.17 checksum:abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e +│ │ ├── unicode-ident 1.0.9 checksum:b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0 +│ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +├── log 0.4.19 checksum:b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4 +├── k256 0.13.1 checksum:cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc +│ ├── signature 2.1.0 checksum:5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500 +│ │ ├── rand_core 0.6.4 checksum:ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c +│ │ │ └── getrandom 0.2.10 checksum:be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427 +│ │ │ ├── wasm-bindgen 0.2.87 checksum:7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342 +│ │ │ │ ├── wasm-bindgen-macro 0.2.87 checksum:dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d +│ │ │ │ │ ├── wasm-bindgen-macro-support 0.2.87 checksum:54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b +│ │ │ │ │ │ ├── wasm-bindgen-shared 0.2.87 checksum:ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1 +│ │ │ │ │ │ ├── wasm-bindgen-backend 0.2.87 checksum:5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd +│ │ │ │ │ │ │ ├── wasm-bindgen-shared 0.2.87 checksum:ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1 +│ │ │ │ │ │ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e +│ │ │ │ │ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ │ │ │ │ │ ├── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ │ │ │ │ │ │ ├── once_cell 1.18.0 checksum:dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d +│ │ │ │ │ │ │ ├── log 0.4.19 checksum:b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4 +│ │ │ │ │ │ │ └── bumpalo 3.13.0 checksum:a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1 +│ │ │ │ │ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e +│ │ │ │ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ │ │ │ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ │ │ │ │ └── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ │ │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd +│ │ │ ├── wasi 0.11.0+wasi-snapshot-preview1 checksum:9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423 +│ │ │ ├── libc 0.2.146 checksum:f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b +│ │ │ ├── js-sys 0.3.64 checksum:c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a +│ │ │ │ └── wasm-bindgen 0.2.87 checksum:7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342 +│ │ │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd +│ │ └── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292 +│ ├── sha2 0.10.7 checksum:479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8 +│ │ ├── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292 +│ │ ├── cpufeatures 0.2.8 checksum:03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c +│ │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd +│ ├── once_cell 1.18.0 checksum:dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d +│ ├── elliptic-curve 0.13.5 checksum:968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b +│ │ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 +│ │ ├── subtle 2.5.0 checksum:81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc +│ │ ├── sec1 0.7.2 checksum:f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e +│ │ │ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 +│ │ │ ├── subtle 2.5.0 checksum:81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc +│ │ │ ├── pkcs8 0.10.2 checksum:f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7 +│ │ │ │ ├── spki 0.7.2 checksum:9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a +│ │ │ │ │ ├── der 0.7.6 checksum:56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17 +│ │ │ │ │ │ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 +│ │ │ │ │ │ └── const-oid 0.9.2 checksum:520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913 +│ │ │ │ │ └── base64ct 1.6.0 checksum:8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b +│ │ │ │ └── der 0.7.6 checksum:56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17 +│ │ │ ├── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a +│ │ │ ├── der 0.7.6 checksum:56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17 +│ │ │ └── base16ct 0.2.0 checksum:4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf +│ │ ├── rand_core 0.6.4 checksum:ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c +│ │ ├── pkcs8 0.10.2 checksum:f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7 +│ │ ├── group 0.13.0 checksum:f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63 +│ │ │ ├── subtle 2.5.0 checksum:81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc +│ │ │ ├── rand_core 0.6.4 checksum:ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c +│ │ │ └── ff 0.13.0 checksum:ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449 +│ │ │ ├── subtle 2.5.0 checksum:81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc +│ │ │ └── rand_core 0.6.4 checksum:ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c +│ │ ├── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a +│ │ ├── ff 0.13.0 checksum:ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449 +│ │ ├── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292 +│ │ ├── crypto-bigint 0.5.2 checksum:cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15 +│ │ │ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 +│ │ │ ├── subtle 2.5.0 checksum:81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc +│ │ │ ├── rand_core 0.6.4 checksum:ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c +│ │ │ └── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a +│ │ └── base16ct 0.2.0 checksum:4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf +│ ├── ecdsa 0.16.7 checksum:0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428 +│ │ ├── spki 0.7.2 checksum:9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a +│ │ ├── signature 2.1.0 checksum:5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500 +│ │ ├── rfc6979 0.4.0 checksum:f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2 +│ │ │ ├── subtle 2.5.0 checksum:81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc +│ │ │ └── hmac 0.12.1 checksum:6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e +│ │ │ └── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292 +│ │ ├── elliptic-curve 0.13.5 checksum:968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b +│ │ ├── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292 +│ │ └── der 0.7.6 checksum:56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17 │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd ├── hex 0.4.3 checksum:7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70 +├── getrandom 0.2.10 checksum:be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427 ├── ed25519-dalek 1.0.1 checksum:c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d -│ ├── zeroize 1.3.0 checksum:4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd -│ │ └── zeroize_derive 1.3.3 checksum:44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c -│ │ ├── synstructure 0.12.6 checksum:f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f -│ │ │ ├── unicode-xid 0.2.4 checksum:f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c -│ │ │ ├── syn 1.0.109 checksum:72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237 -│ │ │ ├── quote 1.0.26 checksum:4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc -│ │ │ └── proc-macro2 1.0.53 checksum:ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73 -│ │ ├── syn 1.0.109 checksum:72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237 -│ │ ├── quote 1.0.26 checksum:4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc -│ │ └── proc-macro2 1.0.53 checksum:ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73 +│ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 │ ├── sha2 0.9.9 checksum:4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800 -│ ├── serde 1.0.158 checksum:771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9 +│ ├── serde 1.0.164 checksum:9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d │ ├── rand 0.7.3 checksum:6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03 │ ├── ed25519 1.5.3 checksum:91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7 │ │ └── signature 1.6.4 checksum:74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c -│ └── curve25519-dalek 3.2.1 checksum:90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0 -│ ├── zeroize 1.3.0 checksum:4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd +│ └── curve25519-dalek 3.2.0 checksum:0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61 +│ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 │ ├── subtle 2.5.0 checksum:81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc │ ├── rand_core 0.5.1 checksum:90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19 │ ├── digest 0.9.0 checksum:d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066 │ └── byteorder 1.4.3 checksum:14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610 -├── curve25519-dalek 3.2.1 checksum:90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0 +├── curve25519-dalek 3.2.0 checksum:0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61 └── backtrace 0.3.67 checksum:233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca - ├── rustc-demangle 0.1.22 checksum:d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b - ├── object 0.30.3 checksum:ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439 + ├── rustc-demangle 0.1.23 checksum:d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76 + ├── object 0.30.4 checksum:03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385 │ └── memchr 2.5.0 checksum:2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d ├── miniz_oxide 0.6.2 checksum:b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa │ └── adler 1.0.2 checksum:f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe - ├── libc 0.2.140 checksum:99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c + ├── libc 0.2.146 checksum:f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b ├── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd ├── cc 1.0.79 checksum:50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f └── addr2line 0.19.0 checksum:a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97 - └── gimli 0.27.2 checksum:ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4 + └── gimli 0.27.3 checksum:b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e diff --git a/src/rust/src/lib.rs b/src/rust/src/lib.rs index 764fcd5b9b..9dea156941 100644 --- a/src/rust/src/lib.rs +++ b/src/rust/src/lib.rs @@ -74,7 +74,7 @@ mod rust_bridge { pub base_reserve: u32, pub memory_limit: u32, pub min_temp_entry_expiration: u32, - pub min_restorable_entry_expiration: u32, + pub min_persistent_entry_expiration: u32, pub cpu_cost_params: CxxBuf, pub mem_cost_params: CxxBuf, } diff --git a/src/test/FuzzerImpl.cpp b/src/test/FuzzerImpl.cpp index 00aa9da19f..1e524c8979 100644 --- a/src/test/FuzzerImpl.cpp +++ b/src/test/FuzzerImpl.cpp @@ -164,7 +164,13 @@ getShortKey(LedgerKey const& key) case CONFIG_SETTING: return static_cast(key.configSetting().configSettingID); case CONTRACT_DATA: - return key.contractData().contractID.at(0); + switch (key.contractData().contract.type()) + { + case SC_ADDRESS_TYPE_ACCOUNT: + return getShortKey(key.contractData().contract.accountId()); + case SC_ADDRESS_TYPE_CONTRACT: + return key.contractData().contract.contractId().at(0); + } case CONTRACT_CODE: return key.contractCode().hash.at(0); #endif diff --git a/src/transactions/InvokeHostFunctionOpFrame.cpp b/src/transactions/InvokeHostFunctionOpFrame.cpp index 8d6e479cfe..623c5f9fb2 100644 --- a/src/transactions/InvokeHostFunctionOpFrame.cpp +++ b/src/transactions/InvokeHostFunctionOpFrame.cpp @@ -49,7 +49,7 @@ getLedgerInfo(AbstractLedgerTxn& ltx, Config const& cfg, info.sequence_number = hdr.ledgerSeq; info.timestamp = hdr.scpValue.closeTime; info.memory_limit = sorobanConfig.txMemoryLimit(); - info.min_restorable_entry_expiration = + info.min_persistent_entry_expiration = sorobanConfig.stateExpirationSettings().minRestorableEntryExpiration; info.min_temp_entry_expiration = sorobanConfig.stateExpirationSettings().minTempEntryExpiration; diff --git a/src/transactions/InvokeHostFunctionOpFrame.h b/src/transactions/InvokeHostFunctionOpFrame.h index a05789e29b..c4634815a8 100644 --- a/src/transactions/InvokeHostFunctionOpFrame.h +++ b/src/transactions/InvokeHostFunctionOpFrame.h @@ -15,7 +15,7 @@ namespace stellar class AbstractLedgerTxn; static constexpr ContractDataType CONTRACT_INSTANCE_CONTRACT_DATA_TYPE = - EXCLUSIVE; + ContractDataType::PERSISTENT; class InvokeHostFunctionOpFrame : public OperationFrame { diff --git a/src/transactions/TransactionFrame.cpp b/src/transactions/TransactionFrame.cpp index a9b1177dc6..38594360bb 100644 --- a/src/transactions/TransactionFrame.cpp +++ b/src/transactions/TransactionFrame.cpp @@ -686,7 +686,7 @@ TransactionFrame::computeSorobanResourceFee( cxxResources.write_bytes = txResources.writeBytes; cxxResources.transaction_size_bytes = - static_cast(xdr::xdr_size(mEnvelope.v1().tx)); + static_cast(xdr::xdr_size(mEnvelope)); cxxResources.metadata_size_bytes = txResources.extendedMetaDataSizeBytes; diff --git a/src/transactions/TransactionUtils.cpp b/src/transactions/TransactionUtils.cpp index 146dfd741f..910c0355e3 100644 --- a/src/transactions/TransactionUtils.cpp +++ b/src/transactions/TransactionUtils.cpp @@ -282,11 +282,11 @@ configSettingKey(ConfigSettingID const& configSettingID) } LedgerKey -contractDataKey(Hash const& contractID, SCVal const& dataKey, +contractDataKey(SCAddress const& contract, SCVal const& dataKey, ContractDataType type, ContractLedgerEntryType leType) { LedgerKey key(CONTRACT_DATA); - key.contractData().contractID = contractID; + key.contractData().contract = contract; key.contractData().key = dataKey; key.contractData().type = type; key.contractData().leType = leType; @@ -433,11 +433,11 @@ loadLiquidityPool(AbstractLedgerTxn& ltx, PoolID const& poolID) #ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION LedgerTxnEntry -loadContractData(AbstractLedgerTxn& ltx, Hash const& contractID, +loadContractData(AbstractLedgerTxn& ltx, SCAddress const& contract, SCVal const& dataKey, ContractDataType type) { ZoneScoped; - return ltx.load(contractDataKey(contractID, dataKey, type, DATA_ENTRY)); + return ltx.load(contractDataKey(contract, dataKey, type, DATA_ENTRY)); } LedgerTxnEntry diff --git a/src/transactions/TransactionUtils.h b/src/transactions/TransactionUtils.h index 89f62dae1c..6b15309158 100644 --- a/src/transactions/TransactionUtils.h +++ b/src/transactions/TransactionUtils.h @@ -67,7 +67,7 @@ LedgerKey poolShareTrustLineKey(AccountID const& accountID, PoolID const& poolID); #ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION LedgerKey configSettingKey(ConfigSettingID const& configSettingID); -LedgerKey contractDataKey(Hash const& contractID, SCVal const& dataKey, +LedgerKey contractDataKey(SCAddress const& contract, SCVal const& dataKey, ContractDataType type, ContractLedgerEntryType leType); LedgerKey contractCodeKey(Hash const& hash, ContractLedgerEntryType leType); @@ -145,8 +145,9 @@ LedgerTxnEntry loadPoolShareTrustLine(AbstractLedgerTxn& ltx, LedgerTxnEntry loadLiquidityPool(AbstractLedgerTxn& ltx, PoolID const& poolID); #ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION -LedgerTxnEntry loadContractData(AbstractLedgerTxn& ltx, Hash const& contractID, - SCVal const& dataKey, ContractDataType type); +LedgerTxnEntry loadContractData(AbstractLedgerTxn& ltx, + SCAddress const& contract, SCVal const& dataKey, + ContractDataType type); LedgerTxnEntry loadContractCode(AbstractLedgerTxn& ltx, Hash const& hash); #endif diff --git a/src/transactions/test/InvokeHostFunctionTests.cpp b/src/transactions/test/InvokeHostFunctionTests.cpp index dcd3d16b39..2376a26711 100644 --- a/src/transactions/test/InvokeHostFunctionTests.cpp +++ b/src/transactions/test/InvokeHostFunctionTests.cpp @@ -42,12 +42,19 @@ makeWasmRefScContractCode(Hash const& hash) return val; } -SCVal +SCAddress makeContractAddress(Hash const& hash) +{ + SCAddress addr(SC_ADDRESS_TYPE_CONTRACT); + addr.contractId() = hash; + return addr; +} + +SCVal +makeContractAddressSCVal(SCAddress const& address) { SCVal val(SCValType::SCV_ADDRESS); - val.address().type(SC_ADDRESS_TYPE_CONTRACT); - val.address().contractId() = hash; + val.address() = address; return val; } @@ -148,7 +155,8 @@ submitTxToCreateContract(Application& app, Operation const& op, // verify contract code reference is correct LedgerTxn ltx2(app.getLedgerTxnRoot()); - auto ltxe = loadContractData(ltx2, contractID, executableKey, + SCAddress contract = makeContractAddress(contractID); + auto ltxe = loadContractData(ltx2, contract, executableKey, CONTRACT_INSTANCE_CONTRACT_DATA_TYPE); REQUIRE(ltxe); @@ -239,7 +247,10 @@ deployContractWithSourceAccount(Application& app, RustBuf const& contractWasm, LedgerKey contractSourceRefLedgerKey; contractSourceRefLedgerKey.type(CONTRACT_DATA); - contractSourceRefLedgerKey.contractData().contractID = contractID; + contractSourceRefLedgerKey.contractData().contract.type( + SC_ADDRESS_TYPE_CONTRACT); + contractSourceRefLedgerKey.contractData().contract.contractId() = + contractID; contractSourceRefLedgerKey.contractData().key = scContractSourceRefKey; contractSourceRefLedgerKey.contractData().type = CONTRACT_INSTANCE_CONTRACT_DATA_TYPE; @@ -284,7 +295,7 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") auto const addI32Wasm = rust_bridge::get_test_wasm_add_i32(); auto contractKeys = deployContractWithSourceAccount(*app, addI32Wasm); - auto const& contractID = contractKeys[0].contractData().contractID; + auto const& contractID = contractKeys[0].contractData().contract; auto call = [&](SorobanResources const& resources, SCVec const& parameters, bool success) { Operation op; @@ -306,7 +317,7 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") if (success) { REQUIRE(tx->getFullFee() == 100'000); - REQUIRE(tx->getFeeBid() == 62'956); + REQUIRE(tx->getFeeBid() == 62'784); // Initially we store in result the charge for resources plus // minimum inclusion fee bid (currently equivalent to the network // `baseFee` of 100). @@ -387,7 +398,8 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") return resultVal; }; - auto scContractID = makeContractAddress(contractID); + SCVal scContractID(SCValType::SCV_ADDRESS); + scContractID.address() = contractID; auto scFunc = makeSymbol("add"); auto sc7 = makeI32(7); auto sc16 = makeI32(16); @@ -441,8 +453,7 @@ TEST_CASE("contract storage", "[tx][soroban]") auto const contractDataWasm = rust_bridge::get_test_wasm_contract_data(); auto contractKeys = deployContractWithSourceAccount(*app, contractDataWasm); - auto const& contractID = contractKeys[0].contractData().contractID; - + auto const& contractID = contractKeys[0].contractData().contract; auto checkContractData = [&](SCVal const& key, ContractDataType type, SCVal const* val) { LedgerTxn ltx(app->getLedgerTxnRoot()); @@ -513,20 +524,17 @@ TEST_CASE("contract storage", "[tx][soroban]") std::string funcStr; switch (type) { - case TEMPORARY: + case ContractDataType::TEMPORARY: funcStr = "put_temporary"; break; - case MERGEABLE: - funcStr = "put_mergeable"; - break; - case EXCLUSIVE: - funcStr = "put_exclusive"; + case ContractDataType::PERSISTENT: + funcStr = "put_persistent"; break; } auto [tx, ltx, txm] = createTx(readOnly, readWrite, writeBytes, - {makeContractAddress(contractID), makeSymbol(funcStr), + {makeContractAddressSCVal(contractID), makeSymbol(funcStr), keySymbol, valU64, scFlags}); if (expectSuccess) @@ -560,21 +568,18 @@ TEST_CASE("contract storage", "[tx][soroban]") std::string funcStr; switch (type) { - case TEMPORARY: + case ContractDataType::TEMPORARY: funcStr = "bump_temporary"; break; - case MERGEABLE: - funcStr = "bump_mergeable"; - break; - case EXCLUSIVE: - funcStr = "bump_exclusive"; + case ContractDataType::PERSISTENT: + funcStr = "bump_persistent"; break; } // TODO: Better bytes to write value auto [tx, ltx, txm] = createTx(readOnly, readWrite, 1000, - {makeContractAddress(contractID), makeSymbol(funcStr), + {makeContractAddressSCVal(contractID), makeSymbol(funcStr), keySymbol, bumpAmountU32}); if (expectSuccess) @@ -606,21 +611,18 @@ TEST_CASE("contract storage", "[tx][soroban]") std::string funcStr; switch (type) { - case TEMPORARY: + case ContractDataType::TEMPORARY: funcStr = "del_temporary"; break; - case MERGEABLE: - funcStr = "del_mergeable"; - break; - case EXCLUSIVE: - funcStr = "del_exclusive"; + case ContractDataType::PERSISTENT: + funcStr = "del_persistent"; break; } // TODO: Better bytes to write value - auto [tx, ltx, txm] = createTx( - readOnly, readWrite, 1000, - {makeContractAddress(contractID), makeSymbol(funcStr), keySymbol}); + auto [tx, ltx, txm] = createTx(readOnly, readWrite, 1000, + {makeContractAddressSCVal(contractID), + makeSymbol(funcStr), keySymbol}); if (expectSuccess) { @@ -645,33 +647,37 @@ TEST_CASE("contract storage", "[tx][soroban]") SECTION("default limits") { - put("key1", 0, MERGEABLE); - put("key2", 21, MERGEABLE); + put("key1", 0, ContractDataType::PERSISTENT); + put("key2", 21, ContractDataType::PERSISTENT); // Failure: contract data isn't in footprint - putWithFootprint("key1", 88, contractKeys, {}, 1000, false, MERGEABLE, - std::nullopt); - delWithFootprint("key1", contractKeys, {}, false, MERGEABLE); + putWithFootprint("key1", 88, contractKeys, {}, 1000, false, + ContractDataType::PERSISTENT, std::nullopt); + delWithFootprint("key1", contractKeys, {}, false, + ContractDataType::PERSISTENT); // Failure: contract data is read only auto readOnlyFootprint = contractKeys; - readOnlyFootprint.push_back(contractDataKey( - contractID, makeSymbol("key2"), MERGEABLE, DATA_ENTRY)); + readOnlyFootprint.push_back( + contractDataKey(contractID, makeSymbol("key2"), + ContractDataType::PERSISTENT, DATA_ENTRY)); putWithFootprint("key2", 888888, readOnlyFootprint, {}, 1000, false, - MERGEABLE, std::nullopt); - delWithFootprint("key2", readOnlyFootprint, {}, false, MERGEABLE); + ContractDataType::PERSISTENT, std::nullopt); + delWithFootprint("key2", readOnlyFootprint, {}, false, + ContractDataType::PERSISTENT); // Failure: insufficient write bytes - putWithFootprint("key2", 88888, contractKeys, - {contractDataKey(contractID, makeSymbol("key2"), - MERGEABLE, DATA_ENTRY)}, - 1, false, MERGEABLE, std::nullopt); + putWithFootprint( + "key2", 88888, contractKeys, + {contractDataKey(contractID, makeSymbol("key2"), + ContractDataType::PERSISTENT, DATA_ENTRY)}, + 1, false, ContractDataType::PERSISTENT, std::nullopt); - put("key1", 9, MERGEABLE); - put("key2", UINT64_MAX, MERGEABLE); + put("key1", 9, ContractDataType::PERSISTENT); + put("key2", UINT64_MAX, ContractDataType::PERSISTENT); - del("key1", MERGEABLE); - del("key2", MERGEABLE); + del("key1", ContractDataType::PERSISTENT); + del("key2", ContractDataType::PERSISTENT); } SorobanNetworkConfig refConfig; @@ -685,10 +691,11 @@ TEST_CASE("contract storage", "[tx][soroban]") refConfig.maxContractDataEntrySizeBytes() = 1; app->getLedgerManager().setSorobanNetworkConfig(refConfig); // this fails due to the contract code itself exceeding the entry limit - putWithFootprint("key2", 2, contractKeys, - {contractDataKey(contractID, makeSymbol("key2"), - MERGEABLE, DATA_ENTRY)}, - 1000, false, MERGEABLE, std::nullopt); + putWithFootprint( + "key2", 2, contractKeys, + {contractDataKey(contractID, makeSymbol("key2"), + ContractDataType::PERSISTENT, DATA_ENTRY)}, + 1000, false, ContractDataType::PERSISTENT, std::nullopt); } SECTION("Same ScVal key, different types") @@ -697,22 +704,21 @@ TEST_CASE("contract storage", "[tx][soroban]") uint64_t uniqueVal = 0; uint64_t recreatableVal = 1; uint64_t temporaryVal = 2; - put("key", uniqueVal, EXCLUSIVE); - put("key", recreatableVal, MERGEABLE); + put("key", uniqueVal, ContractDataType::PERSISTENT); put("key", temporaryVal, TEMPORARY); auto uniqueScVal = makeU64(uniqueVal); auto recreatableScVal = makeU64(recreatableVal); auto temporaryScVal = makeU64(temporaryVal); auto keySymbol = makeSymbol("key"); - checkContractData(keySymbol, EXCLUSIVE, &uniqueScVal); - checkContractData(keySymbol, MERGEABLE, &recreatableScVal); + checkContractData(keySymbol, ContractDataType::PERSISTENT, + &uniqueScVal); checkContractData(keySymbol, TEMPORARY, &temporaryScVal); - put("key2", 3, EXCLUSIVE); + put("key2", 3, ContractDataType::PERSISTENT); auto key2Symbol = makeSymbol("key2"); auto uniqueScVal2 = makeU64(3); - checkContractData(key2Symbol, EXCLUSIVE, &uniqueScVal2); - checkContractData(key2Symbol, MERGEABLE, nullptr); + checkContractData(key2Symbol, ContractDataType::PERSISTENT, + &uniqueScVal2); checkContractData(key2Symbol, TEMPORARY, nullptr); } @@ -722,8 +728,7 @@ TEST_CASE("contract storage", "[tx][soroban]") SECTION("Enforce rent minimums") { - put("unique", 0, EXCLUSIVE); - put("recreateable", 0, MERGEABLE); + put("unique", 0, ContractDataType::PERSISTENT); put("temp", 0, TEMPORARY); auto expectedTempExpiration = @@ -731,42 +736,42 @@ TEST_CASE("contract storage", "[tx][soroban]") auto expectedRestorableExpiration = stateExpirationSettings.minRestorableEntryExpiration + lcl; - checkContractDataExpiration("unique", EXCLUSIVE, - expectedRestorableExpiration); - checkContractDataExpiration("recreateable", MERGEABLE, + checkContractDataExpiration("unique", ContractDataType::PERSISTENT, expectedRestorableExpiration); checkContractDataExpiration("temp", TEMPORARY, expectedTempExpiration); } SECTION("autobump") { - put("rw", 0, EXCLUSIVE); - put("ro", 0, EXCLUSIVE); + put("rw", 0, ContractDataType::PERSISTENT); + put("ro", 0, ContractDataType::PERSISTENT); uint32_t flags = NO_AUTOBUMP; - put("nobump", 0, EXCLUSIVE, flags); + put("nobump", 0, ContractDataType::PERSISTENT, flags); auto readOnlySet = contractKeys; readOnlySet.emplace_back(contractDataKey(contractID, makeSymbol("ro"), - EXCLUSIVE, DATA_ENTRY)); + ContractDataType::PERSISTENT, + DATA_ENTRY)); - auto readWriteSet = {contractDataKey(contractID, makeSymbol("nobump"), - EXCLUSIVE, DATA_ENTRY), - contractDataKey(contractID, makeSymbol("rw"), - EXCLUSIVE, DATA_ENTRY)}; + auto readWriteSet = { + contractDataKey(contractID, makeSymbol("nobump"), + ContractDataType::PERSISTENT, DATA_ENTRY), + contractDataKey(contractID, makeSymbol("rw"), + ContractDataType::PERSISTENT, DATA_ENTRY)}; // Invoke contract with all keys in footprint putWithFootprint("rw", 1, readOnlySet, readWriteSet, 1000, true, - EXCLUSIVE, std::nullopt); + ContractDataType::PERSISTENT, std::nullopt); auto expectedInitialExpiration = stateExpirationSettings.minRestorableEntryExpiration + lcl; - checkContractDataExpiration("rw", EXCLUSIVE, + checkContractDataExpiration("rw", ContractDataType::PERSISTENT, expectedInitialExpiration + autoBump); - checkContractDataExpiration("ro", EXCLUSIVE, + checkContractDataExpiration("ro", ContractDataType::PERSISTENT, expectedInitialExpiration + autoBump); - checkContractDataExpiration("nobump", EXCLUSIVE, + checkContractDataExpiration("nobump", ContractDataType::PERSISTENT, expectedInitialExpiration, flags); // Contract instance and WASM should have minimum life and 4 invocations @@ -786,98 +791,40 @@ TEST_CASE("contract storage", "[tx][soroban]") // function SECTION("manual bump") { - put("key", 0, EXCLUSIVE); - bump("key", EXCLUSIVE, 10'000); - checkContractDataExpiration("key", EXCLUSIVE, 10'000 + lcl); + put("key", 0, ContractDataType::PERSISTENT); + bump("key", ContractDataType::PERSISTENT, 10'000); + checkContractDataExpiration("key", ContractDataType::PERSISTENT, + 10'000 + lcl); // Expiration already above 5'000, should be a nop (other than autobump) - bump("key", EXCLUSIVE, 5'000); - checkContractDataExpiration("key", EXCLUSIVE, 10'000 + autoBump + lcl); + bump("key", ContractDataType::PERSISTENT, 5'000); + checkContractDataExpiration("key", ContractDataType::PERSISTENT, + 10'000 + autoBump + lcl); } SECTION("max expiration") { // Check that manual bump doesn't go over max - put("key", 0, EXCLUSIVE); - bump("key", EXCLUSIVE, UINT32_MAX); + put("key", 0, ContractDataType::PERSISTENT); + bump("key", ContractDataType::PERSISTENT, UINT32_MAX); auto maxExpiration = stateExpirationSettings.maxEntryExpiration + lcl; - checkContractDataExpiration("key", EXCLUSIVE, maxExpiration); + checkContractDataExpiration("key", ContractDataType::PERSISTENT, + maxExpiration); // Manual bump to almost max, then autobump to check that autobump // doesn't go over max - put("key2", 0, EXCLUSIVE); - bump("key2", EXCLUSIVE, stateExpirationSettings.maxEntryExpiration - 1); - checkContractDataExpiration("key2", EXCLUSIVE, maxExpiration - 1); + put("key2", 0, ContractDataType::PERSISTENT); + bump("key2", ContractDataType::PERSISTENT, + stateExpirationSettings.maxEntryExpiration - 1); + checkContractDataExpiration("key2", ContractDataType::PERSISTENT, + maxExpiration - 1); // Autobump should only add a single ledger to bring expiration to max - put("key2", 1, EXCLUSIVE); - checkContractDataExpiration("key2", EXCLUSIVE, maxExpiration); + put("key2", 1, ContractDataType::PERSISTENT); + checkContractDataExpiration("key2", ContractDataType::PERSISTENT, + maxExpiration); } - - // WIP - - // SECTION("read-only bumps use EXPIRATION_EXTENSION") - // { - // put("ro", 0, EXCLUSIVE); - - // // Create a second entry, but put "key" in the readonly set. Check - // ltx - // // before commiting to make sure EXPIRATION_EXTENSION is written - // instead - // // of a DATA_ENTRY - // auto keySymbol = makeSymbol("key2"); - // auto valU64 = makeU64(0); - // auto readOnly = contractKeys; - // readOnly.emplace_back( - // contractDataKey(contractID, makeSymbol("ro"), EXCLUSIVE, - // DATA_ENTRY)); - - // auto [tx, ltx, txm] = createTx( - // readOnly, - // {contractDataKey(contractID, keySymbol, EXCLUSIVE, DATA_ENTRY)}, - // 1000, {makeContractAddress(contractID), - // makeSymbol("put_exclusive"), keySymbol, valU64, makeVoid()}); - - // REQUIRE(tx->apply(*app, *ltx, *txm)); - - // auto expectedExpiration = - // stateExpirationSettings.minRestorableEntryExpiration + lcl + - // autoBump; - - // std::vector init; - // std::vector live; - // std::vector dead; - // ltx->getAllEntries(init, live, dead); - - // auto roSymbol = makeSymbol("ro"); - // auto dataKey = - // contractDataKey(contractID, roSymbol, EXCLUSIVE, DATA_ENTRY); - // auto extKey = - // contractDataKey(contractID, roSymbol, EXCLUSIVE, - // EXPIRATION_EXTENSION); - - // // EXPIRATION_EXTENSION should never be init - // for (auto const& e : init) - // { - // auto k = LedgerEntryKey(e); - // REQUIRE((k != dataKey && k != extKey)); - // } - - // bool foundExtension = false; - // for (auto const& e : live) - // { - // auto k = LedgerEntryKey(e); - // REQUIRE(k != dataKey); - // if (k == extKey) - // { - // foundExtension = true; - // REQUIRE(getExpirationLedger(e) == expectedExpiration); - // } - // } - - // REQUIRE(foundExtension); - // } } TEST_CASE("failed invocation with diagnostics", "[tx][soroban]") @@ -895,12 +842,12 @@ TEST_CASE("failed invocation with diagnostics", "[tx][soroban]") auto const addI32Wasm = rust_bridge::get_test_wasm_add_i32(); auto contractKeys = deployContractWithSourceAccount(*app, addI32Wasm); - auto const& contractID = contractKeys[0].contractData().contractID; + auto const& contractID = contractKeys[0].contractData().contract; auto sc1 = makeI32(7); auto scMax = makeI32(INT32_MAX); - SCVec parameters = {makeContractAddress(contractID), makeSymbol("add"), sc1, - scMax}; + SCVec parameters = {makeContractAddressSCVal(contractID), makeSymbol("add"), + sc1, scMax}; Operation op; op.body.type(INVOKE_HOST_FUNCTION); @@ -948,7 +895,7 @@ TEST_CASE("complex contract", "[tx][soroban]") auto const complexWasm = rust_bridge::get_test_wasm_complex(); auto contractKeys = deployContractWithSourceAccount(*app, complexWasm); - auto const& contractID = contractKeys[0].contractData().contractID; + auto const& contractID = contractKeys[0].contractData().contract; auto scFunc = makeSymbol("go"); @@ -956,11 +903,11 @@ TEST_CASE("complex contract", "[tx][soroban]") op.body.type(INVOKE_HOST_FUNCTION); auto& ihf = op.body.invokeHostFunctionOp().hostFunction; ihf.type(HOST_FUNCTION_TYPE_INVOKE_CONTRACT); - ihf.invokeContract() = {makeContractAddress(contractID), scFunc}; + ihf.invokeContract() = {makeContractAddressSCVal(contractID), scFunc}; // Contract writes a single `data` CONTRACT_DATA entry. LedgerKey dataKey(LedgerEntryType::CONTRACT_DATA); - dataKey.contractData().contractID = contractID; + dataKey.contractData().contract = contractID; dataKey.contractData().key = makeSymbol("data"); SorobanResources resources; @@ -1047,7 +994,7 @@ TEST_CASE("Stellar asset contract XLM transfer", "[tx][soroban]") CONTRACT_ID_PREIMAGE_FROM_ASSET); preImage.contractID().contractIDPreimage.fromAsset() = xlm; preImage.contractID().networkID = app->getNetworkID(); - auto contractID = xdrSha256(preImage); + auto contractID = makeContractAddress(xdrSha256(preImage)); Operation createOp; createOp.body.type(INVOKE_HOST_FUNCTION); @@ -1060,34 +1007,37 @@ TEST_CASE("Stellar asset contract XLM transfer", "[tx][soroban]") createContractArgs.contractIDPreimage.type(CONTRACT_ID_PREIMAGE_FROM_ASSET); createContractArgs.contractIDPreimage.fromAsset() = xlm; createContractArgs.executable = exec; + SorobanResources createResources; createResources.instructions = 200'000; createResources.readBytes = 1000; createResources.writeBytes = 1000; createResources.extendedMetaDataSizeBytes = 3000; - { - LedgerFootprint lfp1; - auto key1 = LedgerKey(CONTRACT_DATA); - key1.contractData().contractID = contractID; - key1.contractData().key = makeSymbol( - "METADATA"); // TODO:WHY DOES THIS PASS WITHOUT THE TYPE SPECIFIED - - auto key2 = LedgerKey(CONTRACT_DATA); - key2.contractData().contractID = contractID; - SCVec vec = {makeSymbol("AssetInfo")}; - SCVal vecKey(SCValType::SCV_VEC); - vecKey.vec().activate() = vec; - key2.contractData().key = vecKey; - - SCVal scContractSourceRefKey( - SCValType::SCV_LEDGER_KEY_CONTRACT_EXECUTABLE); - auto key3 = LedgerKey(CONTRACT_DATA); - key3.contractData().contractID = contractID; - key3.contractData().key = scContractSourceRefKey; - - lfp1.readWrite = {key1, key2, key3}; - createResources.footprint = lfp1; - } + + auto metadataKey = LedgerKey(CONTRACT_DATA); + metadataKey.contractData().contract = contractID; + metadataKey.contractData().key = makeSymbol("METADATA"); + metadataKey.contractData().type = ContractDataType::PERSISTENT; + metadataKey.contractData().leType = DATA_ENTRY; + + LedgerKey assetInfoLedgerKey(CONTRACT_DATA); + assetInfoLedgerKey.contractData().contract = contractID; + SCVec assetInfo = {makeSymbol("AssetInfo")}; + SCVal assetInfoSCVal(SCValType::SCV_VEC); + assetInfoSCVal.vec().activate() = assetInfo; + assetInfoLedgerKey.contractData().key = assetInfoSCVal; + assetInfoLedgerKey.contractData().type = ContractDataType::PERSISTENT; + assetInfoLedgerKey.contractData().leType = DATA_ENTRY; + + LedgerKey contractExecutableKey(CONTRACT_DATA); + contractExecutableKey.contractData().contract = contractID; + contractExecutableKey.contractData().key = + SCVal(SCValType::SCV_LEDGER_KEY_CONTRACT_EXECUTABLE); + contractExecutableKey.contractData().type = ContractDataType::PERSISTENT; + contractExecutableKey.contractData().leType = DATA_ENTRY; + + createResources.footprint.readWrite = {contractExecutableKey, metadataKey, + assetInfoLedgerKey}; { // submit operation @@ -1108,25 +1058,21 @@ TEST_CASE("Stellar asset contract XLM transfer", "[tx][soroban]") SCVal from(SCV_ADDRESS); from.address() = fromAccount; - SCAddress toContract(SC_ADDRESS_TYPE_CONTRACT); - toContract.contractId() = sha256("contract"); - SCVal to(SCV_ADDRESS); - to.address() = toContract; + SCVal to = + makeContractAddressSCVal(makeContractAddress(sha256("contract"))); auto fn = makeSymbol("transfer"); Operation transfer; transfer.body.type(INVOKE_HOST_FUNCTION); auto& ihf = transfer.body.invokeHostFunctionOp().hostFunction; ihf.type(HOST_FUNCTION_TYPE_INVOKE_CONTRACT); - ihf.invokeContract() = {makeContractAddress(contractID), fn, from, to, + ihf.invokeContract() = {makeContractAddressSCVal(contractID), fn, from, to, makeI128(10)}; // build auth SorobanAuthorizedInvocation ai; ai.function.type(SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN); - SCAddress contractAddress(SC_ADDRESS_TYPE_CONTRACT); - contractAddress.contractId() = contractID; - ai.function.contractFn().contractAddress = contractAddress; + ai.function.contractFn().contractAddress = contractID; ai.function.contractFn().functionName = fn.sym(); ai.function.contractFn().args = {from, to, makeI128(10)}; @@ -1140,61 +1086,23 @@ TEST_CASE("Stellar asset contract XLM transfer", "[tx][soroban]") resources.readBytes = 2000; resources.writeBytes = 1072; resources.extendedMetaDataSizeBytes = 3000; - { - auto key1 = LedgerKey(CONTRACT_DATA); - key1.contractData().contractID = contractID; - key1.contractData().key = makeSymbol("METADATA"); - key1.contractData().type = MERGEABLE; - key1.contractData().leType = DATA_ENTRY; - - auto key2 = LedgerKey(CONTRACT_DATA); - key2.contractData().contractID = contractID; - SCVec assetInfo = {makeSymbol("AssetInfo")}; - SCVal assetInfoSCVal(SCValType::SCV_VEC); - assetInfoSCVal.vec().activate() = assetInfo; - key2.contractData().key = assetInfoSCVal; - key2.contractData().type = EXCLUSIVE; - key2.contractData().leType = DATA_ENTRY; - - SCVal scContractSourceRefKey( - SCValType::SCV_LEDGER_KEY_CONTRACT_EXECUTABLE); - auto key3 = LedgerKey(CONTRACT_DATA); - key3.contractData().contractID = contractID; - key3.contractData().key = scContractSourceRefKey; - key3.contractData().type = EXCLUSIVE; - key3.contractData().leType = DATA_ENTRY; - - LedgerKey accountKey(ACCOUNT); - accountKey.account().accountID = root.getPublicKey(); - - // build balance key - LedgerKey key4(ACCOUNT); - key4.account().accountID = root.getPublicKey(); - - auto key5 = LedgerKey(CONTRACT_DATA); - key5.contractData().contractID = contractID; - - SCVec balance = {makeSymbol("Balance"), to}; - SCVal balanceKey(SCValType::SCV_VEC); - balanceKey.vec().activate() = balance; - key5.contractData().key = balanceKey; - key5.contractData().type = MERGEABLE; - key5.contractData().leType = DATA_ENTRY; - - SCNonceKey nonce; - nonce.nonce_address = fromAccount; - SCVal nonceKey(SCV_LEDGER_KEY_NONCE); - nonceKey.nonce_key() = nonce; - - // build nonce key - auto key6 = LedgerKey(CONTRACT_DATA); - key6.contractData().contractID = contractID; - key6.contractData().key = nonceKey; - key6.contractData().type = EXCLUSIVE; - key6.contractData().leType = DATA_ENTRY; - - resources.footprint.readWrite = {key1, key2, key3, key4, key5, key6}; - } + + LedgerKey accountLedgerKey(ACCOUNT); + accountLedgerKey.account().accountID = root.getPublicKey(); + + LedgerKey balanceLedgerKey(CONTRACT_DATA); + balanceLedgerKey.contractData().contract = contractID; + SCVec balance = {makeSymbol("Balance"), to}; + SCVal balanceKey(SCValType::SCV_VEC); + balanceKey.vec().activate() = balance; + balanceLedgerKey.contractData().key = balanceKey; + balanceLedgerKey.contractData().type = ContractDataType::PERSISTENT; + balanceLedgerKey.contractData().leType = DATA_ENTRY; + + resources.footprint.readOnly = {metadataKey, assetInfoLedgerKey, + contractExecutableKey}; + + resources.footprint.readWrite = {accountLedgerKey, balanceLedgerKey}; { // submit operation diff --git a/src/transactions/test/TxEnvelopeTests.cpp b/src/transactions/test/TxEnvelopeTests.cpp index e1e63b6206..c319d27d74 100644 --- a/src/transactions/test/TxEnvelopeTests.cpp +++ b/src/transactions/test/TxEnvelopeTests.cpp @@ -2689,8 +2689,8 @@ TEST_CASE("soroban transaction validation", "[tx][envelope][soroban]") SECTION("success with default limits") { resources.footprint.readOnly.back() = contractDataKey( - Hash{}, makeSymbol("abcdefghijklmnopqrstuvwxyz012345"), - MERGEABLE, DATA_ENTRY); + SCAddress{}, makeSymbol("abcdefghijklmnopqrstuvwxyz012345"), + ContractDataType::PERSISTENT, DATA_ENTRY); auto tx = sorobanTransactionFrameFromOps(app->getNetworkID(), root, {op}, {}, resources, 3'500'000, 100'000); @@ -2701,8 +2701,8 @@ TEST_CASE("soroban transaction validation", "[tx][envelope][soroban]") { resources.footprint.readOnly.resize(1); resources.footprint.readOnly.back() = contractDataKey( - Hash{}, makeSymbol("abcdefghijklmnopqrstuvwxyz012345"), - MERGEABLE, DATA_ENTRY); + SCAddress{}, makeSymbol("abcdefghijklmnopqrstuvwxyz012345"), + ContractDataType::PERSISTENT, DATA_ENTRY); refConfig.maxContractDataKeySizeBytes() = 64; app->getLedgerManager().setSorobanNetworkConfig(refConfig); auto tx = sorobanTransactionFrameFromOps(app->getNetworkID(), root, @@ -2715,8 +2715,8 @@ TEST_CASE("soroban transaction validation", "[tx][envelope][soroban]") { resources.footprint.readWrite.resize(1); resources.footprint.readWrite.back() = contractDataKey( - Hash{}, makeSymbol("abcdefghijklmnopqrstuvwxyz012345"), - MERGEABLE, DATA_ENTRY); + SCAddress{}, makeSymbol("abcdefghijklmnopqrstuvwxyz012345"), + ContractDataType::PERSISTENT, DATA_ENTRY); refConfig.maxContractDataKeySizeBytes() = 64; app->getLedgerManager().setSorobanNetworkConfig(refConfig); auto tx = sorobanTransactionFrameFromOps(app->getNetworkID(), root, diff --git a/src/util/types.cpp b/src/util/types.cpp index 6e2e0c4c70..17bfd47ceb 100644 --- a/src/util/types.cpp +++ b/src/util/types.cpp @@ -53,7 +53,7 @@ LedgerEntryKey(LedgerEntry const& e) #ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION case CONTRACT_DATA: - k.contractData().contractID = d.contractData().contractID; + k.contractData().contract = d.contractData().contract; k.contractData().key = d.contractData().key; k.contractData().type = d.contractData().type; k.contractData().leType = d.contractData().body.leType(); From a5fced5337564427b97cb97393d06add96632f36 Mon Sep 17 00:00:00 2001 From: Siddharth Suresh Date: Tue, 20 Jun 2023 13:37:06 -0700 Subject: [PATCH 2/2] Update ledger close meta --- .../ledger-close-meta-v1-protocol-20.json | 804 +++++++++--------- 1 file changed, 402 insertions(+), 402 deletions(-) diff --git a/src/testdata/ledger-close-meta-v1-protocol-20.json b/src/testdata/ledger-close-meta-v1-protocol-20.json index fa6512fb2d..b482017310 100644 --- a/src/testdata/ledger-close-meta-v1-protocol-20.json +++ b/src/testdata/ledger-close-meta-v1-protocol-20.json @@ -3,24 +3,24 @@ "v": 1, "v1": { "ledgerHeader": { - "hash": "1b0a8a706401efeb11546b00c29aaf21399d0575121e37e3da7e38f6b9d5c9f3", + "hash": "adff3e23543ebda3336a627fbdf9ae0ac79b6ebc5cb8973532abc89232cbb773", "header": { "ledgerVersion": 20, - "previousLedgerHash": "1b9920675aa4a36c4f3d094d56d2e74bf854916f2f4496d199aa35892a21d322", + "previousLedgerHash": "c5188dcd46434af3412fe6f3f8b4cc3b247d5da8bd710eafed01dc68672b9401", "scpValue": { - "txSetHash": "2f4b78f0ed239aa96d25d7fb14e4804be9d77df54115f262271a6b756903c40a", + "txSetHash": "c841c840ce21860b6ab8d0a4cb026a4e1a59bbd3b73b7264b41c0f620c43239e", "closeTime": 0, "upgrades": [], "ext": { "v": "STELLAR_VALUE_SIGNED", "lcValueSignature": { "nodeID": "GDDOUW25MRFLNXQMN3OODP6JQEXSGLMHAFZV4XPQ2D3GA4QFIDMEJG2O", - "signature": "96116fb57c31643145c7c64caa4c02001fcd0c09ee1c4b78d8ac56b9dfbbf8e24af2d6c303b9332af50c7f255cb90ce2726b01470c6e214b60a1235d77fbc40d" + "signature": "957b35f4da81383c63faa5f7b5f5c4d93566aa1ec8a98e9b8d9441c65b29738cb5970b8327626ad683a254cb0760a4e1b2d8286b6dc240dcaac23f621d6a490f" } } }, - "txSetResultHash": "cf65fee29665ff0c2a6910b24c420a487a7416ccd79c683b48aac1d45ad21faa", - "bucketListHash": "0a20a445cdeff7b2e95a1f4efcd9093641c3e97bff19de239551ab1e8712ad4f", + "txSetResultHash": "cd1398cda325d4eada631301e6501421cda30fd0b43da3e5d0ffb26caf073b0a", + "bucketListHash": "cad4a9a9306753682ab157d12d102aa5669716b6c78fcbc131e4eed9dcb4421c", "ledgerSeq": 6, "totalCoins": 1000000000000000000, "feePool": 800, @@ -46,7 +46,7 @@ "txSet": { "v": 1, "v1TxSet": { - "previousLedgerHash": "1b9920675aa4a36c4f3d094d56d2e74bf854916f2f4496d199aa35892a21d322", + "previousLedgerHash": "c5188dcd46434af3412fe6f3f8b4cc3b247d5da8bd710eafed01dc68672b9401", "phases": [ { "v": 0, @@ -182,22 +182,43 @@ "txProcessing": [ { "result": { - "transactionHash": "0db2322d85e9d8ea2421559922bb6107429650ebdad304c907480853d465c10d", + "transactionHash": "66efe325ead9f52082c8908b7813bd96793fd5ff0f1e50fdc50b23f68938dd4d", "result": { - "feeCharged": 100, + "feeCharged": 300, "result": { - "code": "txSUCCESS", - "results": [ - { - "code": "opINNER", - "tr": { - "type": "PAYMENT", - "paymentResult": { - "code": "PAYMENT_SUCCESS" - } + "code": "txFEE_BUMP_INNER_SUCCESS", + "innerResultPair": { + "transactionHash": "5ab197acffd4b32d320df39b2b1f76246e2279fa8070c6c690cca1343e5e7e0b", + "result": { + "feeCharged": 200, + "result": { + "code": "txSUCCESS", + "results": [ + { + "code": "opINNER", + "tr": { + "type": "PAYMENT", + "paymentResult": { + "code": "PAYMENT_SUCCESS" + } + } + }, + { + "code": "opINNER", + "tr": { + "type": "PAYMENT", + "paymentResult": { + "code": "PAYMENT_SUCCESS" + } + } + } + ] + }, + "ext": { + "v": 0 } } - ] + } }, "ext": { "v": 0 @@ -208,13 +229,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 4, + "lastModifiedLedgerSeq": 3, "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989700, - "seqNum": 3, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 400000000, + "seqNum": 12884901888, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -222,31 +243,7 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 4, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -262,9 +259,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 3, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 399999700, + "seqNum": 12884901888, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -272,31 +269,7 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 4, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -320,9 +293,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 3, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 399999700, + "seqNum": 12884901888, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -330,31 +303,7 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 4, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -370,9 +319,61 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 4, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 399999700, + "seqNum": 12884901888, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], + "ext": { + "v": 0 + } + } + }, + "ext": { + "v": 0 + } + } + }, + { + "type": "LEDGER_ENTRY_STATE", + "state": { + "lastModifiedLedgerSeq": 4, + "data": { + "type": "ACCOUNT", + "account": { + "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", + "balance": 200010000, + "seqNum": 17179869184, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], + "ext": { + "v": 0 + } + } + }, + "ext": { + "v": 0 + } + } + }, + { + "type": "LEDGER_ENTRY_UPDATED", + "updated": { + "lastModifiedLedgerSeq": 6, + "data": { + "type": "ACCOUNT", + "account": { + "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", + "balance": 200010000, + "seqNum": 17179869185, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -420,45 +421,20 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 6, + "lastModifiedLedgerSeq": 5, "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 4, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "type": "TRUSTLINE", + "trustLine": { + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 0, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 6, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -472,43 +448,18 @@ "updated": { "lastModifiedLedgerSeq": 6, "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999988600, - "seqNum": 4, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "type": "TRUSTLINE", + "trustLine": { + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 50, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 6, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -516,49 +467,28 @@ "v": 0 } } - }, + } + ] + }, + { + "changes": [ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 5, + "lastModifiedLedgerSeq": 6, "data": { - "type": "ACCOUNT", - "account": { + "type": "TRUSTLINE", + "trustLine": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 399999900, - "seqNum": 8589934593, - "numSubEntries": 1, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 50, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 5, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -572,43 +502,18 @@ "updated": { "lastModifiedLedgerSeq": 6, "data": { - "type": "ACCOUNT", - "account": { + "type": "TRUSTLINE", + "trustLine": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 400000900, - "seqNum": 8589934593, - "numSubEntries": 1, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 100, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 5, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -637,43 +542,22 @@ }, { "result": { - "transactionHash": "66efe325ead9f52082c8908b7813bd96793fd5ff0f1e50fdc50b23f68938dd4d", + "transactionHash": "0db2322d85e9d8ea2421559922bb6107429650ebdad304c907480853d465c10d", "result": { - "feeCharged": 300, + "feeCharged": 100, "result": { - "code": "txFEE_BUMP_INNER_SUCCESS", - "innerResultPair": { - "transactionHash": "5ab197acffd4b32d320df39b2b1f76246e2279fa8070c6c690cca1343e5e7e0b", - "result": { - "feeCharged": 200, - "result": { - "code": "txSUCCESS", - "results": [ - { - "code": "opINNER", - "tr": { - "type": "PAYMENT", - "paymentResult": { - "code": "PAYMENT_SUCCESS" - } - } - }, - { - "code": "opINNER", - "tr": { - "type": "PAYMENT", - "paymentResult": { - "code": "PAYMENT_SUCCESS" - } - } - } - ] - }, - "ext": { - "v": 0 + "code": "txSUCCESS", + "results": [ + { + "code": "opINNER", + "tr": { + "type": "PAYMENT", + "paymentResult": { + "code": "PAYMENT_SUCCESS" + } } } - } + ] }, "ext": { "v": 0 @@ -684,13 +568,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 3, + "lastModifiedLedgerSeq": 4, "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 400000000, - "seqNum": 12884901888, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989700, + "seqNum": 3, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -698,7 +582,31 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 4, + "seqTime": 0 + } + } + } + } + } } } }, @@ -714,9 +622,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 399999700, - "seqNum": 12884901888, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 3, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -724,7 +632,31 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 4, + "seqTime": 0 + } + } + } + } + } } } }, @@ -748,9 +680,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 399999700, - "seqNum": 12884901888, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 3, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -758,59 +690,31 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 0 - } - } - }, - "ext": { - "v": 0 - } - } - }, - { - "type": "LEDGER_ENTRY_UPDATED", - "updated": { - "lastModifiedLedgerSeq": 6, - "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 399999700, - "seqNum": 12884901888, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], - "ext": { - "v": 0 - } - } - }, - "ext": { - "v": 0 - } - } - }, - { - "type": "LEDGER_ENTRY_STATE", - "state": { - "lastModifiedLedgerSeq": 4, - "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", - "balance": 200010000, - "seqNum": 17179869184, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], - "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 4, + "seqTime": 0 + } + } + } + } + } } } }, @@ -826,9 +730,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", - "balance": 200010000, - "seqNum": 17179869185, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 4, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -876,20 +780,45 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 5, + "lastModifiedLedgerSeq": 6, "data": { - "type": "TRUSTLINE", - "trustLine": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 0, - "limit": 100, - "flags": 1, + "type": "ACCOUNT", + "account": { + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 4, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 6, + "seqTime": 0 + } + } + } + } + } } } }, @@ -903,18 +832,43 @@ "updated": { "lastModifiedLedgerSeq": 6, "data": { - "type": "TRUSTLINE", - "trustLine": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 50, - "limit": 100, - "flags": 1, + "type": "ACCOUNT", + "account": { + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999988600, + "seqNum": 4, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 6, + "seqTime": 0 + } + } + } + } + } } } }, @@ -922,28 +876,49 @@ "v": 0 } } - } - ] - }, - { - "changes": [ + }, { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 6, + "lastModifiedLedgerSeq": 5, "data": { - "type": "TRUSTLINE", - "trustLine": { + "type": "ACCOUNT", + "account": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 50, - "limit": 100, - "flags": 1, + "balance": 399999900, + "seqNum": 8589934593, + "numSubEntries": 1, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 5, + "seqTime": 0 + } + } + } + } + } } } }, @@ -957,18 +932,43 @@ "updated": { "lastModifiedLedgerSeq": 6, "data": { - "type": "TRUSTLINE", - "trustLine": { + "type": "ACCOUNT", + "account": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 100, - "limit": 100, - "flags": 1, + "balance": 400000900, + "seqNum": 8589934593, + "numSubEntries": 1, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 5, + "seqTime": 0 + } + } + } + } + } } } },