diff --git a/Cargo.lock b/Cargo.lock index b98685c6c5..19494eb990 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,15 +71,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" @@ -95,12 +86,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 = "cargo-lock" version = "9.0.0" @@ -158,7 +143,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", ] @@ -175,17 +160,32 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.2.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "platforms", + "rustc_version", "subtle", "zeroize", ] +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cxx" version = "1.0.97" @@ -212,7 +212,7 @@ checksum = "a26acccf6f445af85ea056362561a24ef56cdc15fcc685f03aec50b9c702cb6d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] @@ -225,22 +225,13 @@ dependencies = [ "zeroize", ] -[[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", @@ -259,33 +250,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" 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" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ - "signature 1.6.4", + "pkcs8", + "signature", ] [[package]] name = "ed25519-dalek" -version = "1.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ "curve25519-dalek", "ed25519", - "rand", + "rand_core", "serde", - "sha2 0.9.9", + "sha2", "zeroize", ] @@ -303,12 +295,12 @@ 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", @@ -326,10 +318,16 @@ 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", ] +[[package]] +name = "fiat-crypto" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" + [[package]] name = "fixedbitset" version = "0.4.2" @@ -369,17 +367,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" @@ -389,7 +376,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -406,7 +393,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -428,7 +415,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -491,8 +478,8 @@ dependencies = [ "ecdsa", "elliptic-curve", "once_cell", - "sha2 0.10.7", - "signature 2.1.0", + "sha2", + "signature", ] [[package]] @@ -586,13 +573,13 @@ dependencies = [ [[package]] name = "num-derive" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -629,12 +616,6 @@ 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 = "overload" version = "0.1.1" @@ -679,6 +660,12 @@ dependencies = [ "spki", ] +[[package]] +name = "platforms" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -705,34 +692,23 @@ dependencies = [ [[package]] name = "rand" -version = "0.7.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "getrandom 0.1.16", "libc", "rand_chacha", - "rand_core 0.5.1", - "rand_hc", + "rand_core", ] [[package]] name = "rand_chacha" -version = "0.2.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.5.1", -] - -[[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]] @@ -741,16 +717,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]] @@ -819,6 +786,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2c140994fc6f44f2a89068a073843e82e7b4905f569ced81540a2eab4d0d6ed" +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -877,7 +853,7 @@ checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] @@ -900,19 +876,6 @@ dependencies = [ "serde", ] -[[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.7" @@ -921,7 +884,7 @@ checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -930,7 +893,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.7", + "digest", "keccak", ] @@ -943,20 +906,14 @@ dependencies = [ "lazy_static", ] -[[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]] @@ -968,44 +925,42 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "soroban-env-common" version = "0.0.17" -source = "git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4#048be90e10dfda6486141f96ea86e32fb91681f4" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c2e1c21cf8d44db23a159090e3cbaab741860295#c2e1c21cf8d44db23a159090e3cbaab741860295" dependencies = [ "crate-git-revision", "ethnum", "num-derive", - "num-integer", "num-traits", - "soroban-env-macros 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4)", + "soroban-env-macros 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=c2e1c21cf8d44db23a159090e3cbaab741860295)", "soroban-wasmi", "static_assertions", - "stellar-xdr 0.0.17 (git+https://github.com/stellar/rs-stellar-xdr?rev=4876e5eb20016caebbd13bcf6401626dc6073b8e)", + "stellar-xdr", ] [[package]] name = "soroban-env-common" version = "0.0.17" -source = "git+https://github.com/stellar/rs-soroban-env?rev=2069b9c10541126f7812c6f807006dfc8470ab3f#2069b9c10541126f7812c6f807006dfc8470ab3f" +source = "git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411" dependencies = [ "crate-git-revision", "ethnum", "num-derive", - "num-integer", "num-traits", - "soroban-env-macros 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=2069b9c10541126f7812c6f807006dfc8470ab3f)", + "soroban-env-macros 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411)", "soroban-wasmi", "static_assertions", - "stellar-xdr 0.0.17 (git+https://github.com/stellar/rs-stellar-xdr?rev=d6e02584ac9f4046bf38eaf445ced0d4f33631fd)", + "stellar-xdr", ] [[package]] name = "soroban-env-host" version = "0.0.17" -source = "git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4#048be90e10dfda6486141f96ea86e32fb91681f4" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c2e1c21cf8d44db23a159090e3cbaab741860295#c2e1c21cf8d44db23a159090e3cbaab741860295" dependencies = [ "backtrace", "curve25519-dalek", "ed25519-dalek", - "getrandom 0.2.10", + "getrandom", "hex", "k256", "log", @@ -1014,25 +969,24 @@ dependencies = [ "num-traits", "rand", "rand_chacha", - "sha2 0.9.9", + "sha2", "sha3", - "soroban-env-common 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4)", - "soroban-native-sdk-macros 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4)", + "soroban-env-common 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=c2e1c21cf8d44db23a159090e3cbaab741860295)", + "soroban-native-sdk-macros 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=c2e1c21cf8d44db23a159090e3cbaab741860295)", "soroban-wasmi", "static_assertions", "stellar-strkey", - "tracy-client", ] [[package]] name = "soroban-env-host" version = "0.0.17" -source = "git+https://github.com/stellar/rs-soroban-env?rev=2069b9c10541126f7812c6f807006dfc8470ab3f#2069b9c10541126f7812c6f807006dfc8470ab3f" +source = "git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411" dependencies = [ "backtrace", "curve25519-dalek", "ed25519-dalek", - "getrandom 0.2.10", + "getrandom", "hex", "k256", "log", @@ -1041,71 +995,70 @@ dependencies = [ "num-traits", "rand", "rand_chacha", - "sha2 0.9.9", + "sha2", "sha3", - "soroban-env-common 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=2069b9c10541126f7812c6f807006dfc8470ab3f)", - "soroban-native-sdk-macros 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=2069b9c10541126f7812c6f807006dfc8470ab3f)", + "soroban-env-common 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411)", + "soroban-native-sdk-macros 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411)", "soroban-wasmi", "static_assertions", "stellar-strkey", + "tracy-client", ] [[package]] name = "soroban-env-macros" version = "0.0.17" -source = "git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4#048be90e10dfda6486141f96ea86e32fb91681f4" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c2e1c21cf8d44db23a159090e3cbaab741860295#c2e1c21cf8d44db23a159090e3cbaab741860295" dependencies = [ "itertools", "proc-macro2", "quote", "serde", "serde_json", - "stellar-xdr 0.0.17 (git+https://github.com/stellar/rs-stellar-xdr?rev=4876e5eb20016caebbd13bcf6401626dc6073b8e)", - "syn 2.0.18", - "thiserror", + "stellar-xdr", + "syn", ] [[package]] name = "soroban-env-macros" version = "0.0.17" -source = "git+https://github.com/stellar/rs-soroban-env?rev=2069b9c10541126f7812c6f807006dfc8470ab3f#2069b9c10541126f7812c6f807006dfc8470ab3f" +source = "git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411" dependencies = [ "itertools", "proc-macro2", "quote", "serde", "serde_json", - "stellar-xdr 0.0.17 (git+https://github.com/stellar/rs-stellar-xdr?rev=d6e02584ac9f4046bf38eaf445ced0d4f33631fd)", - "syn 2.0.18", - "thiserror", + "stellar-xdr", + "syn", ] [[package]] name = "soroban-native-sdk-macros" version = "0.0.17" -source = "git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4#048be90e10dfda6486141f96ea86e32fb91681f4" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c2e1c21cf8d44db23a159090e3cbaab741860295#c2e1c21cf8d44db23a159090e3cbaab741860295" dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] name = "soroban-native-sdk-macros" version = "0.0.17" -source = "git+https://github.com/stellar/rs-soroban-env?rev=2069b9c10541126f7812c6f807006dfc8470ab3f#2069b9c10541126f7812c6f807006dfc8470ab3f" +source = "git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411" dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] name = "soroban-test-wasms" version = "0.0.17" -source = "git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4#048be90e10dfda6486141f96ea86e32fb91681f4" +source = "git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411" [[package]] name = "soroban-wasmi" @@ -1150,8 +1103,8 @@ dependencies = [ "cxx", "log", "rustc-simple-version", - "soroban-env-host 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4)", - "soroban-env-host 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=2069b9c10541126f7812c6f807006dfc8470ab3f)", + "soroban-env-host 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=c2e1c21cf8d44db23a159090e3cbaab741860295)", + "soroban-env-host 0.0.17 (git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411)", "soroban-test-wasms", "tracy-client", ] @@ -1168,17 +1121,7 @@ dependencies = [ [[package]] name = "stellar-xdr" version = "0.0.17" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=4876e5eb20016caebbd13bcf6401626dc6073b8e#4876e5eb20016caebbd13bcf6401626dc6073b8e" -dependencies = [ - "base64", - "crate-git-revision", - "hex", -] - -[[package]] -name = "stellar-xdr" -version = "0.0.17" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=d6e02584ac9f4046bf38eaf445ced0d4f33631fd#d6e02584ac9f4046bf38eaf445ced0d4f33631fd" +source = "git+https://github.com/stellar/rs-stellar-xdr?rev=2d2526f515a476b1e3df70233a4cf9232287977e#2d2526f515a476b1e3df70233a4cf9232287977e" dependencies = [ "base64", "crate-git-revision", @@ -1191,17 +1134,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.18" @@ -1230,7 +1162,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] @@ -1312,7 +1244,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] @@ -1428,12 +1360,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" @@ -1461,7 +1387,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn", "wasm-bindgen-shared", ] @@ -1483,7 +1409,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1621,17 +1547,3 @@ 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 2.0.18", -] diff --git a/src/herder/test/HerderTests.cpp b/src/herder/test/HerderTests.cpp index 77d0574b48..9b0c2f2dd4 100644 --- a/src/herder/test/HerderTests.cpp +++ b/src/herder/test/HerderTests.cpp @@ -1648,7 +1648,6 @@ TEST_CASE("surge pricing", "[herder][txset]") resources.instructions = 800'000; resources.readBytes = conf.txMaxReadBytes(); resources.writeBytes = 1000; - resources.contractEventsSizeBytes = 0; auto sorobanTx = createUploadWasmTx(*app, acc2, baseFee, /* refundableFee */ 1200, resources); @@ -1665,8 +1664,6 @@ TEST_CASE("surge pricing", "[herder][txset]") rand_uniform(1, conf.txMaxReadBytes()); res.writeBytes = rand_uniform(1, conf.txMaxWriteBytes()); - res.contractEventsSizeBytes = rand_uniform( - 1, conf.txMaxContractEventsSizeBytes()); auto read = rand_uniform(0, conf.txMaxReadLedgerEntries()); auto write = rand_uniform( @@ -1690,11 +1687,10 @@ TEST_CASE("surge pricing", "[herder][txset]") res)); CLOG_INFO(Herder, "Generated tx with {} instructions, {} read " - "bytes, {} write bytes, {} extended meta " - "data bytes, {} read ledger entries, {} " - "write ledger entries", - res.instructions, res.readBytes, res.writeBytes, - res.contractEventsSizeBytes, read, write); + "bytes, {} write bytes, data bytes, {} read " + "ledger entries, {} write ledger entries", + res.instructions, res.readBytes, res.writeBytes, read, + write); } return txs; }; @@ -1788,7 +1784,6 @@ TEST_CASE("surge pricing", "[herder][txset]") resources.instructions = 1; resources.readBytes = 1; resources.writeBytes = 1; - resources.contractEventsSizeBytes = 1; auto smallSorobanLowFee = createUploadWasmTx( *app, acc4, baseFee / 10, /* refundableFee */ 1200, resources); @@ -4519,7 +4514,6 @@ TEST_CASE("do not flood too many soroban transactions", resources.instructions = 800'000; resources.readBytes = 2000; resources.writeBytes = 1000; - resources.contractEventsSizeBytes = 0; auto genTx = [&](TestAccount& source, bool highFee) { auto txFee = baseFee; diff --git a/src/herder/test/TransactionQueueTests.cpp b/src/herder/test/TransactionQueueTests.cpp index df963056fc..3f6a7cf1e3 100644 --- a/src/herder/test/TransactionQueueTests.cpp +++ b/src/herder/test/TransactionQueueTests.cpp @@ -1120,7 +1120,6 @@ TEST_CASE("Soroban TransactionQueue limits", resources.instructions = 2'000'000; resources.readBytes = 2000; resources.writeBytes = 1000; - resources.contractEventsSizeBytes = 0; int refundableFee = 1200; int initialFee = 10'000'000; diff --git a/src/herder/test/TxSetTests.cpp b/src/herder/test/TxSetTests.cpp index c05086fc41..3e0c3d9cac 100644 --- a/src/herder/test/TxSetTests.cpp +++ b/src/herder/test/TxSetTests.cpp @@ -502,7 +502,6 @@ TEST_CASE("generalized tx set XDR conversion", "[txset]") resources.instructions = 800'000; resources.readBytes = 1000; resources.writeBytes = 1000; - resources.contractEventsSizeBytes = 0; txs.emplace_back(createUploadWasmTx(*app, source, fee, /* refundableFee */ 1200, resources)); @@ -775,7 +774,6 @@ TEST_CASE("generalized tx set with multiple txs per source account", "[txset]") resources.instructions = 800'000; resources.readBytes = 1000; resources.writeBytes = 1000; - resources.contractEventsSizeBytes = 0; uint32_t inclusionFee = 500; uint32_t refundableFee = 10'000; auto sorobanTx = createUploadWasmTx(*app, root, inclusionFee, @@ -824,7 +822,6 @@ TEST_CASE("generalized tx set fees", "[txset]") resources.instructions = 800'000; resources.readBytes = 1000; resources.writeBytes = 1000; - resources.contractEventsSizeBytes = 0; auto tx = createUploadWasmTx(*app, source, inclusionFee, refundableFee, resources); setValidTotalFee(tx, inclusionFee, refundableFee, *app, source); diff --git a/src/ledger/NetworkConfig.cpp b/src/ledger/NetworkConfig.cpp index 8b2a20a59b..ea33c6fd52 100644 --- a/src/ledger/NetworkConfig.cpp +++ b/src/ledger/NetworkConfig.cpp @@ -510,7 +510,9 @@ SorobanNetworkConfig::isValidConfigSettingEntry(ConfigSettingEntry const& cfg) cfg.contractLedgerCost().bucketListWriteFeeGrowthFactor >= 0; break; case ConfigSettingID::CONFIG_SETTING_CONTRACT_EVENTS_V0: - valid = cfg.contractEvents().txMaxContractEventsSizeBytes >= 0 && + valid = cfg.contractEvents().txMaxContractEventsSizeBytes >= + MinimumSorobanNetworkConfig:: + TX_MAX_CONTRACT_EVENTS_SIZE_BYTES && cfg.contractEvents().feeContractEvents1KB >= 0; break; case ConfigSettingID::CONFIG_SETTING_STATE_EXPIRATION: diff --git a/src/ledger/NetworkConfig.h b/src/ledger/NetworkConfig.h index bcd8e06640..1a1ecc978a 100644 --- a/src/ledger/NetworkConfig.h +++ b/src/ledger/NetworkConfig.h @@ -39,6 +39,8 @@ struct MinimumSorobanNetworkConfig static constexpr uint32_t MINIMUM_PERSISTENT_ENTRY_LIFETIME = 4'096; static constexpr uint32_t MAXIMUM_ENTRY_LIFETIME = 535'680; // 31 days + + static constexpr uint32_t TX_MAX_CONTRACT_EVENTS_SIZE_BYTES = 200; }; // Defines the initial values of the network configuration @@ -105,7 +107,8 @@ struct InitialSorobanNetworkConfig static constexpr int64_t FEE_TRANSACTION_SIZE_1KB = 2'000; // Contract events settings - static constexpr uint32_t TX_MAX_CONTRACT_EVENTS_SIZE_BYTES = 1'000; + static constexpr uint32_t TX_MAX_CONTRACT_EVENTS_SIZE_BYTES = + MinimumSorobanNetworkConfig::TX_MAX_CONTRACT_EVENTS_SIZE_BYTES; static constexpr int64_t FEE_CONTRACT_EVENTS_SIZE_1KB = 200; // State expiration settings diff --git a/src/protocol-next/xdr b/src/protocol-next/xdr index 1894f0909c..1795087cb8 160000 --- a/src/protocol-next/xdr +++ b/src/protocol-next/xdr @@ -1 +1 @@ -Subproject commit 1894f0909caa0adb00437564f8e01ec33a5b5ed2 +Subproject commit 1795087cb8e84524eada0e5aee78ae66c2398222 diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index ad562ffb3b..0edbc9436d 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -28,7 +28,7 @@ rustc-simple-version = "0.1.0" version = "0.0.17" git = "https://github.com/stellar/rs-soroban-env" package = "soroban-env-host" -rev = "048be90e10dfda6486141f96ea86e32fb91681f4" +rev = "dd3d39571e9fdae9af34f7f46243d0794169b411" # This copy of the soroban host is _optional_ and only enabled during protocol # transitions. When transitioning from protocol N to N+1, the `curr` copy @@ -52,11 +52,11 @@ optional = true version = "0.0.17" git = "https://github.com/stellar/rs-soroban-env" package = "soroban-env-host" -rev = "2069b9c10541126f7812c6f807006dfc8470ab3f" +rev = "c2e1c21cf8d44db23a159090e3cbaab741860295" [dependencies.soroban-test-wasms] git = "https://github.com/stellar/rs-soroban-env" -rev = "048be90e10dfda6486141f96ea86e32fb91681f4" +rev = "dd3d39571e9fdae9af34f7f46243d0794169b411" [dependencies.cargo-lock] git = "https://github.com/rustsec/rustsec" diff --git a/src/rust/src/host-dep-tree-curr.txt b/src/rust/src/host-dep-tree-curr.txt index f4ac24d24c..6395668fd8 100644 --- a/src/rust/src/host-dep-tree-curr.txt +++ b/src/rust/src/host-dep-tree-curr.txt @@ -1,4 +1,4 @@ -soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4#048be90e10dfda6486141f96ea86e32fb91681f4 +soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411 ├── tracy-client 0.15.2 checksum:434ecabbda9f67eeea1eab44d52f4a20538afa3e2c2770f2efc161142b25b608 │ ├── tracy-client-sys 0.20.0 checksum:e8cf8aeb20e40d13be65a0b134f8d82d360e72b2793a11de8867d7fbc0f9d6f6 │ │ └── cc 1.0.79 checksum:50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f @@ -86,14 +86,14 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=048be9 │ ├── wasmi_arena 0.4.0 git+https://github.com/stellar/wasmi?rev=284c963ba080703061797e2a3cba0853edee0dd4#284c963ba080703061797e2a3cba0853edee0dd4 │ ├── spin 0.9.8 checksum:6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67 │ └── smallvec 1.10.0 checksum:a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0 -├── soroban-native-sdk-macros 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4#048be90e10dfda6486141f96ea86e32fb91681f4 +├── soroban-native-sdk-macros 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411 │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 │ ├── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 │ └── itertools 0.10.5 checksum:b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473 │ └── either 1.8.1 checksum:7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91 -├── soroban-env-common 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4#048be90e10dfda6486141f96ea86e32fb91681f4 -│ ├── stellar-xdr 0.0.17 git+https://github.com/stellar/rs-stellar-xdr?rev=4876e5eb20016caebbd13bcf6401626dc6073b8e#4876e5eb20016caebbd13bcf6401626dc6073b8e +├── soroban-env-common 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411 +│ ├── stellar-xdr 0.0.17 git+https://github.com/stellar/rs-stellar-xdr?rev=2d2526f515a476b1e3df70233a4cf9232287977e#2d2526f515a476b1e3df70233a4cf9232287977e │ │ ├── hex 0.4.3 checksum:7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70 │ │ ├── crate-git-revision 0.0.6 checksum:c521bf1f43d31ed2f73441775ed31935d77901cb3451e44b38a1c1612fcbaf98 │ │ │ ├── serde_json 1.0.97 checksum:bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a @@ -109,24 +109,17 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=048be9 │ │ └── base64 0.13.1 checksum:9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8 │ ├── static_assertions 1.1.0 checksum:a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f │ ├── soroban-wasmi 0.30.0-soroban git+https://github.com/stellar/wasmi?rev=284c963ba080703061797e2a3cba0853edee0dd4#284c963ba080703061797e2a3cba0853edee0dd4 -│ ├── soroban-env-macros 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=048be90e10dfda6486141f96ea86e32fb91681f4#048be90e10dfda6486141f96ea86e32fb91681f4 -│ │ ├── thiserror 1.0.40 checksum:978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac +│ ├── soroban-env-macros 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=dd3d39571e9fdae9af34f7f46243d0794169b411#dd3d39571e9fdae9af34f7f46243d0794169b411 │ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e -│ │ ├── stellar-xdr 0.0.17 git+https://github.com/stellar/rs-stellar-xdr?rev=4876e5eb20016caebbd13bcf6401626dc6073b8e#4876e5eb20016caebbd13bcf6401626dc6073b8e +│ │ ├── stellar-xdr 0.0.17 git+https://github.com/stellar/rs-stellar-xdr?rev=2d2526f515a476b1e3df70233a4cf9232287977e#2d2526f515a476b1e3df70233a4cf9232287977e │ │ ├── serde_json 1.0.97 checksum:bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a │ │ ├── serde 1.0.164 checksum:9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 │ │ ├── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 │ │ └── itertools 0.10.5 checksum:b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473 │ ├── num-traits 0.2.15 checksum:578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd -│ ├── num-integer 0.1.45 checksum:225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9 -│ │ ├── num-traits 0.2.15 checksum:578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd -│ │ └── autocfg 1.1.0 checksum:d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa -│ ├── num-derive 0.3.3 checksum:876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d -│ │ ├── syn 1.0.109 checksum:72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237 -│ │ │ ├── unicode-ident 1.0.9 checksum:b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0 -│ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 -│ │ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ ├── num-derive 0.4.0 checksum:9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e +│ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 │ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 │ ├── ethnum 1.3.2 checksum:0198b9d0078e0f30dedc7acbb21c974e838fc8fae3ee170128658a98cb2c1c04 @@ -141,72 +134,56 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=048be9 │ │ ├── typenum 1.16.0 checksum:497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba │ │ └── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a │ │ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 -│ │ │ └── zeroize_derive 1.4.2 checksum:ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69 -│ │ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e -│ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 -│ │ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 │ │ ├── version_check 0.9.4 checksum:49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f │ │ └── typenum 1.16.0 checksum:497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba │ ├── const-oid 0.9.2 checksum:520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913 │ └── block-buffer 0.10.4 checksum:3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71 │ └── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a -├── sha2 0.9.9 checksum:4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800 -│ ├── opaque-debug 0.3.0 checksum:624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5 -│ ├── digest 0.9.0 checksum:d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066 -│ │ └── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a +├── sha2 0.10.7 checksum:479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8 +│ ├── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292 │ ├── cpufeatures 0.2.8 checksum:03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c -│ ├── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd -│ └── block-buffer 0.9.0 checksum:4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4 -│ └── generic-array 0.14.7 checksum:85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a -├── rand_chacha 0.2.2 checksum:f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402 -│ ├── rand_core 0.5.1 checksum:90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19 -│ │ └── getrandom 0.1.16 checksum:8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce -│ │ ├── wasi 0.9.0+wasi-snapshot-preview1 checksum:cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519 +│ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd +├── rand_chacha 0.3.1 checksum:e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88 +│ ├── rand_core 0.6.4 checksum:ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c +│ │ └── getrandom 0.2.10 checksum:be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427 +│ │ ├── wasm-bindgen 0.2.87 checksum:7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342 +│ │ │ ├── wasm-bindgen-macro 0.2.87 checksum:dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d +│ │ │ │ ├── wasm-bindgen-macro-support 0.2.87 checksum:54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b +│ │ │ │ │ ├── wasm-bindgen-shared 0.2.87 checksum:ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1 +│ │ │ │ │ ├── wasm-bindgen-backend 0.2.87 checksum:5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd +│ │ │ │ │ │ ├── wasm-bindgen-shared 0.2.87 checksum:ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1 +│ │ │ │ │ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e +│ │ │ │ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ │ │ │ │ ├── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ │ │ │ │ │ ├── once_cell 1.18.0 checksum:dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d +│ │ │ │ │ │ ├── log 0.4.19 checksum:b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4 +│ │ │ │ │ │ └── bumpalo 3.13.0 checksum:a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1 +│ │ │ │ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e +│ │ │ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ │ │ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ │ │ │ └── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd +│ │ ├── wasi 0.11.0+wasi-snapshot-preview1 checksum:9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423 │ │ ├── libc 0.2.146 checksum:f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b +│ │ ├── js-sys 0.3.64 checksum:c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a +│ │ │ └── wasm-bindgen 0.2.87 checksum:7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342 │ │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd │ └── ppv-lite86 0.2.17 checksum:5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de -├── rand 0.7.3 checksum:6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03 -│ ├── rand_hc 0.2.0 checksum:ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c -│ │ └── rand_core 0.5.1 checksum:90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19 -│ ├── rand_core 0.5.1 checksum:90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19 -│ ├── rand_chacha 0.2.2 checksum:f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402 -│ ├── libc 0.2.146 checksum:f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b -│ └── getrandom 0.1.16 checksum:8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce +├── rand 0.8.5 checksum:34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404 +│ ├── rand_core 0.6.4 checksum:ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c +│ ├── rand_chacha 0.3.1 checksum:e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88 +│ └── libc 0.2.146 checksum:f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b ├── num-traits 0.2.15 checksum:578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd ├── num-integer 0.1.45 checksum:225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9 -├── num-derive 0.3.3 checksum:876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d +│ ├── num-traits 0.2.15 checksum:578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd +│ └── autocfg 1.1.0 checksum:d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa +├── num-derive 0.4.0 checksum:9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e ├── log 0.4.19 checksum:b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4 ├── k256 0.13.1 checksum:cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc │ ├── signature 2.1.0 checksum:5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500 │ │ ├── rand_core 0.6.4 checksum:ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c -│ │ │ └── getrandom 0.2.10 checksum:be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427 -│ │ │ ├── wasm-bindgen 0.2.87 checksum:7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342 -│ │ │ │ ├── wasm-bindgen-macro 0.2.87 checksum:dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d -│ │ │ │ │ ├── wasm-bindgen-macro-support 0.2.87 checksum:54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b -│ │ │ │ │ │ ├── wasm-bindgen-shared 0.2.87 checksum:ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1 -│ │ │ │ │ │ ├── wasm-bindgen-backend 0.2.87 checksum:5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd -│ │ │ │ │ │ │ ├── wasm-bindgen-shared 0.2.87 checksum:ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1 -│ │ │ │ │ │ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e -│ │ │ │ │ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 -│ │ │ │ │ │ │ ├── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 -│ │ │ │ │ │ │ ├── once_cell 1.18.0 checksum:dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d -│ │ │ │ │ │ │ ├── log 0.4.19 checksum:b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4 -│ │ │ │ │ │ │ └── bumpalo 3.13.0 checksum:a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1 -│ │ │ │ │ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e -│ │ │ │ │ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 -│ │ │ │ │ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 -│ │ │ │ │ └── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 -│ │ │ │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd -│ │ │ ├── wasi 0.11.0+wasi-snapshot-preview1 checksum:9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423 -│ │ │ ├── libc 0.2.146 checksum:f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b -│ │ │ ├── js-sys 0.3.64 checksum:c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a -│ │ │ │ └── wasm-bindgen 0.2.87 checksum:7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342 -│ │ │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd │ │ └── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292 │ ├── sha2 0.10.7 checksum:479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8 -│ │ ├── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292 -│ │ ├── cpufeatures 0.2.8 checksum:03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c -│ │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd │ ├── once_cell 1.18.0 checksum:dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d │ ├── elliptic-curve 0.13.5 checksum:968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b │ │ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 @@ -254,20 +231,30 @@ soroban-env-host 0.0.17 git+https://github.com/stellar/rs-soroban-env?rev=048be9 │ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd ├── hex 0.4.3 checksum:7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70 ├── getrandom 0.2.10 checksum:be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427 -├── ed25519-dalek 1.0.1 checksum:c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d +├── ed25519-dalek 2.0.0 checksum:7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980 │ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 -│ ├── sha2 0.9.9 checksum:4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800 +│ ├── sha2 0.10.7 checksum:479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8 │ ├── serde 1.0.164 checksum:9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d -│ ├── rand 0.7.3 checksum:6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03 -│ ├── ed25519 1.5.3 checksum:91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7 -│ │ └── signature 1.6.4 checksum:74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c -│ └── curve25519-dalek 3.2.0 checksum:0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61 +│ ├── rand_core 0.6.4 checksum:ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c +│ ├── ed25519 2.2.2 checksum:60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d +│ │ ├── signature 2.1.0 checksum:5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500 +│ │ └── pkcs8 0.10.2 checksum:f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7 +│ └── curve25519-dalek 4.0.0 checksum:f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2 │ ├── zeroize 1.6.0 checksum:2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9 │ ├── subtle 2.5.0 checksum:81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc -│ ├── rand_core 0.5.1 checksum:90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19 -│ ├── digest 0.9.0 checksum:d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066 -│ └── byteorder 1.4.3 checksum:14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610 -├── curve25519-dalek 3.2.0 checksum:0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61 +│ ├── rustc_version 0.4.0 checksum:bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366 +│ │ └── semver 1.0.17 checksum:bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed +│ │ └── serde 1.0.164 checksum:9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d +│ ├── platforms 3.0.2 checksum:e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630 +│ ├── fiat-crypto 0.1.20 checksum:e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77 +│ ├── digest 0.10.7 checksum:9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292 +│ ├── curve25519-dalek-derive 0.1.0 checksum:83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b +│ │ ├── syn 2.0.18 checksum:32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e +│ │ ├── quote 1.0.28 checksum:1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488 +│ │ └── proc-macro2 1.0.60 checksum:dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406 +│ ├── cpufeatures 0.2.8 checksum:03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c +│ └── cfg-if 1.0.0 checksum:baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd +├── curve25519-dalek 4.0.0 checksum:f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2 └── backtrace 0.3.67 checksum:233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca ├── rustc-demangle 0.1.23 checksum:d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76 ├── object 0.30.4 checksum:03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385 diff --git a/src/simulation/LoadGenerator.cpp b/src/simulation/LoadGenerator.cpp index 2ac271369e..b32340d311 100644 --- a/src/simulation/LoadGenerator.cpp +++ b/src/simulation/LoadGenerator.cpp @@ -504,7 +504,6 @@ LoadGenerator::generateLoad(GeneratedLoadConfig cfg) { resources.footprint.readWrite.emplace_back(key); } - resources.contractEventsSizeBytes = 0; } return sorobanTransaction( diff --git a/src/testdata/ledger-close-meta-v2-protocol-20.json b/src/testdata/ledger-close-meta-v2-protocol-20.json index 6a4b314c74..5a0efb86b8 100644 --- a/src/testdata/ledger-close-meta-v2-protocol-20.json +++ b/src/testdata/ledger-close-meta-v2-protocol-20.json @@ -6,24 +6,24 @@ "v": 0 }, "ledgerHeader": { - "hash": "a9c6fdbdd3952388ef96be7bc875b4d8b6929606e84889ed80b772e370438b76", + "hash": "5079d13df581611519049ee79519090ade190f46ac74ca943391eef6c0b8ea92", "header": { "ledgerVersion": 20, - "previousLedgerHash": "44cb98efa631b07434e85396fede04aa437ee4eec0c1d4528b50912ac99aac0e", + "previousLedgerHash": "5b330449b4db8a7c63639e82a014c39be76f94ba9b36ec0c70d3e8076ea09ea3", "scpValue": { - "txSetHash": "9590348dcda66075b07a72dc65da0bc3088c2ced9e7495b6bbcb84fda920c34c", + "txSetHash": "3291c836dbfa57c1f513807b784b7f4a9ef409715bf0be9ac743346659f8a3e0", "closeTime": 0, "upgrades": [], "ext": { "v": "STELLAR_VALUE_SIGNED", "lcValueSignature": { "nodeID": "GDDOUW25MRFLNXQMN3OODP6JQEXSGLMHAFZV4XPQ2D3GA4QFIDMEJG2O", - "signature": "de3e224c9c2ac622ae79ab5530f01e50966ddc75bbf17d02f7f42d99b6ba3bfcc0223d075a9149cbb7cb065ebee8d47bf0ad37282cfec2beae1e795a2309b00e" + "signature": "926f745871996bb6541a81da1fcfe00590019432569021b99fb032326e7ae60297745d2a2f04c55ab7c454ea5cbf17cd317015375a2fe60cb0d392722219820e" } } }, - "txSetResultHash": "cd1398cda325d4eada631301e6501421cda30fd0b43da3e5d0ffb26caf073b0a", - "bucketListHash": "7a0aa400ce13ad22591b0adca88ed27678d9daf8aa6ee142ed18beb664ced047", + "txSetResultHash": "cf65fee29665ff0c2a6910b24c420a487a7416ccd79c683b48aac1d45ad21faa", + "bucketListHash": "3f666182ac04911617589f7f7ff5ab07d3953748ed397834911e518e570c566a", "ledgerSeq": 6, "totalCoins": 1000000000000000000, "feePool": 800, @@ -49,7 +49,7 @@ "txSet": { "v": 1, "v1TxSet": { - "previousLedgerHash": "44cb98efa631b07434e85396fede04aa437ee4eec0c1d4528b50912ac99aac0e", + "previousLedgerHash": "5b330449b4db8a7c63639e82a014c39be76f94ba9b36ec0c70d3e8076ea09ea3", "phases": [ { "v": 0, @@ -185,43 +185,22 @@ "txProcessing": [ { "result": { - "transactionHash": "66efe325ead9f52082c8908b7813bd96793fd5ff0f1e50fdc50b23f68938dd4d", + "transactionHash": "0db2322d85e9d8ea2421559922bb6107429650ebdad304c907480853d465c10d", "result": { - "feeCharged": 300, + "feeCharged": 100, "result": { - "code": "txFEE_BUMP_INNER_SUCCESS", - "innerResultPair": { - "transactionHash": "5ab197acffd4b32d320df39b2b1f76246e2279fa8070c6c690cca1343e5e7e0b", - "result": { - "feeCharged": 200, - "result": { - "code": "txSUCCESS", - "results": [ - { - "code": "opINNER", - "tr": { - "type": "PAYMENT", - "paymentResult": { - "code": "PAYMENT_SUCCESS" - } - } - }, - { - "code": "opINNER", - "tr": { - "type": "PAYMENT", - "paymentResult": { - "code": "PAYMENT_SUCCESS" - } - } - } - ] - }, - "ext": { - "v": 0 + "code": "txSUCCESS", + "results": [ + { + "code": "opINNER", + "tr": { + "type": "PAYMENT", + "paymentResult": { + "code": "PAYMENT_SUCCESS" + } } } - } + ] }, "ext": { "v": 0 @@ -232,13 +211,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 3, + "lastModifiedLedgerSeq": 4, "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 400000000, - "seqNum": 12884901888, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989700, + "seqNum": 3, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -246,7 +225,31 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 4, + "seqTime": 0 + } + } + } + } + } } } }, @@ -262,9 +265,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 399999700, - "seqNum": 12884901888, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 3, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -272,7 +275,31 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 4, + "seqTime": 0 + } + } + } + } + } } } }, @@ -296,61 +323,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 399999700, - "seqNum": 12884901888, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], - "ext": { - "v": 0 - } - } - }, - "ext": { - "v": 0 - } - } - }, - { - "type": "LEDGER_ENTRY_UPDATED", - "updated": { - "lastModifiedLedgerSeq": 6, - "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", - "balance": 399999700, - "seqNum": 12884901888, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], - "ext": { - "v": 0 - } - } - }, - "ext": { - "v": 0 - } - } - }, - { - "type": "LEDGER_ENTRY_STATE", - "state": { - "lastModifiedLedgerSeq": 4, - "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", - "balance": 200010000, - "seqNum": 17179869184, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 3, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -358,7 +333,31 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 4, + "seqTime": 0 + } + } + } + } + } } } }, @@ -374,9 +373,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", - "balance": 200010000, - "seqNum": 17179869185, + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 4, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -424,20 +423,45 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 5, + "lastModifiedLedgerSeq": 6, "data": { - "type": "TRUSTLINE", - "trustLine": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 0, - "limit": 100, - "flags": 1, + "type": "ACCOUNT", + "account": { + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999989600, + "seqNum": 4, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 6, + "seqTime": 0 + } + } + } + } + } } } }, @@ -451,18 +475,43 @@ "updated": { "lastModifiedLedgerSeq": 6, "data": { - "type": "TRUSTLINE", - "trustLine": { - "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 50, - "limit": 100, - "flags": 1, + "type": "ACCOUNT", + "account": { + "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", + "balance": 999999998999988600, + "seqNum": 4, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 6, + "seqTime": 0 + } + } + } + } + } } } }, @@ -470,28 +519,49 @@ "v": 0 } } - } - ] - }, - { - "changes": [ + }, { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 6, + "lastModifiedLedgerSeq": 5, "data": { - "type": "TRUSTLINE", - "trustLine": { + "type": "ACCOUNT", + "account": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 50, - "limit": 100, - "flags": 1, + "balance": 399999900, + "seqNum": 8589934593, + "numSubEntries": 1, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 5, + "seqTime": 0 + } + } + } + } + } } } }, @@ -505,18 +575,43 @@ "updated": { "lastModifiedLedgerSeq": 6, "data": { - "type": "TRUSTLINE", - "trustLine": { + "type": "ACCOUNT", + "account": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "asset": { - "assetCode": "CUR1", - "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" - }, - "balance": 100, - "limit": 100, - "flags": 1, + "balance": 400000900, + "seqNum": 8589934593, + "numSubEntries": 1, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], "ext": { - "v": 0 + "v": 1, + "v1": { + "liabilities": { + "buying": 0, + "selling": 0 + }, + "ext": { + "v": 2, + "v2": { + "numSponsored": 0, + "numSponsoring": 0, + "signerSponsoringIDs": [], + "ext": { + "v": 3, + "v3": { + "ext": { + "v": 0 + }, + "seqLedger": 5, + "seqTime": 0 + } + } + } + } + } } } }, @@ -545,22 +640,43 @@ }, { "result": { - "transactionHash": "0db2322d85e9d8ea2421559922bb6107429650ebdad304c907480853d465c10d", + "transactionHash": "66efe325ead9f52082c8908b7813bd96793fd5ff0f1e50fdc50b23f68938dd4d", "result": { - "feeCharged": 100, + "feeCharged": 300, "result": { - "code": "txSUCCESS", - "results": [ - { - "code": "opINNER", - "tr": { - "type": "PAYMENT", - "paymentResult": { - "code": "PAYMENT_SUCCESS" - } + "code": "txFEE_BUMP_INNER_SUCCESS", + "innerResultPair": { + "transactionHash": "5ab197acffd4b32d320df39b2b1f76246e2279fa8070c6c690cca1343e5e7e0b", + "result": { + "feeCharged": 200, + "result": { + "code": "txSUCCESS", + "results": [ + { + "code": "opINNER", + "tr": { + "type": "PAYMENT", + "paymentResult": { + "code": "PAYMENT_SUCCESS" + } + } + }, + { + "code": "opINNER", + "tr": { + "type": "PAYMENT", + "paymentResult": { + "code": "PAYMENT_SUCCESS" + } + } + } + ] + }, + "ext": { + "v": 0 } } - ] + } }, "ext": { "v": 0 @@ -571,13 +687,13 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 4, + "lastModifiedLedgerSeq": 3, "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989700, - "seqNum": 3, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 400000000, + "seqNum": 12884901888, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -585,31 +701,7 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 4, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -625,9 +717,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 3, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 399999700, + "seqNum": 12884901888, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -635,31 +727,7 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 4, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -683,9 +751,9 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 3, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 399999700, + "seqNum": 12884901888, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -693,31 +761,7 @@ "thresholds": "01000000", "signers": [], "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 4, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -733,9 +777,61 @@ "data": { "type": "ACCOUNT", "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 4, + "accountID": "GCAEBM3GKNR6SV6N73FSGBXU6NSMZ2URQVMJQHXFQFY2PJPX6YBCSAKZ", + "balance": 399999700, + "seqNum": 12884901888, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], + "ext": { + "v": 0 + } + } + }, + "ext": { + "v": 0 + } + } + }, + { + "type": "LEDGER_ENTRY_STATE", + "state": { + "lastModifiedLedgerSeq": 4, + "data": { + "type": "ACCOUNT", + "account": { + "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", + "balance": 200010000, + "seqNum": 17179869184, + "numSubEntries": 0, + "inflationDest": null, + "flags": 0, + "homeDomain": "", + "thresholds": "01000000", + "signers": [], + "ext": { + "v": 0 + } + } + }, + "ext": { + "v": 0 + } + } + }, + { + "type": "LEDGER_ENTRY_UPDATED", + "updated": { + "lastModifiedLedgerSeq": 6, + "data": { + "type": "ACCOUNT", + "account": { + "accountID": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q", + "balance": 200010000, + "seqNum": 17179869185, "numSubEntries": 0, "inflationDest": null, "flags": 0, @@ -783,45 +879,20 @@ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 6, + "lastModifiedLedgerSeq": 5, "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999989600, - "seqNum": 4, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "type": "TRUSTLINE", + "trustLine": { + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 0, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 6, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -835,43 +906,18 @@ "updated": { "lastModifiedLedgerSeq": 6, "data": { - "type": "ACCOUNT", - "account": { - "accountID": "GC4EFXBN6BEENDAX7PBW5PGIIIVH3INMD3OEPQASXOLGOHVVP7ZEMG7X", - "balance": 999999998999988600, - "seqNum": 4, - "numSubEntries": 0, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "type": "TRUSTLINE", + "trustLine": { + "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 50, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 6, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -879,49 +925,28 @@ "v": 0 } } - }, + } + ] + }, + { + "changes": [ { "type": "LEDGER_ENTRY_STATE", "state": { - "lastModifiedLedgerSeq": 5, + "lastModifiedLedgerSeq": 6, "data": { - "type": "ACCOUNT", - "account": { + "type": "TRUSTLINE", + "trustLine": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 399999900, - "seqNum": 8589934593, - "numSubEntries": 1, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 50, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 5, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, @@ -935,43 +960,18 @@ "updated": { "lastModifiedLedgerSeq": 6, "data": { - "type": "ACCOUNT", - "account": { + "type": "TRUSTLINE", + "trustLine": { "accountID": "GB6MXQ5262ZJGDQNA6BL4TWE5SADVZXIKLPELFXKUE27X4SQTGQS44ZB", - "balance": 400000900, - "seqNum": 8589934593, - "numSubEntries": 1, - "inflationDest": null, - "flags": 0, - "homeDomain": "", - "thresholds": "01000000", - "signers": [], + "asset": { + "assetCode": "CUR1", + "issuer": "GCGE27HU2VYQANKL2VZWLCAOJYMEFST5DXPBWQ7BRRPOHUPK626DNG4Q" + }, + "balance": 100, + "limit": 100, + "flags": 1, "ext": { - "v": 1, - "v1": { - "liabilities": { - "buying": 0, - "selling": 0 - }, - "ext": { - "v": 2, - "v2": { - "numSponsored": 0, - "numSponsoring": 0, - "signerSponsoringIDs": [], - "ext": { - "v": 3, - "v3": { - "ext": { - "v": 0 - }, - "seqLedger": 5, - "seqTime": 0 - } - } - } - } - } + "v": 0 } } }, diff --git a/src/transactions/BumpFootprintExpirationOpFrame.cpp b/src/transactions/BumpFootprintExpirationOpFrame.cpp index c3337d2602..ee48aa2ec1 100644 --- a/src/transactions/BumpFootprintExpirationOpFrame.cpp +++ b/src/transactions/BumpFootprintExpirationOpFrame.cpp @@ -119,9 +119,8 @@ BumpFootprintExpirationOpFrame::doApply(Application& app, app.getLedgerManager().getSorobanNetworkConfig(ltx), app.getConfig())) { - // TODO: This probably should have a more precise error code as here - // the refundable fee limit is exceeded (and not some resource). - innerResult().code(BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED); + innerResult().code( + BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE); return false; } innerResult().code(BUMP_FOOTPRINT_EXPIRATION_SUCCESS); diff --git a/src/transactions/InvokeHostFunctionOpFrame.cpp b/src/transactions/InvokeHostFunctionOpFrame.cpp index 75811fd1cc..2c7af70cbf 100644 --- a/src/transactions/InvokeHostFunctionOpFrame.cpp +++ b/src/transactions/InvokeHostFunctionOpFrame.cpp @@ -582,7 +582,8 @@ InvokeHostFunctionOpFrame::doApply(Application& app, AbstractLedgerTxn& ltx, metrics.mEmitEventByte += eventSize; metrics.mMaxEmitEventByte = std::max(metrics.mMaxEmitEventByte, eventSize); - if (resources.contractEventsSizeBytes < metrics.mEmitEventByte) + if (sorobanConfig.txMaxContractEventsSizeBytes() < + metrics.mEmitEventByte) { innerResult().code(INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED); return false; @@ -594,13 +595,18 @@ InvokeHostFunctionOpFrame::doApply(Application& app, AbstractLedgerTxn& ltx, maybePopulateDiagnosticEvents(cfg, out, metrics); + metrics.mEmitEventByte += out.result_value.data.size(); + if (sorobanConfig.txMaxContractEventsSizeBytes() < metrics.mEmitEventByte) + { + innerResult().code(INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED); + return false; + } + if (!mParentTx.consumeRefundableSorobanResources( metrics.mEmitEventByte, out.rent_fee, ltx.loadHeader().current().ledgerVersion, sorobanConfig, cfg)) { - // TODO: This probably should have a more precise error code as here - // the refundable fee limit is exceeded (and not some resource). - innerResult().code(INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED); + innerResult().code(INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE); return false; } diff --git a/src/transactions/RestoreFootprintOpFrame.cpp b/src/transactions/RestoreFootprintOpFrame.cpp index fac7a7e06f..d7e9680e2e 100644 --- a/src/transactions/RestoreFootprintOpFrame.cpp +++ b/src/transactions/RestoreFootprintOpFrame.cpp @@ -136,9 +136,7 @@ RestoreFootprintOpFrame::doApply(Application& app, AbstractLedgerTxn& ltx, app.getLedgerManager().getSorobanNetworkConfig(ltx), app.getConfig())) { - // TODO: This probably should have a more precise error code as here - // the refundable fee limit is exceeded (and not some resource). - innerResult().code(RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED); + innerResult().code(RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE); return false; } innerResult().code(RESTORE_FOOTPRINT_SUCCESS); diff --git a/src/transactions/TransactionFrame.cpp b/src/transactions/TransactionFrame.cpp index 3ec40b0acc..0ddae17653 100644 --- a/src/transactions/TransactionFrame.cpp +++ b/src/transactions/TransactionFrame.cpp @@ -604,11 +604,6 @@ TransactionFrame::validateSorobanResources(SorobanNetworkConfig const& config, { return false; } - if (resources.contractEventsSizeBytes > - config.txMaxContractEventsSizeBytes()) - { - return false; - } if (readEntries.size() + writeEntries.size() > config.txMaxReadLedgerEntries() || writeEntries.size() > config.txMaxWriteLedgerEntries()) @@ -705,7 +700,7 @@ TransactionFrame::computeSorobanResourceFee( uint32_t protocolVersion, SorobanNetworkConfig const& sorobanConfig, Config const& cfg, bool useConsumedRefundableResources) const { - CxxTransactionResources cxxResources; + CxxTransactionResources cxxResources{}; auto const& txResources = sorobanResources(); cxxResources.instructions = txResources.instructions; @@ -721,20 +716,10 @@ TransactionFrame::computeSorobanResourceFee( cxxResources.transaction_size_bytes = static_cast(xdr::xdr_size(mEnvelope)); - cxxResources.contract_events_size_bytes = - txResources.contractEventsSizeBytes; - if (useConsumedRefundableResources) { - // It is possible that consumed events size is higher than the - // declared size (in such a case the transaction will fail). We - // still don't want to overcharge the fees though. - if (cxxResources.contract_events_size_bytes > - mConsumedContractEventsSizeBytes) - { - cxxResources.contract_events_size_bytes = - mConsumedContractEventsSizeBytes; - } + cxxResources.contract_events_size_bytes = + mConsumedContractEventsSizeBytes; } // This may throw, but only in case of the Core version misconfiguration. diff --git a/src/transactions/test/InvokeHostFunctionTests.cpp b/src/transactions/test/InvokeHostFunctionTests.cpp index dd4616da7d..aee9c988d1 100644 --- a/src/transactions/test/InvokeHostFunctionTests.cpp +++ b/src/transactions/test/InvokeHostFunctionTests.cpp @@ -357,8 +357,8 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") return tx->checkValid(*app, ltx, 0, 0, 0); }; - auto call = [&](SorobanResources const& resources, SCAddress const& address, - SCSymbol const& functionName, + auto call = [&](SorobanResources const& resources, uint32_t refundableFee, + SCAddress const& address, SCSymbol const& functionName, std::vector const& args, bool success) { Operation op; op.body.type(INVOKE_HOST_FUNCTION); @@ -368,8 +368,9 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") ihf.invokeContract().functionName = functionName; ihf.invokeContract().args.assign(args.begin(), args.end()); - auto tx = sorobanTransactionFrameFromOps( - app->getNetworkID(), root, {op}, {}, resources, 100'000, 1200); + auto tx = + sorobanTransactionFrameFromOps(app->getNetworkID(), root, {op}, {}, + resources, 100'000, refundableFee); { LedgerTxn ltx(app->getLedgerTxnRoot()); REQUIRE(tx->checkValid(*app, ltx, 0, 0, 0)); @@ -381,7 +382,7 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") if (success) { REQUIRE(tx->getFullFee() == 100'000); - REQUIRE(tx->getInclusionFee() == 66'094); + REQUIRE(tx->getInclusionFee() == 66'102); // Initially we store in result the charge for resources plus // minimum inclusion fee bid (currently equivalent to the network // `baseFee` of 100). @@ -410,10 +411,10 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") REQUIRE(changesAfter.size() == 2); REQUIRE(changesAfter[1].updated().data.account().balance - changesAfter[0].state().data.account().balance == - 1182); + 1180); } // The account should receive a refund for unspent refundable fee. - REQUIRE(root.getBalance() - balanceAfterFeeCharged == 1182); + REQUIRE(root.getBalance() - balanceAfterFeeCharged == 1180); } else { @@ -425,21 +426,27 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") ltx.commit(); } int64_t balanceAfterFeeCharged = root.getBalance(); + { LedgerTxn ltx(app->getLedgerTxnRoot()); // Unsuccessfully apply the tx and process refunds. REQUIRE(!tx->apply(*app, ltx, txm)); tx->processPostApply(*app, ltx, txm); ltx.commit(); - auto changesAfter = txm.getChangesAfter(); - REQUIRE(changesAfter.size() == 2); - REQUIRE(changesAfter[1].updated().data.account().balance - + if (refundableFee > 0) + { + auto changesAfter = txm.getChangesAfter(); + REQUIRE(changesAfter.size() == 2); + REQUIRE( + changesAfter[1].updated().data.account().balance - changesAfter[0].state().data.account().balance == - 1200); + refundableFee); + } + // The account should receive a full refund for metadata + // in case of tx failure. + REQUIRE(root.getBalance() - balanceAfterFeeCharged == + refundableFee); } - // The account should receive a full refund for metadata - // in case of tx failure. - REQUIRE(root.getBalance() - balanceAfterFeeCharged == 1200); } SCVal resultVal; if (tx->getResult().result.code() == txSUCCESS && @@ -471,11 +478,10 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") resources.instructions = 2'000'000; resources.readBytes = 2000; resources.writeBytes = 0; - resources.contractEventsSizeBytes = 100; SECTION("correct invocation") { - call(resources, contractID, scFunc, {sc7, sc16}, true); + call(resources, 1200, contractID, scFunc, {sc7, sc16}, true); REQUIRE(app->getMetrics() .NewTimer({"soroban", "host-fn-op", "exec"}) .count() != 0); @@ -490,36 +496,40 @@ TEST_CASE("basic contract invocation", "[tx][soroban]") { SCAddress address(SC_ADDRESS_TYPE_CONTRACT); address.contractId()[0] = 1; - call(resources, address, scFunc, {sc7, sc16}, false); + call(resources, 1200, address, scFunc, {sc7, sc16}, false); } SECTION("account address") { SCAddress address(SC_ADDRESS_TYPE_ACCOUNT); address.accountId() = root.getPublicKey(); - call(resources, address, scFunc, {sc7, sc16}, false); + call(resources, 1200, address, scFunc, {sc7, sc16}, false); } SECTION("too few parameters") { - call(resources, contractID, scFunc, {sc7}, false); + call(resources, 1200, contractID, scFunc, {sc7}, false); } SECTION("too many parameters") { // Too many parameters - call(resources, contractID, scFunc, {sc7, sc16, makeI32(0)}, false); + call(resources, 1200, contractID, scFunc, {sc7, sc16, makeI32(0)}, + false); } } SECTION("insufficient instructions") { resources.instructions = 10000; - call(resources, contractID, scFunc, {sc7, sc16}, false); + call(resources, 1200, contractID, scFunc, {sc7, sc16}, false); } SECTION("insufficient read bytes") { resources.readBytes = 100; - call(resources, contractID, scFunc, {sc7, sc16}, false); + call(resources, 1200, contractID, scFunc, {sc7, sc16}, false); + } + SECTION("insufficient refundable fee") + { + call(resources, 0, contractID, scFunc, {sc7, sc16}, false); } - SECTION("invalid footprint keys") { auto invalidFootprint = [&](xdr::xvector& @@ -649,7 +659,6 @@ TEST_CASE("contract storage", "[tx][soroban]") resources.instructions = 4'000'000; resources.readBytes = 5000; resources.writeBytes = writeBytes; - resources.contractEventsSizeBytes = 0; auto tx = sorobanTransactionFrameFromOps( app->getNetworkID(), root, {op}, {}, resources, 200'000, 40'000); @@ -889,7 +898,6 @@ TEST_CASE("contract storage", "[tx][soroban]") bumpResources.instructions = 0; bumpResources.readBytes = 5000; bumpResources.writeBytes = 0; - bumpResources.contractEventsSizeBytes = 0; auto tx = sorobanTransactionFrameFromOps(app->getNetworkID(), root, {bumpOp}, @@ -908,7 +916,6 @@ TEST_CASE("contract storage", "[tx][soroban]") bumpResources.instructions = 0; bumpResources.readBytes = 5000; bumpResources.writeBytes = 5000; - bumpResources.contractEventsSizeBytes = 0; // submit operation auto tx = sorobanTransactionFrameFromOps(app->getNetworkID(), root, @@ -1528,7 +1535,6 @@ TEST_CASE("failed invocation with diagnostics", "[tx][soroban]") resources.instructions = 2'000'000; resources.readBytes = 2000; resources.writeBytes = 1000; - resources.contractEventsSizeBytes = 100; auto tx = sorobanTransactionFrameFromOps(app->getNetworkID(), root, {op}, {}, resources, 100'000, 1200); @@ -1593,7 +1599,6 @@ TEST_CASE("complex contract", "[tx][soroban]") resources.instructions = 4'000'000; resources.readBytes = 3000; resources.writeBytes = 1000; - resources.contractEventsSizeBytes = 200; auto verifyDiagnosticEvents = [&](xdr::xvector events) { @@ -1699,7 +1704,6 @@ TEST_CASE("Stellar asset contract XLM transfer", createResources.instructions = 400'000; createResources.readBytes = 1000; createResources.writeBytes = 1000; - createResources.contractEventsSizeBytes = 0; LedgerKey contractExecutableKey(CONTRACT_DATA); contractExecutableKey.contractData().contract = contractID; @@ -1756,7 +1760,6 @@ TEST_CASE("Stellar asset contract XLM transfer", resources.instructions = 2'000'000; resources.readBytes = 2000; resources.writeBytes = 1072; - resources.contractEventsSizeBytes = 400; LedgerKey accountLedgerKey(ACCOUNT); accountLedgerKey.account().accountID = root.getPublicKey(); @@ -1911,8 +1914,17 @@ overrideNetworkSettingsToMin(Application& app) MinimumSorobanNetworkConfig::MAXIMUM_ENTRY_LIFETIME; exp.minPersistentEntryExpiration = MinimumSorobanNetworkConfig::MINIMUM_PERSISTENT_ENTRY_LIFETIME; - ltx.commit(); + auto& events = + ltx.load(configSettingKey( + ConfigSettingID::CONFIG_SETTING_CONTRACT_EVENTS_V0)) + .current() + .data.configSetting() + .contractEvents(); + events.txMaxContractEventsSizeBytes = + MinimumSorobanNetworkConfig::TX_MAX_CONTRACT_EVENTS_SIZE_BYTES; + + ltx.commit(); // submit a no-op upgrade so the cached soroban settings are updated. auto upgrade = LedgerUpgrade{LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE}; upgrade.newMaxSorobanTxSetSize() = 1; @@ -2023,7 +2035,6 @@ TEST_CASE("settings upgrade", "[tx][soroban][upgrades]") resources.instructions = 2'000'000; resources.readBytes = 3000; resources.writeBytes = 2000; - resources.contractEventsSizeBytes = 0; auto tx = sorobanTransactionFrameFromOps( app->getNetworkID(), root, {op}, {}, resources, 20'000'000, 30'000); diff --git a/src/transactions/test/TxEnvelopeTests.cpp b/src/transactions/test/TxEnvelopeTests.cpp index eb31f738d9..a5be6dac66 100644 --- a/src/transactions/test/TxEnvelopeTests.cpp +++ b/src/transactions/test/TxEnvelopeTests.cpp @@ -2531,8 +2531,6 @@ TEST_CASE("soroban transaction validation", "[tx][envelope][soroban]") resources.instructions = InitialSorobanNetworkConfig::TX_MAX_INSTRUCTIONS; resources.readBytes = InitialSorobanNetworkConfig::TX_MAX_READ_BYTES; resources.writeBytes = InitialSorobanNetworkConfig::TX_MAX_WRITE_BYTES; - resources.contractEventsSizeBytes = - InitialSorobanNetworkConfig::TX_MAX_CONTRACT_EVENTS_SIZE_BYTES; auto keys = LedgerTestUtils::generateUniqueValidSorobanLedgerEntryKeys( InitialSorobanNetworkConfig::TX_MAX_READ_LEDGER_ENTRIES); @@ -2559,11 +2557,6 @@ TEST_CASE("soroban transaction validation", "[tx][envelope][soroban]") resources.writeBytes += 1; validateResources(resources, false); } - SECTION("metadata size exceeded") - { - resources.contractEventsSizeBytes += 1; - validateResources(resources, false); - } SECTION("max read entries exceeded") { resources.footprint.readOnly.emplace_back(); @@ -2631,14 +2624,6 @@ TEST_CASE("soroban transaction validation", "[tx][envelope][soroban]") REQUIRE(!tx->checkValid(*app, ltx, 0, 0, 0)); REQUIRE(tx->getResult().result.code() == txINSUFFICIENT_FEE); } - SECTION("refundable fee exceeds tx refundable fee") - { - auto tx = sorobanTransactionFrameFromOps( - app->getNetworkID(), root, {op0}, {}, resources, 1'000'000, 10); - LedgerTxn ltx(app->getLedgerTxnRoot()); - REQUIRE(!tx->checkValid(*app, ltx, 0, 0, 0)); - REQUIRE(tx->getResult().result.code() == txINSUFFICIENT_FEE); - } } SECTION("multiple ops are not allowed")