From fc02733d5bd0e0284c82271a7bc0d5b88a31e0d5 Mon Sep 17 00:00:00 2001 From: Dmytro Kozhevin Date: Wed, 23 Aug 2023 14:15:05 -0400 Subject: [PATCH] Refactor host to support the new expiration ledger approach. - Pass expiration ledgers as side input to the ledger entries (temporarily set `expiration_ledger_seq` to 0 until it's removed from XDR) - Get rid of the autobump support. --- Cargo.lock | 508 +++++++++++------- Cargo.toml | 2 +- soroban-env-common/env.json | 7 +- soroban-env-common/src/meta.rs | 2 +- soroban-env-host/src/auth.rs | 17 +- soroban-env-host/src/e2e_invoke.rs | 91 ++-- soroban-env-host/src/host.rs | 140 ++--- soroban-env-host/src/host/comparison.rs | 87 +-- soroban-env-host/src/host/conversion.rs | 9 +- soroban-env-host/src/host/data_helper.rs | 63 +-- soroban-env-host/src/host/declared_size.rs | 25 +- soroban-env-host/src/host/frame.rs | 29 +- .../src/host/ledger_info_helper.rs | 22 +- soroban-env-host/src/host/metered_clone.rs | 20 +- soroban-env-host/src/host_object.rs | 36 +- .../src/native_contract/testutils.rs | 1 + .../src/native_contract/token/admin.rs | 1 - .../src/native_contract/token/allowance.rs | 1 - .../src/native_contract/token/asset_info.rs | 1 - .../src/native_contract/token/balance.rs | 47 +- .../src/native_contract/token/metadata.rs | 1 - soroban-env-host/src/storage.rs | 209 +++---- soroban-env-host/src/test/auth.rs | 10 +- soroban-env-host/src/test/complex.rs | 1 - soroban-env-host/src/test/ledger.rs | 1 - soroban-env-host/src/test/lifecycle.rs | 21 +- .../src/test/metering_benchmark.rs | 1 - soroban-env-host/src/test/prng.rs | 2 +- soroban-env-host/src/test/token.rs | 6 +- soroban-env-host/src/test/util.rs | 1 - soroban-test-wasms/wasm-workspace/Cargo.lock | 491 +++++++---------- .../opt/auth_test_contract.wasm | Bin 5711 -> 5754 bytes .../wasm-workspace/opt/example_add_f32.wasm | Bin 1066 -> 1102 bytes .../wasm-workspace/opt/example_add_i32.wasm | Bin 1013 -> 1049 bytes .../wasm-workspace/opt/example_alloc.wasm | Bin 2437 -> 2398 bytes .../wasm-workspace/opt/example_complex.wasm | Bin 1805 -> 1839 bytes .../opt/example_contract_data.wasm | Bin 3096 -> 3089 bytes .../opt/example_create_contract.wasm | Bin 712 -> 712 bytes .../wasm-workspace/opt/example_err.wasm | Bin 1055 -> 1055 bytes .../wasm-workspace/opt/example_fannkuch.wasm | Bin 1044 -> 1044 bytes .../wasm-workspace/opt/example_fib.wasm | Bin 360 -> 360 bytes .../wasm-workspace/opt/example_hostile.wasm | Bin 1928 -> 1953 bytes .../opt/example_invoke_contract.wasm | Bin 1956 -> 2000 bytes .../opt/example_linear_memory.wasm | Bin 851 -> 854 bytes .../opt/example_simple_account.wasm | Bin 2000 -> 1990 bytes .../opt/example_updateable_contract.wasm | Bin 601 -> 606 bytes .../wasm-workspace/opt/example_vec.wasm | Bin 596 -> 596 bytes .../soroban_write_upgrade_bytes_contract.wasm | Bin 645 -> 635 bytes .../opt/test_delegated_account.wasm | Bin 1993 -> 2019 bytes 49 files changed, 822 insertions(+), 1031 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 71db15cc9..77208aa2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -19,13 +19,19 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -46,9 +52,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "approx" @@ -74,7 +80,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -87,9 +93,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -120,9 +126,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.1" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "base64ct" @@ -136,6 +142,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "block-buffer" version = "0.10.4" @@ -166,14 +178,17 @@ dependencies = [ "num-bigint", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -183,12 +198,12 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", - "num-integer", "num-traits", "serde", "winapi", @@ -202,7 +217,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim 0.8.0", "textwrap", "unicode-width", @@ -211,20 +226,20 @@ dependencies = [ [[package]] name = "colored" -version = "2.0.0" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ - "atty", + "is-terminal", "lazy_static", - "winapi", + "windows-sys", ] [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "core-foundation-sys" @@ -234,9 +249,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -299,14 +314,14 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ "darling_core", "darling_macro", @@ -314,39 +329,48 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] name = "der" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +dependencies = [ + "serde", +] + [[package]] name = "derive_arbitrary" version = "1.3.1" @@ -355,7 +379,7 @@ checksum = "53e0efad4403bfc52dc201159c4b842a246a14b98c64b55dfd0f2d89729dfeb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] @@ -372,9 +396,9 @@ dependencies = [ [[package]] name = "dissimilar" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "210ec60ae7d710bed8683e333e9d2855a8a56a3e9892b38bad3bb0d4d29b0d5e" +checksum = "86e3bdc80eee6e16b2b6b0f87fbc98c04bee3455e35174c0de1a125d0688c632" [[package]] name = "downcast-rs" @@ -394,9 +418,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.16.7" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ "der", "digest", @@ -408,9 +432,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb04eee5d9d907f29e80ee6b0e78f7e2c82342c63e3580d8c4f69d9d5aad963" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ "pkcs8", "signature", @@ -432,9 +456,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -468,6 +492,33 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "ethnum" version = "1.3.2" @@ -508,9 +559,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[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", ] @@ -554,9 +605,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "group" @@ -575,6 +626,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "heck" version = "0.3.3" @@ -593,6 +650,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + [[package]] name = "hex" version = "0.4.3" @@ -619,9 +682,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -648,9 +711,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[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", @@ -663,7 +726,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", "serde", ] @@ -673,6 +747,17 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi 0.3.2", + "rustix", + "windows-sys", +] + [[package]] name = "itertools" version = "0.10.5" @@ -684,15 +769,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -734,9 +819,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libm" @@ -746,21 +831,24 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "linregress" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475015a7f8f017edb28d2e69813be23500ad4b32cfe3421c4148efc97324ee52" +checksum = "4de0b5f52a9f84544d268f5fabb71b38962d6aa3c6600b8bcd27d44ccf9c9c45" dependencies = [ "nalgebra", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "loom" @@ -781,7 +869,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -812,9 +900,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] @@ -827,9 +915,9 @@ checksum = "1fafa6961cabd9c63bcd77a45d7e3b7f3b552b70417831fb0f56db717e72407e" [[package]] name = "nalgebra" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" dependencies = [ "approx", "matrixmultiply", @@ -843,9 +931,9 @@ dependencies = [ [[package]] name = "nalgebra-macros" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ "proc-macro2", "quote", @@ -870,9 +958,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -881,9 +969,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -896,7 +984,7 @@ checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] @@ -922,9 +1010,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -947,23 +1035,23 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] name = "object" -version = "0.30.3" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "overload" @@ -973,15 +1061,15 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[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 = "perf-event" @@ -1004,9 +1092,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" [[package]] name = "pkcs8" @@ -1075,9 +1163,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.27" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1120,13 +1208,14 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "regex" -version = "1.8.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a59b5d8e97dee33696bf13c5ba8ab85341c002922fba050069326b9c498974" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.3.6", + "regex-syntax 0.7.4", ] [[package]] @@ -1138,6 +1227,17 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.4", +] + [[package]] name = "regex-syntax" version = "0.6.29" @@ -1146,9 +1246,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "rfc6979" @@ -1184,6 +1284,19 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -1192,15 +1305,15 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe_arch" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794821e4ccb0d9f979512f9c1973480123f9bd62a90d74ab0f9426fcf8f4a529" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" dependencies = [ "bytemuck", ] @@ -1213,9 +1326,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "sec1" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -1233,29 +1346,29 @@ checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -1264,14 +1377,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.0.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02d8aa6e3c385bf084924f660ce2a3a6bd333ba55b35e8590b321f35d88513" +checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237" dependencies = [ - "base64 0.21.1", + "base64 0.21.2", "chrono", "hex", - "indexmap", + "indexmap 1.9.3", + "indexmap 2.0.0", "serde", "serde_json", "serde_with_macros", @@ -1280,21 +1394,21 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.0.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070" +checksum = "2e6be15c453eb305019bfa438b1593c731f36a289a7853f7707ee29e870b3b3c" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -1345,9 +1459,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "soroban-bench-utils" @@ -1432,7 +1546,7 @@ dependencies = [ "serde", "serde_json", "stellar-xdr", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] @@ -1442,7 +1556,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] @@ -1452,7 +1566,7 @@ dependencies = [ "expect-test", "soroban-env-common", "wasm-encoder", - "wasmparser", + "wasmparser 0.106.0", "wasmprinter", ] @@ -1506,7 +1620,7 @@ dependencies = [ [[package]] name = "stellar-xdr" version = "0.0.17" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=e2a9cbf72d94941de1bde6ba34a38e1f49328567#e2a9cbf72d94941de1bde6ba34a38e1f49328567" +source = "git+https://github.com/stellar/rs-stellar-xdr?rev=936273b737b99d79eee7a28dd4823436d0bd0abb#936273b737b99d79eee7a28dd4823436d0bd0abb" dependencies = [ "arbitrary", "base64 0.13.1", @@ -1571,9 +1685,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -1628,22 +1742,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] @@ -1664,10 +1778,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.21" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" dependencies = [ + "deranged", "itoa", "serde", "time-core", @@ -1682,9 +1797,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" dependencies = [ "time-core", ] @@ -1706,17 +1821,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap", + "indexmap 2.0.0", "toml_datetime", "winnow", ] @@ -1741,7 +1856,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", ] [[package]] @@ -1806,9 +1921,9 @@ dependencies = [ [[package]] name = "tracy-client-sys" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d99f5fc382239d08b6bf05bb6206a585bfdb988c878f2499081d0f285ef7819" +checksum = "90e764693ea5a090fb9b0a33fe9d32aa52656ae7ccd9f820719d2d998677c2eb" dependencies = [ "cc", ] @@ -1827,9 +1942,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -1854,9 +1969,9 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[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", @@ -1889,9 +2004,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1899,24 +2014,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1924,22 +2039,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-encoder" @@ -1972,10 +2087,20 @@ version = "0.106.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d014e33793cab91655fa6349b0bc974984de106b2e0f6b0dfe6f6594b260624d" dependencies = [ - "indexmap", + "indexmap 1.9.3", "url", ] +[[package]] +name = "wasmparser" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad71036aada3f6b09251546e97e4f4f176dd6b41cf6fa55e7e0f65e86aec319a" +dependencies = [ + "indexmap 2.0.0", + "semver", +] + [[package]] name = "wasmparser-nostd" version = "0.100.1" @@ -1987,19 +2112,19 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.2.58" +version = "0.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c520299a0b5999adef4f063add9689e4559b3e4eb2688dbd63cc36ebb595841" +checksum = "eeb8cc41d341939dce08ee902b50e36cd35add940f6044c94b144e8f73fe07a6" dependencies = [ "anyhow", - "wasmparser", + "wasmparser 0.111.0", ] [[package]] name = "wide" -version = "0.7.9" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cd0496a71f3cc6bc4bf0ed91346426a5099e93d89807e663162dc5a1069ff65" +checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" dependencies = [ "bytemuck", "safe_arch", @@ -2046,10 +2171,19 @@ dependencies = [ ] [[package]] -name = "windows-targets" +name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -2062,51 +2196,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 92e3a77f7..56f4c7d38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ soroban-native-sdk-macros = { version = "0.0.17", path = "soroban-native-sdk-mac [workspace.dependencies.stellar-xdr] version = "0.0.17" git = "https://github.com/stellar/rs-stellar-xdr" -rev = "e2a9cbf72d94941de1bde6ba34a38e1f49328567" +rev = "936273b737b99d79eee7a28dd4823436d0bd0abb" default-features = false [workspace.dependencies.wasmi] diff --git a/soroban-env-common/env.json b/soroban-env-common/env.json index bf0167203..287ba778e 100644 --- a/soroban-env-common/env.json +++ b/soroban-env-common/env.json @@ -1237,14 +1237,9 @@ { "name": "t", "type": "StorageType" - }, - { - "name": "f", - "type": "Val" } ], - "return": "Void", - "docs": "If `f` is `Void`, then there will be no changes to flags for an existing entry, and none will be set if this is a new entry. Otherwise, `f` is parsed as a `u32`. If the value is 0, then all flags are cleared. If it's not 0, then flags will be set to the passed in value." + "return": "Void" }, { "export": "0", diff --git a/soroban-env-common/src/meta.rs b/soroban-env-common/src/meta.rs index 00d924fab..081dea213 100644 --- a/soroban-env-common/src/meta.rs +++ b/soroban-env-common/src/meta.rs @@ -42,7 +42,7 @@ pub const ENV_META_V0_SECTION_NAME: &str = "contractenvmetav0"; soroban_env_macros::generate_env_meta_consts!( ledger_protocol_version: 20, - pre_release_version: 55, + pre_release_version: 56, ); pub fn get_ledger_protocol_version(interface_version: u64) -> u32 { diff --git a/soroban-env-host/src/auth.rs b/soroban-env-host/src/auth.rs index fcb691018..af0698a34 100644 --- a/soroban-env-host/src/auth.rs +++ b/soroban-env-host/src/auth.rs @@ -4,10 +4,10 @@ use std::rc::Rc; use rand::Rng; use soroban_env_common::xdr::{ - ContractDataEntry, ContractDataEntryBody, ContractDataEntryData, CreateContractArgs, - HashIdPreimage, HashIdPreimageSorobanAuthorization, InvokeContractArgs, LedgerEntry, - LedgerEntryData, LedgerEntryExt, ScAddress, ScErrorCode, ScErrorType, ScNonceKey, ScVal, - SorobanAuthorizationEntry, SorobanAuthorizedFunction, SorobanCredentials, + ContractDataEntry, CreateContractArgs, HashIdPreimage, HashIdPreimageSorobanAuthorization, + InvokeContractArgs, LedgerEntry, LedgerEntryData, LedgerEntryExt, ScAddress, ScErrorCode, + ScErrorType, ScNonceKey, ScVal, SorobanAuthorizationEntry, SorobanAuthorizedFunction, + SorobanCredentials, }; use soroban_env_common::{AddressObject, Compare, Symbol, TryFromVal, TryIntoVal, Val, VecObject}; @@ -1776,16 +1776,12 @@ impl Host { &[address.into()], )); } - let body = ContractDataEntryBody::DataEntry(ContractDataEntryData { - val: ScVal::Void, - flags: 0, - }); let data = LedgerEntryData::ContractData(ContractDataEntry { contract: sc_address, key: nonce_key_scval, - body, - expiration_ledger_seq: expiration_ledger, + val: ScVal::Void, durability: xdr::ContractDataDurability::Temporary, + ext: xdr::ExtensionPoint::V0, }); let entry = LedgerEntry { last_modified_ledger_seq: 0, @@ -1795,6 +1791,7 @@ impl Host { storage.put( &nonce_key, &Rc::metered_new(entry, self)?, + Some(expiration_ledger), self.budget_ref(), ) }) diff --git a/soroban-env-host/src/e2e_invoke.rs b/soroban-env-host/src/e2e_invoke.rs index 3b2d24628..a8357a74c 100644 --- a/soroban-env-host/src/e2e_invoke.rs +++ b/soroban-env-host/src/e2e_invoke.rs @@ -6,10 +6,9 @@ use std::{cmp::max, rc::Rc}; use soroban_env_common::{ xdr::{ - AccountId, ContractCodeEntryBody, ContractDataDurability, ContractDataEntryBody, - ContractEntryBodyType, ContractEventType, DiagnosticEvent, HostFunction, LedgerEntry, - LedgerEntryData, LedgerFootprint, LedgerKey, LedgerKeyAccount, LedgerKeyContractCode, - LedgerKeyContractData, LedgerKeyTrustLine, ScErrorCode, ScErrorType, + AccountId, ContractDataDurability, ContractEventType, DiagnosticEvent, HostFunction, + LedgerEntry, LedgerEntryData, LedgerFootprint, LedgerKey, LedgerKeyAccount, + LedgerKeyContractCode, LedgerKeyContractData, LedgerKeyTrustLine, ScErrorCode, ScErrorType, SorobanAuthorizationEntry, SorobanResources, }, Error, @@ -20,7 +19,7 @@ use crate::{ events::Events, fees::LedgerEntryRentChange, host::{ - ledger_info_helper::{get_entry_expiration, get_key_durability, set_entry_expiration}, + ledger_info_helper::get_key_durability, metered_clone::{MeteredAlloc, MeteredClone, MeteredIterator}, metered_xdr::{metered_from_xdr_with_budget, metered_write_xdr}, }, @@ -99,7 +98,7 @@ pub fn get_ledger_changes( // happen in embedder environments, or simply fundamental invariant bugs. let internal_error: HostError = Error::from_type_and_code(ScErrorType::Storage, ScErrorCode::InternalError).into(); - for (key, entry) in storage.map.iter(budget)? { + for (key, entry_with_expiration) in storage.map.iter(budget)? { let mut entry_change = LedgerEntryChange::default(); metered_write_xdr(budget, key.as_ref(), &mut entry_change.encoded_key)?; let durability = get_key_durability(key); @@ -111,22 +110,21 @@ pub fn get_ledger_changes( }); } if init_storage_snapshot.has(key)? { - let old_entry = init_storage_snapshot.get(key)?; + let (old_entry, old_expiration) = init_storage_snapshot.get(key)?; let mut buf = vec![]; metered_write_xdr(budget, old_entry.as_ref(), &mut buf)?; entry_change.old_entry_size_bytes = buf.len() as u32; if let Some(ref mut expiration_change) = &mut entry_change.expiration_change { - expiration_change.old_expiration_ledger = get_entry_expiration(old_entry.as_ref()) - .ok_or_else(|| internal_error.clone())?; + expiration_change.old_expiration_ledger = + old_expiration.ok_or_else(|| internal_error.clone())?; } } - if let Some(entry) = entry { + if let Some((_, new_expiration_ledger)) = entry_with_expiration { if let Some(ref mut expiration_change) = &mut entry_change.expiration_change { - // Never reduce the expiration ledger. This is also handled when - // processing RW entries. + // Never reduce the final expiration ledger. expiration_change.new_expiration_ledger = max( - get_entry_expiration(entry.as_ref()).ok_or_else(|| internal_error.clone())?, + new_expiration_ledger.ok_or_else(|| internal_error.clone())?, expiration_change.old_expiration_ledger, ); } @@ -138,30 +136,10 @@ pub fn get_ledger_changes( entry_change.read_only = true; } Some(AccessType::ReadWrite) => { - if let Some(entry) = entry { - // Handle the edge case where due to combinations of - // deletions/creations the entry expiration has been - // reduced. - let mut entry_written = false; - if let (Some(expiration_change), Some(new_expiration)) = ( - &entry_change.expiration_change, - get_entry_expiration(entry.as_ref()), - ) { - if expiration_change.old_expiration_ledger > new_expiration { - let mut new_entry: LedgerEntry = - entry.as_ref().metered_clone(budget)?; - set_entry_expiration(&mut new_entry, new_expiration); - let mut entry_buf = vec![]; - metered_write_xdr(budget, &new_entry, &mut entry_buf)?; - entry_change.encoded_new_value = Some(entry_buf); - entry_written = true; - } - } - if !entry_written { - let mut entry_buf = vec![]; - metered_write_xdr(budget, entry.as_ref(), &mut entry_buf)?; - entry_change.encoded_new_value = Some(entry_buf); - } + if let Some((entry, _)) = entry_with_expiration { + let mut entry_buf = vec![]; + metered_write_xdr(budget, entry.as_ref(), &mut entry_buf)?; + entry_change.encoded_new_value = Some(entry_buf); } } None => { @@ -236,7 +214,11 @@ pub fn extract_rent_changes(ledger_changes: &Vec) -> Vec, I: ExactSizeIterator>( +pub fn invoke_host_function< + T: AsRef<[u8]>, + I: ExactSizeIterator, + EntryIter: ExactSizeIterator)>, +>( budget: &Budget, enable_diagnostics: bool, encoded_host_fn: T, @@ -244,7 +226,7 @@ pub fn invoke_host_function, I: ExactSizeIterator>( encoded_source_account: T, encoded_auth_entries: I, ledger_info: LedgerInfo, - encoded_ledger_entries: I, + encoded_ledger_entries: EntryIter, base_prng_seed: T, diagnostic_events: &mut Vec, ) -> Result { @@ -366,25 +348,9 @@ fn ledger_entry_to_ledger_key(le: &LedgerEntry, budget: &Budget) -> Result ContractEntryBodyType::DataEntry, - ContractDataEntryBody::ExpirationExtension => { - ContractEntryBodyType::ExpirationExtension - } - }, })), LedgerEntryData::ContractCode(code) => Ok(LedgerKey::ContractCode(LedgerKeyContractCode { hash: code.hash.metered_clone(budget)?, - body_type: match &code.body { - ContractCodeEntryBody::DataEntry(_) => ContractEntryBodyType::DataEntry, - ContractCodeEntryBody::ExpirationExtension => { - return Err(Error::from_type_and_code( - ScErrorType::Storage, - ScErrorCode::InternalError, - ) - .into()); - } - }, })), _ => { return Err(Error::from_type_and_code( @@ -422,13 +388,16 @@ fn build_storage_footprint_from_xdr( Ok(Footprint(footprint_map)) } -fn build_storage_map_from_xdr_ledger_entries, I: ExactSizeIterator>( +fn build_storage_map_from_xdr_ledger_entries< + T: AsRef<[u8]>, + I: ExactSizeIterator)>, +>( budget: &Budget, footprint: &Footprint, encoded_ledger_entries: I, ) -> Result { let mut map = StorageMap::new(); - for buf in encoded_ledger_entries { + for (buf, expiration_ledger) in encoded_ledger_entries { let le = Rc::metered_new( metered_from_xdr_with_budget::(buf.as_ref(), budget)?, budget, @@ -441,7 +410,7 @@ fn build_storage_map_from_xdr_ledger_entries, I: ExactSizeIterato ) .into()); } - map = map.insert(key, Some(le), budget)?; + map = map.insert(key, Some((le, expiration_ledger)), budget)?; } // Add non-existing entries from the footprint to the storage. @@ -472,9 +441,9 @@ struct StorageMapSnapshotSource<'a> { } impl<'a> SnapshotSource for StorageMapSnapshotSource<'a> { - fn get(&self, key: &Rc) -> Result, HostError> { - if let Some(Some(value)) = self.map.get::>(key, self.budget)? { - Ok(Rc::clone(value)) + fn get(&self, key: &Rc) -> Result<(Rc, Option), HostError> { + if let Some(Some((entry, expiration))) = self.map.get::>(key, self.budget)? { + Ok((Rc::clone(entry), expiration.clone())) } else { Err(Error::from_type_and_code(ScErrorType::Storage, ScErrorCode::InternalError).into()) } diff --git a/soroban-env-host/src/host.rs b/soroban-env-host/src/host.rs index 4d44ecf99..46a2a5396 100644 --- a/soroban-env-host/src/host.rs +++ b/soroban-env-host/src/host.rs @@ -47,9 +47,8 @@ pub use prng::{Seed, SEED_BYTES}; mod validity; pub use error::HostError; use soroban_env_common::xdr::{ - ContractCodeEntryBody, ContractDataDurability, ContractDataEntryBody, ContractDataEntryData, - ContractEntryBodyType, ContractIdPreimage, ContractIdPreimageFromAddress, ScContractInstance, - ScErrorCode, MASK_CONTRACT_DATA_FLAGS_V20, + ContractDataDurability, ContractIdPreimage, ContractIdPreimageFromAddress, ScContractInstance, + ScErrorCode, }; use self::{ @@ -106,7 +105,6 @@ pub struct LedgerInfo { pub min_temp_entry_expiration: u32, pub min_persistent_entry_expiration: u32, pub max_entry_expiration: u32, - pub autobump_ledgers: u32, } #[derive(Clone, Default)] @@ -680,9 +678,12 @@ impl Host { &self, key: &Rc, val: &Rc, + expiration_ledger: Option, ) -> Result<(), HostError> { self.as_budget().with_free_budget(|| { - self.with_mut_storage(|storage| storage.put(key, val, self.as_budget())) + self.with_mut_storage(|storage| { + storage.put(key, val, expiration_ledger, self.as_budget()) + }) }) } @@ -693,7 +694,7 @@ impl Host { pub fn setup_storage_entry( &self, key: Rc, - val: Option>, + val: Option<(Rc, Option)>, access_type: AccessType, ) -> Result<(), HostError> { self.as_budget().with_free_budget(|| { @@ -759,7 +760,6 @@ impl Host { let code_key = Rc::metered_new( LedgerKey::ContractCode(LedgerKeyContractCode { hash: Hash(hash_bytes.metered_clone(self)?), - body_type: ContractEntryBodyType::DataEntry, }), self, )?; @@ -768,26 +768,23 @@ impl Host { .has(&code_key, self.as_budget()) .map_err(|e| self.decorate_contract_code_storage_error(e, &Hash(hash_bytes)))? { - let body = ContractCodeEntryBody::DataEntry(wasm.try_into().map_err(|_| { - self.err( - ScErrorType::Value, - ScErrorCode::ExceededLimit, - "Wasm code is too large", - &[], - ) - })?); - self.with_mut_storage(|storage| { let data = LedgerEntryData::ContractCode(ContractCodeEntry { hash: Hash(hash_bytes), - body, ext: ExtensionPoint::V0, - expiration_ledger_seq: self - .get_min_expiration_ledger(ContractDataDurability::Persistent)?, + code: wasm.try_into().map_err(|_| { + self.err( + ScErrorType::Value, + ScErrorCode::ExceededLimit, + "Wasm code is too large", + &[], + ) + })?, }); storage.put( &code_key, &Host::ledger_entry_from_data(self, data)?, + Some(self.get_min_expiration_ledger(ContractDataDurability::Persistent)?), self.as_budget(), ) })?; @@ -856,23 +853,7 @@ impl Host { k: Val, v: Val, t: StorageType, - f: Val, ) -> Result<(), HostError> { - let flags: Option = if f.is_void() { - None - } else { - let val = self.u32_from_rawval_input("f", f)?; - if ((val as u64) & !MASK_CONTRACT_DATA_FLAGS_V20) != 0 { - return Err(self.err( - ScErrorType::Value, - ScErrorCode::InvalidInput, - "invalid flags", - &[], - )); - } - Some(val) - }; - let durability: ContractDataDurability = t.try_into()?; let key = self.contract_data_key_from_rawval(k, durability)?; // Currently the storage stores the whole ledger entries, while this @@ -884,29 +865,15 @@ impl Host { .has(&key, self.as_budget()) .map_err(|e| self.decorate_contract_data_storage_error(e, k))? { - let mut current = (*self + let (current, expiration_ledger) = self .try_borrow_storage_mut()? - .get(&key, self.as_budget()) - .map_err(|e| self.decorate_contract_data_storage_error(e, k))?) - .metered_clone(self)?; - + .get_with_expiration(&key, self.as_budget()) + .map_err(|e| self.decorate_contract_data_storage_error(e, k))?; + let mut current = (*current).metered_clone(self)?; match current.data { - LedgerEntryData::ContractData(ref mut entry) => match entry.body { - ContractDataEntryBody::DataEntry(ref mut data) => { - data.val = self.from_host_val(v)?; - if let Some(new_flags) = flags { - data.flags = new_flags; - } - } - _ => { - return Err(self.err( - ScErrorType::Storage, - ScErrorCode::InternalError, - "expected DataEntry", - &[], - )); - } - }, + LedgerEntryData::ContractData(ref mut entry) => { + entry.val = self.from_host_val(v)?; + } _ => { return Err(self.err( ScErrorType::Storage, @@ -917,24 +884,26 @@ impl Host { } } self.try_borrow_storage_mut()? - .put(&key, &Rc::metered_new(current, self)?, self.as_budget()) + .put( + &key, + &Rc::metered_new(current, self)?, + expiration_ledger, + self.as_budget(), + ) .map_err(|e| self.decorate_contract_data_storage_error(e, k))?; } else { - let body = ContractDataEntryBody::DataEntry(ContractDataEntryData { - val: self.from_host_val(v)?, - flags: flags.unwrap_or(0), - }); let data = LedgerEntryData::ContractData(ContractDataEntry { contract: ScAddress::Contract(self.get_current_contract_id_internal()?), key: self.from_host_val(k)?, - body, - expiration_ledger_seq: self.get_min_expiration_ledger(durability)?, + val: self.from_host_val(v)?, durability, + ext: ExtensionPoint::V0, }); self.try_borrow_storage_mut()? .put( &key, &Host::ledger_entry_from_data(self, data)?, + Some(self.get_min_expiration_ledger(durability)?), self.as_budget(), ) .map_err(|e| self.decorate_contract_data_storage_error(e, k))?; @@ -943,38 +912,6 @@ impl Host { Ok(()) } - // If autobump enabled, autobumps all the entries in the footprint. - fn maybe_autobump_expiration_of_footprint_entries(&self) -> Result<(), HostError> { - let Some(autobump_ledgers) = self.with_ledger_info(|li| { - if li.autobump_ledgers > 0 { - Ok(Some(li.autobump_ledgers)) - } else { - Ok(None) - } - })? else { - return Ok(()); - }; - // Need to copy the footprint out of the storage to allow mut borrow of - // storage. - let footprint_map = self.try_borrow_storage()?.footprint.0.metered_clone(self)?; - for (key, _) in footprint_map.iter(self.budget_ref())? { - match key.as_ref() { - LedgerKey::ContractData(_) | LedgerKey::ContractCode(_) => { - if self.try_borrow_storage_mut()?.has(key, self.budget_ref())? { - self.try_borrow_storage_mut()? - .bump_relative_to_entry_expiration( - self, - key.metered_clone(self)?, - autobump_ledgers, - )?; - } - } - _ => (), - } - } - Ok(()) - } - fn decorate_contract_data_storage_error(&self, err: HostError, key: Val) -> HostError { if !err.error.is_type(ScErrorType::Storage) { return err; @@ -2129,13 +2066,12 @@ impl VmCallerEnv for Host { k: Val, v: Val, t: StorageType, - f: Val, ) -> Result { self.check_val_integrity(k)?; self.check_val_integrity(v)?; match t { StorageType::Temporary | StorageType::Persistent => { - self.put_contract_data_into_ledger(k, v, t, f)? + self.put_contract_data_into_ledger(k, v, t)? } StorageType::Instance => self.with_mut_instance_storage(|s| { s.map = s.map.insert(k, v, self)?; @@ -2183,15 +2119,7 @@ impl VmCallerEnv for Host { .get(&key, self.as_budget()) .map_err(|e| self.decorate_contract_data_storage_error(e, k))?; match &entry.data { - LedgerEntryData::ContractData(ContractDataEntry { body, .. }) => match body { - ContractDataEntryBody::DataEntry(data) => Ok(self.to_host_val(&data.val)?), - _ => Err(self.err( - ScErrorType::Storage, - ScErrorCode::InternalError, - "expected DataEntry", - &[], - )), - }, + LedgerEntryData::ContractData(e) => Ok(self.to_host_val(&e.val)?), _ => Err(self.err( ScErrorType::Storage, ScErrorCode::InternalError, diff --git a/soroban-env-host/src/host/comparison.rs b/soroban-env-host/src/host/comparison.rs index 28f664f24..5bea9b039 100644 --- a/soroban-env-host/src/host/comparison.rs +++ b/soroban-env-host/src/host/comparison.rs @@ -2,9 +2,8 @@ use core::cmp::{min, Ordering}; use soroban_env_common::{ xdr::{ - AccountEntry, AccountId, ClaimableBalanceEntry, ConfigSettingEntry, ContractCodeEntryBody, - ContractCostType, ContractDataDurability, ContractDataEntryBody, ContractDataEntryData, - ContractEntryBodyType, ContractExecutable, CreateContractArgs, DataEntry, DepthLimiter, + AccountEntry, AccountId, ClaimableBalanceEntry, ConfigSettingEntry, ContractCostType, + ContractDataDurability, ContractExecutable, CreateContractArgs, DataEntry, DepthLimiter, Duration, ExtensionPoint, Hash, LedgerEntry, LedgerEntryData, LedgerEntryExt, LedgerKey, LedgerKeyAccount, LedgerKeyClaimableBalance, LedgerKeyConfigSetting, LedgerKeyContractCode, LedgerKeyData, LedgerKeyLiquidityPool, LedgerKeyOffer, LedgerKeyTrustLine, @@ -192,7 +191,6 @@ impl_compare_fixed_size_ord_type!(ScNonceKey); impl_compare_fixed_size_ord_type!(PublicKey); impl_compare_fixed_size_ord_type!(TrustLineAsset); impl_compare_fixed_size_ord_type!(ContractDataDurability); -impl_compare_fixed_size_ord_type!(ContractEntryBodyType); impl_compare_fixed_size_ord_type!(LedgerKeyAccount); impl_compare_fixed_size_ord_type!(LedgerKeyTrustLine); @@ -331,8 +329,8 @@ impl Compare for Budget { (ClaimableBalance(a), ClaimableBalance(b)) => self.compare(&a, &b), (LiquidityPool(a), LiquidityPool(b)) => self.compare(&a, &b), (ContractData(a), ContractData(b)) => self.compare( - &(&a.contract, &a.key, &a.durability, &a.body_type), - &(&b.contract, &b.key, &b.durability, &b.body_type), + &(&a.contract, &a.key, &a.durability), + &(&b.contract, &b.key, &b.durability), ), (ContractCode(a), ContractCode(b)) => self.compare(&a, &b), (ConfigSetting(a), ConfigSetting(b)) => self.compare(&a, &b), @@ -348,7 +346,8 @@ impl Compare for Budget { | (LiquidityPool(_), _) | (ContractData(_), _) | (ContractCode(_), _) - | (ConfigSetting(_), _) => Ok(a.cmp(b)), + | (ConfigSetting(_), _) + | (Expiration(_), _) => Ok(a.cmp(b)), } } } @@ -377,25 +376,12 @@ impl Compare for Budget { (ClaimableBalance(a), ClaimableBalance(b)) => self.compare(&a, &b), (LiquidityPool(a), LiquidityPool(b)) => self.compare(&a, &b), (ContractData(a), ContractData(b)) => self.compare( - &( - &a.contract, - &a.key, - &a.durability, - &a.body, - &a.expiration_ledger_seq, - ), - &( - &b.contract, - &b.key, - &b.durability, - &b.body, - &b.expiration_ledger_seq, - ), - ), - (ContractCode(a), ContractCode(b)) => self.compare( - &(&a.ext, &a.hash, &a.body, &a.expiration_ledger_seq), - &(&b.ext, &b.hash, &b.body, &b.expiration_ledger_seq), + &(&a.contract, &a.key, &a.durability, &a.val), + &(&b.contract, &b.key, &b.durability, &b.val), ), + (ContractCode(a), ContractCode(b)) => { + self.compare(&(&a.ext, &a.hash), &(&b.ext, &b.hash)) + } (ConfigSetting(a), ConfigSetting(b)) => self.compare(&a, &b), (Account(_), _) @@ -406,55 +392,8 @@ impl Compare for Budget { | (LiquidityPool(_), _) | (ContractData(_), _) | (ContractCode(_), _) - | (ConfigSetting(_), _) => Ok(a.cmp(b)), - } - } -} - -impl Compare for Budget { - type Error = HostError; - - fn compare( - &self, - a: &ContractDataEntryData, - b: &ContractDataEntryData, - ) -> Result { - self.compare(&(a.flags, &a.val), &(b.flags, &b.val)) - } -} - -impl Compare for Budget { - type Error = HostError; - - fn compare( - &self, - a: &ContractDataEntryBody, - b: &ContractDataEntryBody, - ) -> Result { - match (a, b) { - (ContractDataEntryBody::DataEntry(a), ContractDataEntryBody::DataEntry(b)) => { - self.compare(&(a), &(b)) - } - (ContractDataEntryBody::DataEntry(_), _) - | (ContractDataEntryBody::ExpirationExtension, _) => Ok(a.cmp(b)), - } - } -} - -impl Compare for Budget { - type Error = HostError; - - fn compare( - &self, - a: &ContractCodeEntryBody, - b: &ContractCodeEntryBody, - ) -> Result { - match (a, b) { - (ContractCodeEntryBody::DataEntry(a), ContractCodeEntryBody::DataEntry(b)) => { - >::compare(self, &a.as_ref(), &b.as_ref()) - } - (ContractCodeEntryBody::DataEntry(_), _) - | (ContractCodeEntryBody::ExpirationExtension, _) => Ok(a.cmp(b)), + | (ConfigSetting(_), _) + | (Expiration(_), _) => Ok(a.cmp(b)), } } } diff --git a/soroban-env-host/src/host/conversion.rs b/soroban-env-host/src/host/conversion.rs index 6e62741e3..6d1935ad5 100644 --- a/soroban-env-host/src/host/conversion.rs +++ b/soroban-env-host/src/host/conversion.rs @@ -12,9 +12,9 @@ use soroban_env_common::num::{ i256_from_pieces, i256_into_pieces, u256_from_pieces, u256_into_pieces, }; use soroban_env_common::xdr::{ - self, int128_helpers, AccountId, ContractDataDurability, ContractEntryBodyType, DepthLimiter, - Int128Parts, Int256Parts, ScAddress, ScBytes, ScErrorCode, ScErrorType, ScMap, ScMapEntry, - UInt128Parts, UInt256Parts, VecM, + self, int128_helpers, AccountId, ContractDataDurability, DepthLimiter, Int128Parts, + Int256Parts, ScAddress, ScBytes, ScErrorCode, ScErrorType, ScMap, ScMapEntry, UInt128Parts, + UInt256Parts, VecM, }; use soroban_env_common::{ AddressObject, BytesObject, Convert, Object, ScValObjRef, ScValObject, TryFromVal, TryIntoVal, @@ -172,8 +172,7 @@ impl Host { LedgerKey::ContractData(LedgerKeyContractData { contract: contract_address, key, - durability: durability, - body_type: ContractEntryBodyType::DataEntry, + durability, }), self, ) diff --git a/soroban-env-host/src/host/data_helper.rs b/soroban-env-host/src/host/data_helper.rs index 955a29801..ef68865e2 100644 --- a/soroban-env-host/src/host/data_helper.rs +++ b/soroban-env-host/src/host/data_helper.rs @@ -2,8 +2,7 @@ use core::cmp::min; use std::rc::Rc; use soroban_env_common::xdr::{ - BytesM, ContractCodeEntryBody, ContractDataDurability, ContractDataEntryBody, - ContractDataEntryData, ContractEntryBodyType, ContractIdPreimage, HashIdPreimageContractId, + BytesM, ContractDataDurability, ContractIdPreimage, ExtensionPoint, HashIdPreimageContractId, ScAddress, ScContractInstance, ScErrorCode, ScErrorType, }; use soroban_env_common::{AddressObject, Env, U32Val}; @@ -29,7 +28,6 @@ impl Host { LedgerKey::ContractData(LedgerKeyContractData { key: ScVal::LedgerKeyContractInstance, durability: ContractDataDurability::Persistent, - body_type: ContractEntryBodyType::DataEntry, contract: ScAddress::Contract(contract_id), }), self, @@ -43,20 +41,13 @@ impl Host { ) -> Result { let entry = self.try_borrow_storage_mut()?.get(key, self.as_budget())?; match &entry.data { - LedgerEntryData::ContractData(ContractDataEntry { body, .. }) => match body { - ContractDataEntryBody::DataEntry(data) => match &data.val { - ScVal::ContractInstance(instance) => instance.metered_clone(self), - other => Err(err!( - self, - (ScErrorType::Storage, ScErrorCode::InternalError), - "ledger entry for contract instance does not contain contract instance", - *other - )), - }, - _ => Err(err!( + LedgerEntryData::ContractData(e) => match &e.val { + ScVal::ContractInstance(instance) => instance.metered_clone(self), + other => Err(err!( self, (ScErrorType::Storage, ScErrorCode::InternalError), - "expected DataEntry", + "ledger entry for contract instance does not contain contract instance", + *other )), }, _ => Err(self.err( @@ -74,10 +65,7 @@ impl Host { ) -> Result, HostError> { let wasm_hash = wasm_hash.metered_clone(self)?; Rc::metered_new( - LedgerKey::ContractCode(LedgerKeyContractCode { - hash: wasm_hash, - body_type: ContractEntryBodyType::DataEntry, - }), + LedgerKey::ContractCode(LedgerKeyContractCode { hash: wasm_hash }), self, ) } @@ -90,14 +78,7 @@ impl Host { .map_err(|e| self.decorate_contract_code_storage_error(e, wasm_hash))? .data { - LedgerEntryData::ContractCode(e) => match &e.body { - ContractCodeEntryBody::DataEntry(code) => code.metered_clone(self), - _ => Err(err!( - self, - (ScErrorType::Storage, ScErrorCode::InternalError), - "expected DataEntry", - )), - }, + LedgerEntryData::ContractCode(e) => e.code.metered_clone(self), _ => Err(err!( self, (ScErrorType::Storage, ScErrorCode::InternalError), @@ -121,22 +102,19 @@ impl Host { contract_id: Hash, key: &Rc, ) -> Result<(), HostError> { - let body = ContractDataEntryBody::DataEntry(ContractDataEntryData { - val: ScVal::ContractInstance(instance), - flags: 0, - }); - if self .try_borrow_storage_mut()? - .has(&key, self.as_budget()) + .has(key, self.as_budget()) .map_err(|e| self.decorate_contract_instance_storage_error(e, &contract_id))? { - let mut current = (*self.try_borrow_storage_mut()?.get(&key, self.as_budget())?) - .metered_clone(self)?; + let (current, expiration_ledger) = self + .try_borrow_storage_mut()? + .get_with_expiration(key, self.as_budget())?; + let mut current = (*current).metered_clone(self.as_budget())?; match current.data { LedgerEntryData::ContractData(ref mut entry) => { - entry.body = body; + entry.val = ScVal::ContractInstance(instance); } _ => { return Err(self.err( @@ -148,21 +126,26 @@ impl Host { } } self.try_borrow_storage_mut()? - .put(&key, &Rc::metered_new(current, self)?, self.as_budget()) + .put( + &key, + &Rc::metered_new(current, self)?, + expiration_ledger, + self.as_budget(), + ) .map_err(|e| self.decorate_contract_instance_storage_error(e, &contract_id))?; } else { let data = LedgerEntryData::ContractData(ContractDataEntry { contract: ScAddress::Contract(contract_id.metered_clone(self)?), key: ScVal::LedgerKeyContractInstance, - body, + val: ScVal::ContractInstance(instance), durability: ContractDataDurability::Persistent, - expiration_ledger_seq: self - .get_min_expiration_ledger(ContractDataDurability::Persistent)?, + ext: ExtensionPoint::V0, }); self.try_borrow_storage_mut()? .put( key, &Host::ledger_entry_from_data(self, data)?, + Some(self.get_min_expiration_ledger(ContractDataDurability::Persistent)?), self.as_budget(), ) .map_err(|e| self.decorate_contract_instance_storage_error(e, &contract_id))?; diff --git a/soroban-env-host/src/host/declared_size.rs b/soroban-env-host/src/host/declared_size.rs index 662b76080..8069e32a3 100644 --- a/soroban-env-host/src/host/declared_size.rs +++ b/soroban-env-host/src/host/declared_size.rs @@ -10,14 +10,14 @@ use crate::{ storage::AccessType, xdr::{ AccountEntry, AccountId, Asset, BytesM, ClaimableBalanceEntry, ConfigSettingEntry, - ContractCodeEntry, ContractDataDurability, ContractEntryBodyType, ContractEvent, - ContractExecutable, ContractIdPreimage, CreateContractArgs, DataEntry, Duration, - ExtensionPoint, Hash, LedgerEntry, LedgerEntryExt, LedgerKey, LedgerKeyAccount, - LedgerKeyClaimableBalance, LedgerKeyConfigSetting, LedgerKeyContractCode, LedgerKeyData, - LedgerKeyLiquidityPool, LedgerKeyOffer, LedgerKeyTrustLine, LiquidityPoolEntry, OfferEntry, - PublicKey, ScAddress, ScBytes, ScContractInstance, ScMap, ScMapEntry, ScNonceKey, ScString, - ScSymbol, ScVal, ScVec, SorobanAuthorizationEntry, SorobanAuthorizedInvocation, StringM, - TimePoint, TrustLineAsset, TrustLineEntry, Uint256, SCSYMBOL_LIMIT, + ContractCodeEntry, ContractDataDurability, ContractEvent, ContractExecutable, + ContractIdPreimage, CreateContractArgs, DataEntry, Duration, ExtensionPoint, Hash, + LedgerEntry, LedgerEntryExt, LedgerKey, LedgerKeyAccount, LedgerKeyClaimableBalance, + LedgerKeyConfigSetting, LedgerKeyContractCode, LedgerKeyData, LedgerKeyLiquidityPool, + LedgerKeyOffer, LedgerKeyTrustLine, LiquidityPoolEntry, OfferEntry, PublicKey, ScAddress, + ScBytes, ScContractInstance, ScMap, ScMapEntry, ScNonceKey, ScString, ScSymbol, ScVal, + ScVec, SorobanAuthorizationEntry, SorobanAuthorizedInvocation, StringM, TimePoint, + TrustLineAsset, TrustLineEntry, Uint256, SCSYMBOL_LIMIT, }, AddressObject, Bool, BytesObject, DurationObject, DurationSmall, DurationVal, Error, HostError, I128Object, I128Small, I128Val, I256Object, I256Small, I256Val, I32Val, I64Object, I64Small, @@ -153,7 +153,6 @@ impl_declared_size_type!(ScSymbol, 24); impl_declared_size_type!(CreateContractArgs, 98); impl_declared_size_type!(ContractIdPreimage, 65); impl_declared_size_type!(ContractDataDurability, 4); -impl_declared_size_type!(ContractEntryBodyType, 4); impl_declared_size_type!(ExtensionPoint, 0); impl_declared_size_type!(ScContractInstance, 64); impl_declared_size_type!(SorobanAuthorizationEntry, 240); @@ -325,7 +324,7 @@ mod test { expect!["56"].assert_eq(size_of::().to_string().as_str()); expect!["32"].assert_eq(size_of::().to_string().as_str()); expect!["32"].assert_eq(size_of::().to_string().as_str()); - expect!["36"].assert_eq(size_of::().to_string().as_str()); + expect!["32"].assert_eq(size_of::().to_string().as_str()); expect!["4"].assert_eq(size_of::().to_string().as_str()); expect!["33"].assert_eq(size_of::().to_string().as_str()); expect!["216"].assert_eq(size_of::().to_string().as_str()); @@ -334,9 +333,9 @@ mod test { expect!["80"].assert_eq(size_of::().to_string().as_str()); expect!["120"].assert_eq(size_of::().to_string().as_str()); expect!["160"].assert_eq(size_of::().to_string().as_str()); - expect!["64"].assert_eq(size_of::().to_string().as_str()); + expect!["56"].assert_eq(size_of::().to_string().as_str()); expect!["96"].assert_eq(size_of::().to_string().as_str()); - expect!["120"].assert_eq(size_of::().to_string().as_str()); + expect!["112"].assert_eq(size_of::().to_string().as_str()); expect!["256"].assert_eq(size_of::().to_string().as_str()); expect!["1"].assert_eq(size_of::().to_string().as_str()); expect!["40"].assert_eq(size_of::().to_string().as_str()); @@ -351,7 +350,6 @@ mod test { expect!["98"].assert_eq(size_of::().to_string().as_str()); expect!["65"].assert_eq(size_of::().to_string().as_str()); expect!["4"].assert_eq(size_of::().to_string().as_str()); - expect!["4"].assert_eq(size_of::().to_string().as_str()); expect!["0"].assert_eq(size_of::().to_string().as_str()); expect!["128"].assert_eq( size_of::() @@ -516,7 +514,6 @@ mod test { assert_mem_size_le_declared_size!(ScSymbol); assert_mem_size_le_declared_size!(CreateContractArgs); assert_mem_size_le_declared_size!(ContractDataDurability); - assert_mem_size_le_declared_size!(ContractEntryBodyType); assert_mem_size_le_declared_size!(ExtensionPoint); assert_mem_size_le_declared_size!(SorobanAuthorizedInvocation); assert_mem_size_le_declared_size!(SorobanAuthorizationEntry); diff --git a/soroban-env-host/src/host/frame.rs b/soroban-env-host/src/host/frame.rs index 95185e3ee..28de225fb 100644 --- a/soroban-env-host/src/host/frame.rs +++ b/soroban-env-host/src/host/frame.rs @@ -194,7 +194,12 @@ impl Host { F: FnOnce(&Frame) -> Result, { let Ok(context_guard) = self.0.context.try_borrow() else { - return Err(self.err(ScErrorType::Context, ScErrorCode::InternalError, "context is already borrowed", &[])); + return Err(self.err( + ScErrorType::Context, + ScErrorCode::InternalError, + "context is already borrowed", + &[], + )); }; if let Some(context) = context_guard.last() { @@ -221,7 +226,12 @@ impl Host { F: FnOnce(&mut Context) -> Result, { let Ok(mut context_guard) = self.0.context.try_borrow_mut() else { - return Err(self.err(ScErrorType::Context, ScErrorCode::InternalError, "context is already borrowed", &[])); + return Err(self.err( + ScErrorType::Context, + ScErrorCode::InternalError, + "context is already borrowed", + &[], + )); }; if let Some(context) = context_guard.last_mut() { f(context) @@ -243,7 +253,12 @@ impl Host { F: FnOnce(Option<&Frame>) -> Result, { let Ok(context_guard) = self.0.context.try_borrow() else { - return Err(self.err(ScErrorType::Context, ScErrorCode::InternalError, "context is already borrowed", &[])); + return Err(self.err( + ScErrorType::Context, + ScErrorCode::InternalError, + "context is already borrowed", + &[], + )); }; if let Some(context) = context_guard.last() { f(Some(&context.frame)) @@ -686,14 +701,18 @@ impl Host { // Notes on metering: covered by the called components. fn invoke_function_raw(&self, hf: HostFunction) -> Result { - self.maybe_autobump_expiration_of_footprint_entries()?; let hf_type = hf.discriminant(); match hf { HostFunction::InvokeContract(invoke_args) => { self.with_frame(Frame::HostFunction(hf_type), || { // Metering: conversions to host objects are covered. let ScAddress::Contract(ref contract_id) = invoke_args.contract_address else { - return Err(self.err(ScErrorType::Value, ScErrorCode::UnexpectedType, "invoked address doesn't belong to a contract", &[])); + return Err(self.err( + ScErrorType::Value, + ScErrorCode::UnexpectedType, + "invoked address doesn't belong to a contract", + &[], + )); }; let function_name: Symbol = invoke_args.function_name.try_into_val(self)?; let args = self.scvals_to_rawvals(invoke_args.args.as_slice())?; diff --git a/soroban-env-host/src/host/ledger_info_helper.rs b/soroban-env-host/src/host/ledger_info_helper.rs index e19c1479a..c4440d613 100644 --- a/soroban-env-host/src/host/ledger_info_helper.rs +++ b/soroban-env-host/src/host/ledger_info_helper.rs @@ -1,4 +1,4 @@ -use soroban_env_common::xdr::{ContractDataDurability, LedgerEntry, LedgerEntryData, LedgerKey}; +use soroban_env_common::xdr::{ContractDataDurability, LedgerKey}; use crate::{Host, HostError, LedgerInfo}; @@ -30,26 +30,6 @@ impl Host { } } -pub fn get_entry_expiration(entry: &LedgerEntry) -> Option { - match &entry.data { - LedgerEntryData::ContractData(d) => Some(d.expiration_ledger_seq), - LedgerEntryData::ContractCode(c) => Some(c.expiration_ledger_seq), - _ => None, - } -} - -pub fn set_entry_expiration(entry: &mut LedgerEntry, new_expiration: u32) { - match &mut entry.data { - LedgerEntryData::ContractData(data) => { - data.expiration_ledger_seq = new_expiration; - } - LedgerEntryData::ContractCode(code) => { - code.expiration_ledger_seq = new_expiration; - } - _ => (), - } -} - pub fn get_key_durability(key: &LedgerKey) -> Option { match &key { LedgerKey::ContractData(d) => Some(d.durability), diff --git a/soroban-env-host/src/host/metered_clone.rs b/soroban-env-host/src/host/metered_clone.rs index ae95b98fe..10154b5b6 100644 --- a/soroban-env-host/src/host/metered_clone.rs +++ b/soroban-env-host/src/host/metered_clone.rs @@ -9,10 +9,9 @@ use crate::{ storage::AccessType, xdr::{ AccountEntry, AccountId, Asset, BytesM, ClaimableBalanceEntry, ConfigSettingEntry, - ContractCodeEntry, ContractCodeEntryBody, ContractCostType, ContractDataEntryBody, - ContractEvent, ContractEventBody, ContractEventType, ContractExecutable, - ContractIdPreimage, CreateContractArgs, DataEntry, DepthLimiter, Duration, Hash, - LedgerEntry, LedgerEntryData, LedgerEntryExt, LedgerKey, LedgerKeyAccount, + ContractCodeEntry, ContractCostType, ContractEvent, ContractEventBody, ContractEventType, + ContractExecutable, ContractIdPreimage, CreateContractArgs, DataEntry, DepthLimiter, + Duration, Hash, LedgerEntry, LedgerEntryData, LedgerEntryExt, LedgerKey, LedgerKeyAccount, LedgerKeyClaimableBalance, LedgerKeyConfigSetting, LedgerKeyContractCode, LedgerKeyData, LedgerKeyLiquidityPool, LedgerKeyOffer, LedgerKeyTrustLine, LiquidityPoolEntry, OfferEntry, PublicKey, ScAddress, ScBytes, ScContractInstance, ScErrorCode, ScErrorType, ScMap, @@ -547,7 +546,8 @@ impl MeteredClone for LedgerKey { | LedgerKey::ClaimableBalance(_) | LedgerKey::LiquidityPool(_) | LedgerKey::ContractCode(_) - | LedgerKey::ConfigSetting(_) => Ok(()), + | LedgerKey::ConfigSetting(_) + | LedgerKey::Expiration(_) => Ok(()), } } } @@ -559,19 +559,15 @@ impl MeteredClone for LedgerEntry { use LedgerEntryData::*; match &self.data { ContractData(d) => { - if let ContractDataEntryBody::DataEntry(e) = &d.body { - e.val.charge_for_substructure(budget.clone())?; - } + d.val.charge_for_substructure(budget.clone())?; d.key.charge_for_substructure(budget) } ContractCode(c) => { - if let ContractCodeEntryBody::DataEntry(d) = &c.body { - d.charge_for_substructure(budget)?; - } + c.charge_for_substructure(budget)?; Ok(()) } Account(_) | Trustline(_) | Offer(_) | Data(_) | ClaimableBalance(_) - | LiquidityPool(_) | ConfigSetting(_) => Ok(()), + | LiquidityPool(_) | ConfigSetting(_) | Expiration(_) => Ok(()), } } } diff --git a/soroban-env-host/src/host_object.rs b/soroban-env-host/src/host_object.rs index 77a40f3fd..cbaf6c1d4 100644 --- a/soroban-env-host/src/host_object.rs +++ b/soroban-env-host/src/host_object.rs @@ -53,47 +53,65 @@ impl HostObject { ) -> Result, HostError> { let res = match self { HostObject::U64(u) => { - let Ok(small) = U64Small::try_from(rv) else { return Ok(None) }; + let Ok(small) = U64Small::try_from(rv) else { + return Ok(None); + }; let small: u64 = small.into(); Some(budget.compare(u, &small)?) } HostObject::I64(i) => { - let Ok(small) = I64Small::try_from(rv) else { return Ok(None) }; + let Ok(small) = I64Small::try_from(rv) else { + return Ok(None); + }; let small: i64 = small.into(); Some(budget.compare(i, &small)?) } HostObject::TimePoint(tp) => { - let Ok(small) = TimepointSmall::try_from(rv) else { return Ok(None) }; + let Ok(small) = TimepointSmall::try_from(rv) else { + return Ok(None); + }; let small: u64 = small.into(); Some(budget.compare(&tp.0, &small)?) } HostObject::Duration(d) => { - let Ok(small) = DurationSmall::try_from(rv) else { return Ok(None) }; + let Ok(small) = DurationSmall::try_from(rv) else { + return Ok(None); + }; let small: u64 = small.into(); Some(budget.compare(&d.0, &small)?) } HostObject::U128(u) => { - let Ok(small) = U128Small::try_from(rv) else { return Ok(None) }; + let Ok(small) = U128Small::try_from(rv) else { + return Ok(None); + }; let small: u128 = small.into(); Some(budget.compare(u, &small)?) } HostObject::I128(i) => { - let Ok(small) = I128Small::try_from(rv) else { return Ok(None) }; + let Ok(small) = I128Small::try_from(rv) else { + return Ok(None); + }; let small: i128 = small.into(); Some(budget.compare(i, &small)?) } HostObject::U256(u) => { - let Ok(small) = U256Small::try_from(rv) else { return Ok(None) }; + let Ok(small) = U256Small::try_from(rv) else { + return Ok(None); + }; let small: U256 = small.into(); Some(budget.compare(u, &small)?) } HostObject::I256(i) => { - let Ok(small) = I256Small::try_from(rv) else { return Ok(None) }; + let Ok(small) = I256Small::try_from(rv) else { + return Ok(None); + }; let small: I256 = small.into(); Some(budget.compare(i, &small)?) } HostObject::Symbol(s) => { - let Ok(small) = SymbolSmall::try_from(rv) else { return Ok(None) }; + let Ok(small) = SymbolSmall::try_from(rv) else { + return Ok(None); + }; let small: SymbolStr = small.into(); let rhs: &[u8] = small.as_ref(); Some(budget.compare(&s.as_vec().as_slice(), &rhs)?) diff --git a/soroban-env-host/src/native_contract/testutils.rs b/soroban-env-host/src/native_contract/testutils.rs index 79ba1dd7f..363cdb44d 100644 --- a/soroban-env-host/src/native_contract/testutils.rs +++ b/soroban-env-host/src/native_contract/testutils.rs @@ -322,6 +322,7 @@ pub(crate) fn create_account( host.add_ledger_entry( &key, &Host::ledger_entry_from_data(host, LedgerEntryData::Account(acc_entry)).unwrap(), + None, ) .unwrap(); } diff --git a/soroban-env-host/src/native_contract/token/admin.rs b/soroban-env-host/src/native_contract/token/admin.rs index 162362d3e..9f0e0be8a 100644 --- a/soroban-env-host/src/native_contract/token/admin.rs +++ b/soroban-env-host/src/native_contract/token/admin.rs @@ -19,7 +19,6 @@ pub fn write_administrator(e: &Host, id: Address) -> Result<(), HostError> { key.try_into_val(e)?, id.try_into_val(e)?, StorageType::Instance, - ().into(), )?; Ok(()) } diff --git a/soroban-env-host/src/native_contract/token/allowance.rs b/soroban-env-host/src/native_contract/token/allowance.rs index bfbdd72b6..e4cfc1bb8 100644 --- a/soroban-env-host/src/native_contract/token/allowance.rs +++ b/soroban-env-host/src/native_contract/token/allowance.rs @@ -88,7 +88,6 @@ pub fn write_allowance( key.try_into_val(e)?, allowance_with_old_expiration.0.try_into_val(e)?, StorageType::Temporary, - ().into(), )?; if allowance_with_old_expiration.0.amount > 0 diff --git a/soroban-env-host/src/native_contract/token/asset_info.rs b/soroban-env-host/src/native_contract/token/asset_info.rs index 4c835f670..90d0a1f06 100644 --- a/soroban-env-host/src/native_contract/token/asset_info.rs +++ b/soroban-env-host/src/native_contract/token/asset_info.rs @@ -9,7 +9,6 @@ pub fn write_asset_info(e: &Host, asset_info: AssetInfo) -> Result<(), HostError key.try_into_val(e)?, asset_info.try_into_val(e)?, StorageType::Instance, - ().into(), )?; Ok(()) } diff --git a/soroban-env-host/src/native_contract/token/balance.rs b/soroban-env-host/src/native_contract/token/balance.rs index 70857cc2f..3845e5849 100644 --- a/soroban-env-host/src/native_contract/token/balance.rs +++ b/soroban-env-host/src/native_contract/token/balance.rs @@ -63,7 +63,6 @@ fn write_balance(e: &Host, addr: Address, balance: BalanceValue) -> Result<(), H key.try_into_val(e)?, balance.try_into_val(e)?, StorageType::Persistent, - ().into(), )?; e.bump_contract_data( @@ -414,24 +413,36 @@ fn transfer_account_balance(e: &Host, account_id: AccountId, amount: i64) -> Res let lk = e.to_account_key(account_id)?; e.with_mut_storage(|storage| { - let mut le = storage - .get(&lk, e.as_budget()) - .map_err(|_| e.error(ContractError::AccountMissingError.into(), "account missing", &[]))?; + let mut le = storage.get(&lk, e.as_budget()).map_err(|_| { + e.error( + ContractError::AccountMissingError.into(), + "account missing", + &[], + ) + })?; let mut ae = match &le.data { LedgerEntryData::Account(ae) => Ok(ae.metered_clone(e)?), - _ => Err(e.error(ContractError::InternalError.into(), "unexpected entry found", &[])), + _ => Err(e.error( + ContractError::InternalError.into(), + "unexpected entry found", + &[], + )), }?; let (min_balance, max_balance) = get_min_max_account_balance(e, &ae)?; let Some(new_balance) = ae.balance.checked_add(amount) else { - return Err(e.error(ContractError::BalanceError.into(), "resulting balance overflow", &[])); + return Err(e.error( + ContractError::BalanceError.into(), + "resulting balance overflow", + &[], + )); }; if new_balance >= min_balance && new_balance <= max_balance { ae.balance = new_balance; le = Host::ledger_entry_from_data(e, LedgerEntryData::Account(ae))?; - storage.put(&lk, &le, e.as_budget()) + storage.put(&lk, &le, None, e.as_budget()) } else { Err(err!( e, @@ -455,23 +466,35 @@ fn transfer_trustline_balance( let lk = e.to_trustline_key(account_id, asset)?; e.with_mut_storage(|storage| { let mut le = storage.get(&lk, e.as_budget()).map_err(|_| { - e.error(ContractError::TrustlineMissingError.into(), "trustline missing", &[]) + e.error( + ContractError::TrustlineMissingError.into(), + "trustline missing", + &[], + ) })?; let mut tl = match &le.data { LedgerEntryData::Trustline(tl) => Ok(tl.metered_clone(e)?), - _ => Err(e.error(ContractError::InternalError.into(), "unexpected entry found", &[])), + _ => Err(e.error( + ContractError::InternalError.into(), + "unexpected entry found", + &[], + )), }?; let (min_balance, max_balance) = get_min_max_trustline_balance(e, &tl)?; let Some(new_balance) = tl.balance.checked_add(amount) else { - return Err(e.error(ContractError::BalanceError.into(), "resulting balance overflow", &[])); + return Err(e.error( + ContractError::BalanceError.into(), + "resulting balance overflow", + &[], + )); }; if new_balance >= min_balance && new_balance <= max_balance { tl.balance = new_balance; le = Host::ledger_entry_from_data(e, LedgerEntryData::Trustline(tl))?; - storage.put(&lk, &le, e.as_budget()) + storage.put(&lk, &le, None, e.as_budget()) } else { Err(err!( e, @@ -772,7 +795,7 @@ fn set_trustline_authorization( tl.flags |= TrustLineFlags::AuthorizedToMaintainLiabilitiesFlag as u32; } le = Host::ledger_entry_from_data(e, LedgerEntryData::Trustline(tl))?; - storage.put(&lk, &le, e.as_budget()) + storage.put(&lk, &le, None, e.as_budget()) }) } diff --git a/soroban-env-host/src/native_contract/token/metadata.rs b/soroban-env-host/src/native_contract/token/metadata.rs index ef4501419..00d378159 100644 --- a/soroban-env-host/src/native_contract/token/metadata.rs +++ b/soroban-env-host/src/native_contract/token/metadata.rs @@ -61,7 +61,6 @@ pub fn set_metadata(e: &Host) -> Result<(), HostError> { key.try_into_val(e)?, metadata.try_into_val(e)?, StorageType::Instance, - ().into(), )?; Ok(()) } diff --git a/soroban-env-host/src/storage.rs b/soroban-env-host/src/storage.rs index 6c0ffebcd..0cfb23562 100644 --- a/soroban-env-host/src/storage.rs +++ b/soroban-env-host/src/storage.rs @@ -7,21 +7,18 @@ //! - [Env::put_contract_data](crate::Env::put_contract_data) //! - [Env::del_contract_data](crate::Env::del_contract_data) -use std::cmp::min; use std::rc::Rc; use soroban_env_common::xdr::{ScErrorCode, ScErrorType}; use soroban_env_common::{Compare, Val}; use crate::budget::Budget; -use crate::host::ledger_info_helper::{get_entry_expiration, set_entry_expiration}; -use crate::host::metered_clone::{MeteredAlloc, MeteredClone}; use crate::xdr::{LedgerEntry, LedgerKey}; use crate::Host; use crate::{host::metered_map::MeteredOrdMap, HostError}; pub type FootprintMap = MeteredOrdMap, AccessType, Budget>; -pub type StorageMap = MeteredOrdMap, Option>, Budget>; +pub type StorageMap = MeteredOrdMap, Option<(Rc, Option)>, Budget>; #[derive(Clone)] pub(crate) struct InstanceStorageMap { pub(crate) map: MeteredOrdMap, @@ -69,7 +66,8 @@ impl Compare for Budget { /// A helper type used by [FootprintMode::Recording] to provide access /// to a stable read-snapshot of a ledger. pub trait SnapshotSource { - fn get(&self, key: &Rc) -> Result, HostError>; + // Returns the ledger entry for the key and its expiration. + fn get(&self, key: &Rc) -> Result<(Rc, Option), HostError>; fn has(&self, key: &Rc) -> Result; } @@ -208,14 +206,41 @@ impl Storage { self.prepare_read_only_access(key, budget)?; match self.map.get::>(key, budget)? { None | Some(None) => Err((ScErrorType::Storage, ScErrorCode::MissingValue).into()), - Some(Some(val)) => Ok(Rc::clone(val)), + Some(Some((val, _))) => Ok(Rc::clone(val)), + } + } + + /// Attempts to retrieve the [LedgerEntry] associated with a given + /// [LedgerKey] and its expiration ledger (if applicable) in the [Storage], + /// returning an error if the key is not found. + /// + /// Expiration ledgers only exist for `ContractData` and `ContractCode` + /// ledger entries and are `None` for all the other entry kinds. + /// + /// In [FootprintMode::Recording] mode, records the read [LedgerKey] in the + /// [Footprint] as [AccessType::ReadOnly] (unless already recorded as + /// [AccessType::ReadWrite]) and reads through to the underlying + /// [SnapshotSource], if the [LedgerKey] has not yet been loaded. + /// + /// In [FootprintMode::Enforcing] mode, succeeds only if the read + /// [LedgerKey] has been declared in the [Footprint]. + pub fn get_with_expiration( + &mut self, + key: &Rc, + budget: &Budget, + ) -> Result<(Rc, Option), HostError> { + let _span = tracy_span!("storage get"); + self.prepare_read_only_access(key, budget)?; + match self.map.get::>(key, budget)? { + None | Some(None) => Err((ScErrorType::Storage, ScErrorCode::MissingValue).into()), + Some(Some((val, expiration))) => Ok((Rc::clone(val), *expiration)), } } fn put_opt( &mut self, key: &Rc, - val: Option<&Rc>, + val: Option<(&Rc, Option)>, budget: &Budget, ) -> Result<(), HostError> { let ty = AccessType::ReadWrite; @@ -227,9 +252,11 @@ impl Storage { self.footprint.enforce_access(key, ty, budget)?; } }; - self.map = self - .map - .insert(Rc::clone(key), val.map(Rc::clone), budget)?; + self.map = self.map.insert( + Rc::clone(key), + val.map(|(e, expiration)| (Rc::clone(e), expiration)), + budget, + )?; Ok(()) } @@ -246,10 +273,11 @@ impl Storage { &mut self, key: &Rc, val: &Rc, + expiration_ledger: Option, budget: &Budget, ) -> Result<(), HostError> { let _span = tracy_span!("storage put"); - self.put_opt(key, Some(val), budget) + self.put_opt(key, Some((val, expiration_ledger)), budget) } /// Attempts to delete the [LedgerEntry] associated with a given [LedgerKey] @@ -293,13 +321,8 @@ impl Storage { /// This operation is only defined within a host as it relies on ledger /// state. /// - /// This is always considered a 'read-only' operation, even though it might - /// modify the internal storage state. The only fields of the 'read-only' - /// entries it modifies are their expiry ledgers, and the higher level logic - /// that processes the side effects of a transaction is supposed to - /// separately extract and write back to stable storage just the changed - /// expiry times of "read-only" entries, not even considering the - /// possibility of anything else about them changing. + /// This operation does not modify any ledger entries, but does change the + /// internal storage pub fn bump( &mut self, host: &Host, @@ -322,8 +345,8 @@ impl Storage { // Bumping deleted/non-existing/out-of-footprint entries will result in // an error. - let old_entry = self.get(&key, host.budget_ref())?; - let old_expiration = get_entry_expiration(old_entry.as_ref()).ok_or_else(|| { + let (entry, old_expiration) = self.get_with_expiration(&key, host.budget_ref())?; + let old_expiration = old_expiration.ok_or_else(|| { host.err( ScErrorType::Storage, ScErrorCode::InternalError, @@ -333,56 +356,9 @@ impl Storage { })?; if new_expiration > old_expiration { - let mut new_entry = (*old_entry).metered_clone(host)?; - set_entry_expiration(&mut new_entry, new_expiration); self.map = self.map.insert( key, - Some(Rc::metered_new(new_entry, host)?), - host.budget_ref(), - )?; - } - Ok(()) - } - - /// Bumps `key` to live for at least `bump_by_ledgers` from the current - /// expiration of the entry. - /// - /// This should only be used for internal autobumps. - /// - /// This operation is only defined within a host as it relies on ledger - /// state. - /// - /// This is always considered a 'read-only' operation, even though it might - /// modify the internal storage state. - pub(crate) fn bump_relative_to_entry_expiration( - &mut self, - host: &Host, - key: Rc, - bump_by_ledgers: u32, - ) -> Result<(), HostError> { - let _span = tracy_span!("bump key relative"); - // Bumping deleted/non-existing/out-of-footprint entries will result in - // an error. - let old_entry = self.get(&key, host.budget_ref())?; - let old_expiration = get_entry_expiration(old_entry.as_ref()).ok_or_else(|| { - host.err( - ScErrorType::Storage, - ScErrorCode::InternalError, - "trying to bump non-expirable entry", - &[], - ) - })?; - let new_expiration = min( - old_expiration.saturating_add(bump_by_ledgers), - host.max_expiration_ledger()?, - ); - - if new_expiration > old_expiration { - let mut new_entry = (*old_entry).metered_clone(host)?; - set_entry_expiration(&mut new_entry, new_expiration); - self.map = self.map.insert( - key, - Some(Rc::metered_new(new_entry, host)?), + Some((entry.clone(), Some(new_expiration))), host.budget_ref(), )?; } @@ -406,7 +382,7 @@ impl Storage { } else { None }; - self.map = self.map.insert(Rc::clone(key), value, budget)?; + self.map = self.map.insert(key.clone(), value, budget)?; } } FootprintMode::Enforcing => { @@ -424,7 +400,7 @@ mod test_footprint { use super::*; use crate::budget::Budget; - use crate::xdr::{ContractDataDurability, ContractEntryBodyType, LedgerKeyContractData, ScVal}; + use crate::xdr::{ContractDataDurability, LedgerKeyContractData, ScVal}; #[test] fn footprint_record_access() -> Result<(), HostError> { @@ -432,15 +408,11 @@ mod test_footprint { budget.reset_unlimited()?; let mut fp = Footprint::default(); // record when key not exist - let key = Rc::metered_new( - LedgerKey::ContractData(LedgerKeyContractData { - contract: ScAddress::Contract([0; 32].into()), - key: ScVal::I32(0), - durability: ContractDataDurability::Persistent, - body_type: ContractEntryBodyType::DataEntry, - }), - &budget, - )?; + let key = Rc::new(LedgerKey::ContractData(LedgerKeyContractData { + contract: ScAddress::Contract([0; 32].into()), + key: ScVal::I32(0), + durability: ContractDataDurability::Persistent, + })); fp.record_access(&key, AccessType::ReadOnly, &budget)?; assert_eq!(fp.0.contains_key::(&key, &budget)?, true); assert_eq!( @@ -464,37 +436,18 @@ mod test_footprint { #[test] fn footprint_enforce_access() -> Result<(), HostError> { let budget = Budget::default(); - let key = Rc::metered_new( - LedgerKey::ContractData(LedgerKeyContractData { - contract: ScAddress::Contract([0; 32].into()), - key: ScVal::I32(0), - durability: ContractDataDurability::Persistent, - body_type: ContractEntryBodyType::DataEntry, - }), - &budget, - )?; + let key = Rc::new(LedgerKey::ContractData(LedgerKeyContractData { + contract: ScAddress::Contract([0; 32].into()), + key: ScVal::I32(0), + durability: ContractDataDurability::Persistent, + })); // Key not in footprint. Only difference is type_ - let key2 = Rc::metered_new( - LedgerKey::ContractData(LedgerKeyContractData { - contract: ScAddress::Contract([0; 32].into()), - key: ScVal::I32(0), - durability: ContractDataDurability::Temporary, - body_type: ContractEntryBodyType::DataEntry, - }), - &budget, - )?; - - // Key not in footprint. Only difference is body_type - let key3 = Rc::metered_new( - LedgerKey::ContractData(LedgerKeyContractData { - contract: ScAddress::Contract([0; 32].into()), - key: ScVal::I32(0), - durability: ContractDataDurability::Persistent, - body_type: ContractEntryBodyType::ExpirationExtension, - }), - &budget, - )?; + let key2 = Rc::new(LedgerKey::ContractData(LedgerKeyContractData { + contract: ScAddress::Contract([0; 32].into()), + key: ScVal::I32(0), + durability: ContractDataDurability::Temporary, + })); let om = [(Rc::clone(&key), AccessType::ReadOnly)].into(); let mom = MeteredOrdMap::from_map(om, &budget)?; @@ -502,10 +455,6 @@ mod test_footprint { assert!(fp .enforce_access(&key2, AccessType::ReadOnly, &budget) .is_err()); - assert!(fp - .enforce_access(&key3, AccessType::ReadOnly, &budget) - .is_err()); - fp.enforce_access(&key, AccessType::ReadOnly, &budget)?; fp.0 = fp.0.insert(Rc::clone(&key), AccessType::ReadWrite, &budget)?; @@ -518,15 +467,11 @@ mod test_footprint { fn footprint_enforce_access_not_exist() -> Result<(), HostError> { let budget = Budget::default(); let mut fp = Footprint::default(); - let key = Rc::metered_new( - LedgerKey::ContractData(LedgerKeyContractData { - contract: ScAddress::Contract([0; 32].into()), - key: ScVal::I32(0), - durability: ContractDataDurability::Persistent, - body_type: ContractEntryBodyType::DataEntry, - }), - &budget, - )?; + let key = Rc::new(LedgerKey::ContractData(LedgerKeyContractData { + contract: ScAddress::Contract([0; 32].into()), + key: ScVal::I32(0), + durability: ContractDataDurability::Persistent, + })); let res = fp.enforce_access(&key, AccessType::ReadOnly, &budget); assert!(HostError::result_matches_err( res, @@ -538,15 +483,11 @@ mod test_footprint { #[test] fn footprint_attempt_to_write_readonly_entry() -> Result<(), HostError> { let budget = Budget::default(); - let key = Rc::metered_new( - LedgerKey::ContractData(LedgerKeyContractData { - contract: ScAddress::Contract([0; 32].into()), - key: ScVal::I32(0), - durability: ContractDataDurability::Persistent, - body_type: ContractEntryBodyType::DataEntry, - }), - &budget, - )?; + let key = Rc::new(LedgerKey::ContractData(LedgerKeyContractData { + contract: ScAddress::Contract([0; 32].into()), + key: ScVal::I32(0), + durability: ContractDataDurability::Persistent, + })); let om = [(Rc::clone(&key), AccessType::ReadOnly)].into(); let mom = MeteredOrdMap::from_map(om, &budget)?; let mut fp = Footprint(mom); @@ -567,17 +508,17 @@ pub(crate) mod test_storage { use super::*; #[allow(dead_code)] - pub(crate) struct MockSnapshotSource(BTreeMap, Rc>); + pub(crate) struct MockSnapshotSource(BTreeMap, (Rc, Option)>); #[allow(dead_code)] impl MockSnapshotSource { pub(crate) fn new() -> Self { - Self(BTreeMap::, Rc>::new()) + Self(BTreeMap::, (Rc, Option)>::new()) } } impl SnapshotSource for MockSnapshotSource { - fn get(&self, key: &Rc) -> Result, HostError> { + fn get(&self, key: &Rc) -> Result<(Rc, Option), HostError> { if let Some(val) = self.0.get(key) { - Ok(Rc::clone(&val)) + Ok((Rc::clone(&val.0), val.1)) } else { Err( Error::from_type_and_code(ScErrorType::Storage, ScErrorCode::MissingValue) diff --git a/soroban-env-host/src/test/auth.rs b/soroban-env-host/src/test/auth.rs index fcda0f75e..6dba8925c 100644 --- a/soroban-env-host/src/test/auth.rs +++ b/soroban-env-host/src/test/auth.rs @@ -229,13 +229,9 @@ impl AuthTest { if !storage.has(&nonce_key, self.host.budget_ref())? { return Ok(None); } - let entry = storage.get(&nonce_key, self.host.budget_ref())?; - match &entry.data { - soroban_env_common::xdr::LedgerEntryData::ContractData(contract_data) => { - Ok(Some(contract_data.expiration_ledger_seq)) - } - _ => panic!("unexpected entry"), - } + let (_, expiration_ledger) = + storage.get_with_expiration(&nonce_key, self.host.budget_ref())?; + Ok(expiration_ledger) }) .unwrap() } diff --git a/soroban-env-host/src/test/complex.rs b/soroban-env-host/src/test/complex.rs index 3025e6fa8..c9f3279aa 100644 --- a/soroban-env-host/src/test/complex.rs +++ b/soroban-env-host/src/test/complex.rs @@ -20,7 +20,6 @@ fn run_complex() -> Result<(), HostError> { min_persistent_entry_expiration: 4096, min_temp_entry_expiration: 16, max_entry_expiration: 6312000, - autobump_ledgers: 0, }; let account_id = generate_account_id(); let salt = generate_bytes_array(); diff --git a/soroban-env-host/src/test/ledger.rs b/soroban-env-host/src/test/ledger.rs index 05c11c928..e98b02bd3 100644 --- a/soroban-env-host/src/test/ledger.rs +++ b/soroban-env-host/src/test/ledger.rs @@ -22,7 +22,6 @@ fn ledger_network_id() -> Result<(), HostError> { min_persistent_entry_expiration: 4096, min_temp_entry_expiration: 16, max_entry_expiration: 6312000, - autobump_ledgers: 0, })?; let obj = host.get_ledger_network_id()?; let np = host.visit_obj(obj, |np: &ScBytes| Ok(np.to_vec()))?; diff --git a/soroban-env-host/src/test/lifecycle.rs b/soroban-env-host/src/test/lifecycle.rs index 1954d2441..8c3e2239d 100644 --- a/soroban-env-host/src/test/lifecycle.rs +++ b/soroban-env-host/src/test/lifecycle.rs @@ -13,8 +13,7 @@ use crate::{ }; use sha2::{Digest, Sha256}; use soroban_env_common::xdr::{ - ContractCodeEntryBody, ContractDataEntry, ContractDataEntryBody, ContractIdPreimage, - ContractIdPreimageFromAddress, DepthLimitedWrite, HostFunction, ScAddress, + ContractIdPreimage, ContractIdPreimageFromAddress, DepthLimitedWrite, HostFunction, ScAddress, SorobanAuthorizationEntry, SorobanAuthorizedFunction, SorobanAuthorizedInvocation, SorobanCredentials, VecM, DEFAULT_XDR_RW_DEPTH_LIMIT, }; @@ -30,15 +29,12 @@ fn get_contract_wasm_ref(host: &Host, contract_id: Hash) -> Hash { assert!(s.has(&storage_key, host.as_budget()).unwrap()); match &s.get(&storage_key, host.as_budget()).unwrap().data { - LedgerEntryData::ContractData(ContractDataEntry { body, .. }) => match body { - ContractDataEntryBody::DataEntry(data) => match &data.val { - ScVal::ContractInstance(i) => match &i.executable { - ContractExecutable::Wasm(h) => Ok(h.clone()), - _ => panic!("expectecd Wasm executable"), - }, - _ => panic!("expected ContractInstance"), + LedgerEntryData::ContractData(e) => match &e.val { + ScVal::ContractInstance(i) => match &i.executable { + ContractExecutable::Wasm(h) => Ok(h.clone()), + _ => panic!("expectecd Wasm executable"), }, - _ => panic!("expected DataEntry"), + _ => panic!("expected ContractInstance"), }, _ => panic!("expected contract data"), } @@ -52,10 +48,7 @@ fn get_contract_wasm(host: &Host, wasm_hash: Hash) -> Vec { assert!(s.has(&storage_key, host.as_budget()).unwrap()); match &s.get(&storage_key, host.as_budget()).unwrap().data { - LedgerEntryData::ContractCode(code_entry) => match &code_entry.body { - ContractCodeEntryBody::DataEntry(code) => Ok(code.to_vec()), - _ => panic!("expected DataEntry"), - }, + LedgerEntryData::ContractCode(code_entry) => Ok(code_entry.code.to_vec()), _ => panic!("expected contract WASM code"), } }) diff --git a/soroban-env-host/src/test/metering_benchmark.rs b/soroban-env-host/src/test/metering_benchmark.rs index 5eb304885..d09340bc0 100644 --- a/soroban-env-host/src/test/metering_benchmark.rs +++ b/soroban-env-host/src/test/metering_benchmark.rs @@ -29,7 +29,6 @@ const LEDGER_INFO: LedgerInfo = LedgerInfo { min_persistent_entry_expiration: 4096, min_temp_entry_expiration: 16, max_entry_expiration: 6312000, - autobump_ledgers: 0, }; #[ignore] diff --git a/soroban-env-host/src/test/prng.rs b/soroban-env-host/src/test/prng.rs index f493054fc..a6026203e 100644 --- a/soroban-env-host/src/test/prng.rs +++ b/soroban-env-host/src/test/prng.rs @@ -29,7 +29,7 @@ pub struct PRNGUsingTest; impl ContractFunctionSet for PRNGUsingTest { fn call(&self, func: &Symbol, host: &Host, args: &[Val]) -> Option { let Ok(func) = SymbolSmall::try_from(func.to_val()) else { - return None + return None; }; let val = if func == BYTES_NEW { host.prng_bytes_new(U32Val::from(SEED_LEN)) diff --git a/soroban-env-host/src/test/token.rs b/soroban-env-host/src/test/token.rs index 6436f9661..1246037e7 100644 --- a/soroban-env-host/src/test/token.rs +++ b/soroban-env-host/src/test/token.rs @@ -58,7 +58,6 @@ impl TokenTest { min_persistent_entry_expiration: 4096, min_temp_entry_expiration: 16, max_entry_expiration: 6_312_000, - autobump_ledgers: 0, }) .unwrap(); Self { @@ -182,7 +181,7 @@ impl TokenTest { &self.host, LedgerEntryData::Account(account), )?; - s.put(key, &update, self.host.as_budget()) + s.put(key, &update, None, self.host.as_budget()) } _ => unreachable!(), } @@ -245,6 +244,7 @@ impl TokenTest { LedgerEntryData::Trustline(trustline_entry), ) .unwrap(), + None, ) .unwrap(); @@ -262,7 +262,7 @@ impl TokenTest { &self.host, LedgerEntryData::Trustline(trustline), )?; - s.put(key, &update, self.host.as_budget()) + s.put(key, &update, None, self.host.as_budget()) } _ => unreachable!(), } diff --git a/soroban-env-host/src/test/util.rs b/soroban-env-host/src/test/util.rs index fa3292390..c1e2d263c 100644 --- a/soroban-env-host/src/test/util.rs +++ b/soroban-env-host/src/test/util.rs @@ -87,7 +87,6 @@ impl Host { min_persistent_entry_expiration: 4096, min_temp_entry_expiration: 16, max_entry_expiration: 6_312_000, - autobump_ledgers: 0, }) .unwrap(); host diff --git a/soroban-test-wasms/wasm-workspace/Cargo.lock b/soroban-test-wasms/wasm-workspace/Cargo.lock index fad67ab4c..aa833d08d 100644 --- a/soroban-test-wasms/wasm-workspace/Cargo.lock +++ b/soroban-test-wasms/wasm-workspace/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -56,9 +56,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -99,15 +99,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -123,12 +114,6 @@ version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - [[package]] name = "bytes-lit" version = "0.0.5" @@ -143,9 +128,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -168,9 +156,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "core-foundation-sys" @@ -180,9 +168,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -205,7 +193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -222,27 +210,14 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1586fa608b1dab41f667475b4a41faec5ba680aee428bfa5de4ea520fdc6e901" +checksum = "1f34ba9a9bcb8645379e9de8cb3ecfcf4d1c85ba66d90deb3259206fa5aa193b" dependencies = [ "quote", "syn", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "4.0.0" @@ -252,7 +227,7 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest 0.10.7", + "digest", "fiat-crypto", "platforms", "rustc_version", @@ -273,9 +248,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ "darling_core", "darling_macro", @@ -283,9 +258,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", @@ -297,9 +272,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", @@ -308,14 +283,23 @@ dependencies = [ [[package]] name = "der" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +dependencies = [ + "serde", +] + [[package]] name = "derive_arbitrary" version = "1.3.1" @@ -327,22 +311,13 @@ dependencies = [ "syn", ] -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -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", + "block-buffer", "const-oid", "crypto-common", "subtle", @@ -356,49 +331,26 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "ecdsa" -version = "0.16.7" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ "der", - "digest 0.10.7", + "digest", "elliptic-curve", "rfc6979", - "signature 2.1.0", + "signature", "spki", ] [[package]] name = "ed25519" -version = "1.5.3" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - -[[package]] -name = "ed25519" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb04eee5d9d907f29e80ee6b0e78f7e2c82342c63e3580d8c4f69d9d5aad963" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ "pkcs8", - "signature 2.1.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", + "signature", ] [[package]] @@ -407,19 +359,19 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ - "curve25519-dalek 4.0.0", - "ed25519 2.2.1", - "rand_core 0.6.4", + "curve25519-dalek", + "ed25519", + "rand_core", "serde", - "sha2 0.10.6", + "sha2", "zeroize", ] [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -429,17 +381,23 @@ checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ "base16ct", "crypto-bigint", - "digest 0.10.7", + "digest", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.4", + "rand_core", "sec1", "subtle", "zeroize", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "ethnum" version = "1.3.2" @@ -558,7 +516,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -585,17 +543,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.10" @@ -605,15 +552,15 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] [[package]] name = "gimli" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "group" @@ -622,7 +569,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -632,6 +579,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "hex" version = "0.4.3" @@ -647,7 +600,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -686,7 +639,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", "serde", ] @@ -707,9 +671,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" @@ -730,8 +694,8 @@ dependencies = [ "ecdsa", "elliptic-curve", "once_cell", - "sha2 0.10.6", - "signature 2.1.0", + "sha2", + "signature", ] [[package]] @@ -745,9 +709,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libm" @@ -757,9 +721,9 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" @@ -769,18 +733,18 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -810,18 +774,18 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "object" -version = "0.30.4" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] @@ -832,17 +796,11 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pkcs8" @@ -868,9 +826,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.6" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b69d39aab54d069e7f2fe8cb970493e7834601ca2d8c65fd7bbd183578080d1" +checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", "syn", @@ -878,35 +836,22 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.60" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -914,18 +859,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -935,16 +870,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -953,16 +879,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -992,15 +909,15 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "sec1" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -1012,24 +929,24 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" dependencies = [ "proc-macro2", "quote", @@ -1038,9 +955,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -1049,14 +966,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.0.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02d8aa6e3c385bf084924f660ce2a3a6bd333ba55b35e8590b321f35d88513" +checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237" dependencies = [ "base64 0.21.2", "chrono", "hex", - "indexmap", + "indexmap 1.9.3", + "indexmap 2.0.0", "serde", "serde_json", "serde_with_macros", @@ -1065,9 +983,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.0.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070" +checksum = "2e6be15c453eb305019bfa438b1593c731f36a289a7853f7707ee29e870b3b3c" dependencies = [ "darling", "proc-macro2", @@ -1077,26 +995,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -1105,31 +1010,25 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.7", + "digest", "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", + "digest", + "rand_core", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "soroban-env-common" @@ -1144,7 +1043,7 @@ dependencies = [ "soroban-env-macros", "soroban-wasmi", "static_assertions", - "stellar-xdr", + "stellar-xdr 0.0.17 (git+https://github.com/stellar/rs-stellar-xdr?rev=936273b737b99d79eee7a28dd4823436d0bd0abb)", ] [[package]] @@ -1160,18 +1059,18 @@ name = "soroban-env-host" version = "0.0.17" dependencies = [ "backtrace", - "curve25519-dalek 4.0.0", - "ed25519-dalek 2.0.0", - "getrandom 0.2.10", + "curve25519-dalek", + "ed25519-dalek", + "getrandom", "hex", "k256", "log", "num-derive", "num-integer", "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", - "sha2 0.10.6", + "rand", + "rand_chacha", + "sha2", "sha3", "soroban-env-common", "soroban-native-sdk-macros", @@ -1189,7 +1088,7 @@ dependencies = [ "quote", "serde", "serde_json", - "stellar-xdr", + "stellar-xdr 0.0.17 (git+https://github.com/stellar/rs-stellar-xdr?rev=936273b737b99d79eee7a28dd4823436d0bd0abb)", "syn", ] @@ -1221,8 +1120,8 @@ dependencies = [ "arbitrary", "bytes-lit", "ctor", - "ed25519-dalek 1.0.1", - "rand 0.7.3", + "ed25519-dalek", + "rand", "soroban-env-guest", "soroban-env-host", "soroban-ledger-snapshot", @@ -1240,11 +1139,11 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "sha2 0.9.9", + "sha2", "soroban-env-common", "soroban-spec", "soroban-spec-rust", - "stellar-xdr", + "stellar-xdr 0.0.17 (git+https://github.com/stellar/rs-stellar-xdr?rev=e2a9cbf72d94941de1bde6ba34a38e1f49328567)", "syn", ] @@ -1253,7 +1152,7 @@ name = "soroban-spec" version = "0.9.2" dependencies = [ "base64 0.13.1", - "stellar-xdr", + "stellar-xdr 0.0.17 (git+https://github.com/stellar/rs-stellar-xdr?rev=e2a9cbf72d94941de1bde6ba34a38e1f49328567)", "thiserror", "wasmparser", ] @@ -1265,9 +1164,9 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "sha2 0.9.9", + "sha2", "soroban-spec", - "stellar-xdr", + "stellar-xdr 0.0.17 (git+https://github.com/stellar/rs-stellar-xdr?rev=e2a9cbf72d94941de1bde6ba34a38e1f49328567)", "syn", "thiserror", ] @@ -1325,7 +1224,7 @@ dependencies = [ [[package]] name = "stellar-xdr" version = "0.0.17" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=4876e5eb20016caebbd13bcf6401626dc6073b8e#4876e5eb20016caebbd13bcf6401626dc6073b8e" +source = "git+https://github.com/stellar/rs-stellar-xdr?rev=936273b737b99d79eee7a28dd4823436d0bd0abb#936273b737b99d79eee7a28dd4823436d0bd0abb" dependencies = [ "arbitrary", "base64 0.13.1", @@ -1335,6 +1234,17 @@ dependencies = [ "serde_with", ] +[[package]] +name = "stellar-xdr" +version = "0.0.17" +source = "git+https://github.com/stellar/rs-stellar-xdr?rev=e2a9cbf72d94941de1bde6ba34a38e1f49328567#e2a9cbf72d94941de1bde6ba34a38e1f49328567" +dependencies = [ + "crate-git-revision", + "hex", + "serde", + "serde_with", +] + [[package]] name = "strsim" version = "0.10.0" @@ -1349,9 +1259,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "2.0.18" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -1367,18 +1277,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", @@ -1387,10 +1297,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.22" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" dependencies = [ + "deranged", "itoa", "serde", "time-core", @@ -1405,9 +1316,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" dependencies = [ "time-core", ] @@ -1420,9 +1331,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "version_check" @@ -1430,12 +1341,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wasi" -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" @@ -1518,7 +1423,7 @@ version = "0.88.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb8cf7dd82407fe68161bedcd57fde15596f32ebf6e9b3bdbf3ae1da20e38e5e" dependencies = [ - "indexmap", + "indexmap 1.9.3", ] [[package]] @@ -1563,9 +1468,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -1578,62 +1483,48 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "zeroize" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/soroban-test-wasms/wasm-workspace/opt/auth_test_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/auth_test_contract.wasm index 727bab1f25ebee09a0b5aa6d979a8f81ef0aa48f..9e541f0952c20e083bf722ea0a89593174cc49a7 100644 GIT binary patch delta 497 zcmYk2&ubG=5Xaxldoe#Yt=nIq37EHODJisNcWs*OEzgU15s`}Lb$0{4&=g7<@gk|G zq9+|GUhL6>Ct*Rwi+ZvbvGr6$Q4rBTLGr@QD^q&AtYt0=h?67AE9Nm0WkQ!vh@FL)|HXdYy>`+O71X^$5GO0*@) zP^L%Xg86@l?@&tLW%dxB(N69LP3G^xLwcOA3!LLFeac_0Fp26H({r3jW*179EMS`25_yS;G}`Q1$z-nNjFudDE=Oofl0BYL97&T4ozY zx+!W0i(pwpHE7hB+tKRC72xz_7CIDfSdUSlo()=2EASevB=n-C Yz;joEAoi0eytWWu-{{^<4<|mtU&g3(W&i*H delta 515 zcmZvXF-RL>6vw~!eRna*MSE%%bF}^L3=$zq%$=SY3LY+%b}ALSp1A~ip()7KqJw5~ zRP=2wBCZ_@hbT@h9cm{VXiE!1hvFo~wRGwWf$HG@^PyBcJ+wH9Brmx>I>1~duYcNThYTJM;i!+m8Aa(Jm+fDyOVQw}G%n|$3Pl~KV= zhW)8+*u#U=BrrTrE!+pmy+16ZP=cP$X;cnWnqgY!o#T^qF!qctY3tC$^B%Z znH*-`OlT>2Mn-Q~BG06t>K*x-w15Qhkb(pSNQ2pJ3iB!fV=u+{9xcC z#QWJFAlbeC>dR)d0*qzkqc72>t}T^?{q6_vX#aoAI~!XMFTdpB=xyM4#;O=VvP(scXumT}~q< zB*ux~V^wo3bQcdez%Qm%Nr>VMgiAfNEJK=sGV4@EZoU4YAkGxG5XJXRE9_z~)^&`Kmc5ERhE-HI+a zxGHFrqeVfIM_q11?!j(G5;;BuL;`+MTA+*dnX|zxoJL}Yy~9x54FzxuHkh`9>3DGF zbZWzS;>~%uze<ZQ{bj<}GkP@j#fcOK>U( zNgA><6cuX1C;V`Y(;u=Hfs1s^1ru7v0*!4jyWN$z{Q@Sk2^vvC$XrkYvk)*oQ6?m?6d9$i!08x)OO6ru=X(bQByh+<+5Wkc>E8{C8a5 z$_~Hb-U47t!Plokh?lQ&^So$_Ro)ym^W}V%WqGk&Hzy}$ Vksnv{wrHz$byPiS-=6g!{{ewOVz>YR diff --git a/soroban-test-wasms/wasm-workspace/opt/example_add_i32.wasm b/soroban-test-wasms/wasm-workspace/opt/example_add_i32.wasm index 4830bbcf744d355875875e71530712c2a75a6830..4138938da2baa281c1183c8189082dbdd9a2e4a5 100644 GIT binary patch delta 546 zcmXw0J#W-N5Z#^GHBK&t3yO$S(5yKjrvRM~u$S%@3Gw{{D9wFHtUHJzsFDuR5xIgc zMU=mh-@<>O=dBOqV)wmy^XBdN&#j;Nk8kwLUVNYG-xpWi8PC)`6^g#3nGzBcBp$PB zITw0{103MBS*l683t7iK9O@+cH{QgG4Hfu2mj z7qO(Enlmael^eo5u??AopewV6(x`(dyPH_a`oO0pM2AT$nea$ZLT{!G-3~}q(X50; zMN(#cX;bah)RAO?PXJLsUbI$lvC##a!XjxVc6@gls{644X~Cw@b_~5gCJVZ-X+8V9 z_3+^6C~XnN!-)M=cvyi1$1F~d9dI-;QKDO}aG+MSJWn^s10_Q*2FU+kzWL`KmOZQu zHecvFvKQ1#$?@&Ql3#y*j@%|G@SAwJp|`_(zN`K4g)6-nF8Th$#b({DeOuiNdWt5=VGJ%8%`da+q`A0DhfemeO&O!(bj5+GAo delta 513 zcmXv~Jx;?=3{LF#LewIWp+iNHa6*OB0SHZ$v|An$13waHXq#5zWdnp@YB$6N%ESQ> zhd@GHfLm|{nDI-?Wc%~y@3Z~l{;WMcz^{0I?ARaAucJA1tsP5wWq@6akc1-LLn}j< z@Q4FrT)v6iYMRXT8Bm^PE>PVDwOD*ws}WEw9iXyO@K_5{U=;%92Qmdw=dKQ%6pYHc zCMTVnlq5N&!dt^?FH3?NKvSJ{QfMi53?U3yFNAL3lz}w8la7z%D7@j48!hcSCT@|` zzQmkR-6PfSu z!*U()=Xj{C84dYr4+wflzFjM^mCyzvJHwCz_dFxP8PgRQqXCH)mxKS0iI=`S1KhT=>H6GI&t< diff --git a/soroban-test-wasms/wasm-workspace/opt/example_alloc.wasm b/soroban-test-wasms/wasm-workspace/opt/example_alloc.wasm index 51d845939755baf4220de78cf1486115e8720995..3127711f3c8c8859b2ec58404195f67d359d084d 100644 GIT binary patch delta 1250 zcmZWo&2G~`5Z+yH96PoX=clD=C73l;l}k|*N*Xw2D;0<$E=W8;X<7+~OR5M_3CXD_ zQn^*ikq6)b`T~fD;K+>w?|=l~*a|=5VDEZ7^UXKk%)D!UZCqVt@2ll+zFf_23mZ?8 z+NL0}|5Lu**H8681XNQQ40QR?vHK*j3F;AKre!w8j|cljA^B!R85 zzXFn)SZA6nF5L?$%=h5O;%w9DM=BU3n(sA z8(9E7L3@FVA~H~cjv7i)nU8WPxYL?3g2ImQS< zI7q|N;)J?b%8=vo-4ynGKA*oXM$$`}Pni30S z`+!%4s*A9+_N-d$-Et!_uEn|+`;cO{W0&HdniH>u$BW11$2=&!A;=eK2d(ebzLbdSe}<9?^Jcdxh8J-pjLIXdZg_D+ruJ4d_y&d&XQ Wf80GjI()u8esMZGyZ&6>lD_~{46iBx delta 1334 zcmZWp&5j#I5bmyNd&V<8_V_28RTe4L%@Qq#pk!^vT25|D30O-myul{UN{msYjVuHb z(l}y4Iph$@M;?G9NI7!h33vofJO&bcH4`BavaIf@uKwz)ud4d@(Rbt5uj`-t@vBtd ztlw3k*!a=0VzvBBf4elFnT5)DL^TZj@<(^0_2|H(vov!u(SkdyOR}_}1$X(z$7aEr zJ13Mp%(bN~C`VKW_@9vRUAX9Q&0kbrKg`uFxOO+8zUF66(*j`Ku;c24l<#r(u2Pkc zxVOqR6Mj+U=^Xnm04gUydgFBtf@F1ur4tNX5C2lWZ!!o2mwIjH34N1g&`1&v)U8M&DA@Z!(gt3X?q zLJSQSCYX{A*|bTQ^bWRwR3%M78OPWiW;HgG%ITJ4295?CeV=L}#VLT|h63uK+w?RX zM5gEg4l{gk%5l-*48l7ti-q{DzjC^Ox|}}96{q2P_p6etREd5)rd6FId+wn~>E;TS z7%GOBt=qW-=d>W#1LNj0Q%O*}hm)Q|S#Xa3>d4zL5O)F)Z9;VA2bD`$y9k9PPF8Zp z5z6|JQXD~K7m0#Z?WBMiCv17J@dx3XD}S>>-$*MB&;!7dJR_%Dq(?d6L<-2Kpsj&; zoXC<`C7longl+A(z4ha8c;yBlHr~i?%odlOZQ(wBgz63upds*O1MDr2x6l6%51zn3 z03&CSHfW-b#1^?UVA1}k$kn2i%0Mc{rY);RS*2=k3kC8P;$;#nkuX3hNg72ORtku+ z$zn3NNiX$f&J6bjLn;uIH5shwKh_vlRGs^nxBnW!vESITptB}g8^$2GD2vr1+>mp* zHx|HJc8iw%SW5*=*<>zZ_bkU^!|tVww~{QiBI%&|3`f1gZ1UvbUItlo=z|BUz|QU jeR}WSboS)(;_>5hHa(l4u4n7{<^2Bq?)vlR+pqryh2Ogb diff --git a/soroban-test-wasms/wasm-workspace/opt/example_complex.wasm b/soroban-test-wasms/wasm-workspace/opt/example_complex.wasm index fb9fc980c4e559449dbcaea8be1c3a8b959c1a0f..62438711bbaeea703e479d267d1e7ca5b525649f 100644 GIT binary patch delta 601 zcmXAlzityj5XNVA)|ZPNg+ovTETXx?LbjAdIfvYxJMT#-LQv4t*zq4JXQco|Aey@? ztaM0;_6evW3J5J7HG*dV(bDk*%sS0}JF_$2{C3`NUT=s@ZPo#yx>mQcnF3U5q5wvSW9V((fCD3 zc7ktx;$})dll_BxsO@cK8$?5iKdJ{F8C*!+4>hQQBGd*#GJP`Z#|m8j5# z&)SK)Yk;AvI+1vE6-Ts)oS%N$4w1>wStLDO<#?TLG09gQtAL81px;o+&!o%2O4bRj znAM8xQ_knPUgpcXu7iM5vcKp#lHJiK_qFU%b3WLfH zBVR1J8LYS5^IE=|tnFX@WtZHtWbM4}Xu$l2LTnw~l^#ON-Q-pF*MS`D_eN=7dE1!T z3$KfP`_+52*Pl(t(=3kD!(_idKFH>ic^0Sh**Km&&f@(+mQDM!$@qA8dh+`0ojvk; F{{gY`YGwcc delta 561 zcmXX?y^0h;5U%R#`MKTWZp00g^`~ZBWDfMa-5FiA=YdnNt{j?pGE@Kn diff --git a/soroban-test-wasms/wasm-workspace/opt/example_create_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/example_create_contract.wasm index fe64dd852d3c3a154c70acc118f12345d7de7c98..3f33964fc69e4d0afa7e7881e636e8fe9723df12 100644 GIT binary patch delta 74 zcmX@XdV+PsdB({)Omd7Clf9WV7>y>EFsbPorKTjNSQr|bo0=IIB^q0#C8t>!nx~~E e8YY`q7#dhwSfm)GCMPE8reqeCR8Bs}7z+R*a~3lI delta 74 zcmX@XdV+PsdB({(Ofi$sG0HQVPkzU!!Du{LoJmbDCC$><*d)ay)i}{G(J0v{)xf~m eBsncHDap*l*wWl6#U#Z%&D_vjHzl*Eq!IvaGZugV diff --git a/soroban-test-wasms/wasm-workspace/opt/example_err.wasm b/soroban-test-wasms/wasm-workspace/opt/example_err.wasm index 12c38e5ca9210d7de8932e8bbcae031eacd5f162..5fb1a13946dabb6dbf346a410144295852878c67 100644 GIT binary patch delta 101 zcmbQwF`r|DCzHIKU~+z5Nl{{QNornMZfZ$lnE?X?hyW>z$%~jZ7>y>MW>(WPN=->j zu`o0=H#IXbN;I}eOHQ*eG*3%SG)y+JFf_2Vut+gVO-@YGP01`Osody<$U{=#JN=->ju`o0=H#IXbN;I}eOHQ*eG*3%S eG)y+JFf_2Vut+gVO-@YGP01`OshsS`tO)=Z^c9Ez delta 74 zcmbQjF@yZnB^JGC+9J1Fd9#u&a9@Fl4faaY?5MW^QP%o03^nQV9SeofUEb diff --git a/soroban-test-wasms/wasm-workspace/opt/example_fib.wasm b/soroban-test-wasms/wasm-workspace/opt/example_fib.wasm index e60db002530b68aaf616317f441746f7d493ff2c..b92f9650df98bdb053cb0bb6eca1391022676631 100644 GIT binary patch delta 70 zcmaFC^nz)^;)!SE7%e8g)?hT6EW)U!XOxiw-8VU?@g30-LB}IwJC8>F3xv3?IWd;loAOfV!CmzyZG@kfcO)n+Q w(%9G}#U#}@(J;{{*(lY(z}O@?Eioy{%*5Ez+$hB)#XQa2&|Ehqv#6vJ0G{9+f&c&j diff --git a/soroban-test-wasms/wasm-workspace/opt/example_hostile.wasm b/soroban-test-wasms/wasm-workspace/opt/example_hostile.wasm index c21413ab8c9145690c8238caff22f75c57a6e026..620a13393f436662b16314ba18b8b49abc07c1a2 100644 GIT binary patch delta 238 zcmeC+U&ue9j&n`J0S4}R2FDE(+Z&jsa!%%CJnH1b#8l5%r_A6ekgdd^!ocL=DCWqRrNqd~$j!j5z@Wfr#>Aq);K(xhJEK11iplCs zMywEi9FvSVN0ws)hk%IVf?hU7MrNQXK$938IVMkJ+5%L?1k~llJOjvLc4XQ7oOv-L zJIGdU#+1pg+2k25CUdiEFd9uZVOP^LN=->ju`o0=H#IXbN;I}eOHQ*eG*3%SG)y+J bFf_2Vut+gVO-@YGP01`OsoXq~HHr}c|JgZo delta 235 zcmZ3;-@!kjjtNvd(8VWLs8QL2G~u}N}TVp5WsiLs@* TQHn{5d78PQxo%2kQAs5Ls{uE+ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_invoke_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/example_invoke_contract.wasm index 7b8c0c10e5aec82efa88c2d1037eb1a890d9ad57..30a534c1071a8f2764f937021167999e63e0c90b 100644 GIT binary patch delta 756 zcmX|9J&O}j6n&pFktjQb#fYGH##JYUlEiFgge~Sx<7ySQvW@v5zHG6qTPTQGP$VEo zmMLrm8`-TaENw)v*=8YjVr41#BlNt9*u4Ahy@zw|JNLa`TdplWUjACIU0}qBZwOY< z%R;|MWsO+DQpxJC#NqPZEU=L@EE4A6;0tR=7HOH2Fts}>CvIw%ge48QtJz4L<@Gx1 zfvuXcAW57=;2Ve}VjTqpisdv`BuL%87y)ABK2kKCn2RAP8!0DLKH_hAQU>DZ?6>B6 zc7>VT#{N1ZpF}DXkz?FH{CT0biT}IookQ1z7M#9GEQXE&tq~L}#3|eU;3oDPGCX$J zhNMVHmee?Bwa5^We*!u|2M`kurh($n3G+qa0Xd-hqxjSH;hNB+7c{%iXy_} zSWjaQu6fv!!f4nMu!)%1NV~X8o{c<54rYuAqn)kF@M(p|e?ZlJ3$OYXm7o#9nW&uT z^CF*?&vYkVa9eE?PIj;_yva8m_a>|*z#Xt}`mn6|mv~lQ_Y>YOd;YbX?a{D5%v!B< pquXrvZ)M}bIBTWjQNK0lWUc1yEE~2*gZ_gX!-sqOPs+Y`^cMuei$eea delta 656 zcmXX@J#Q015Z%waLk7hXDNKU!+!4?@2y*cqzNGVA1xQGUUl1pbmFyLu$PJY(fl!15 zO0-2v8iFedN;*m!Bv%wPq>1}P%*>lNJ8x!Zy6|b?=xg(&7TjROh(8ppq_?Gh zlgofu$#ThR=lpp3WNkeD&RPxp` zYBDo8u>g4-lXo&IFmg=3#i+-{ktM*U2vQ<2S%}Ga@*}1a1qM0674mPGK2wFjlAV}^|I(iE64$fZ0(cRc@ z`0;o=zIWr*=n!>2fDnSdA5m*zBm7~u%p?zjkYSGvq0Z3l_TbJfBmuN*D3lYd?z0L& zt2HmTDL#*npjZ@LHh-?!op#zyeN3~H(wRvw2a~Cbdsbe{DT|fYhbV4dZzxQxV#)bz jG7W_q$wViT&l01!9!nn1rHqBqYCDK`r|kOtR+snz5~D9d delta 168 zcmX@ce}P|}A+b1@k%57M(SS37sjiN(E`bq5FaR-g9hlDor0OQhtFtpP<}k)HuuSw7 z7h+~iWHex4Wai{xVr67xW@G1=SeD25e&bUkCPw?o63muNPE4BvnP)R??qsuNocx+q zp3!_VH=72d@njP=HNBKHOJie`6q8irM8ia*WTR9A17nlqw8W$&GZSM=bE6cK6!SE5 MLv!7f%%YM?06hyS+5i9m diff --git a/soroban-test-wasms/wasm-workspace/opt/example_updateable_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/example_updateable_contract.wasm index de33abb7c749dd19d7252f1c12ff0b638306ea2a..e89972d1e53764e57aa83fdd0a7cd8a7d7fe71f4 100644 GIT binary patch delta 195 zcmcb~a*t&~jmbAgruU3Y%=L_Q$_$PUSxSs53<``24Cc%l3XF~tS&Ga~42lduDS>Py zCKU!I2cW3N#0|dO63bZ}7`PP}HJKGAb1+&PngAs@vXq#Blu4E;6N8gNn-gn`IWva> zlM~Q1prM+~0zgTJY!wD>W(G#?$$J>(87(H?VbowWn#{_ire~Czl9*y)XlQO~W?+

}3nW?^WamYQgoY+_+(U}<5IVw9Skn53JMSyWOvIiJxN0HU}lRsaA1 delta 217 zcmcb|a+763jmbwwrdNzi%=L_Q$_$PM*-DHm3<``24Cc%V3XF~dS&Ga~42lduDS>Py zCKU!I2cW3J#0|dO0?Sz(7`PP}HJK$Qb1+)#XaIFFI%;H@GBG$Qv^lZ1m@{)IFggJZ z0-C1@VmlgSsW5OeGca;b7G&~OV2~3`&d)0;N=zKB}Nqn1x5h|B^GmL4h2R91}B9MJ0=lj21kKxB_^O8lLDio$i&OW zj0%(48RaMMV3cFDn0%d4gVAUblbW7UYD!{?g`uIjshNRMqOnC4qgVv=f{Xqae}Y?NwXU~H0{mY9@e YW@2nYBn_U=D!)~f3&~aTae$~AOK*d0H0f;-q(6XJybd2B6pF0eP`iGsYdTd>wis}$fS?l%XjGl1d)xM*^CpDkHL6^V> z>I+ith1D09a%(}gfQ(@2YM)lH)iU0z15%JOPmr)u<{D^jpLfH+*N47c}DZe1#B9O#*=5Vsp+MpSsELgq?n`{ pCmJRiB^#w07#N!*rzIvOnVA?{nj58