diff --git a/Cargo.lock b/Cargo.lock index 2bfa4908ba..a5badcaf44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,16 +38,16 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.3", ] [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.0", ] [[package]] @@ -201,9 +201,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" dependencies = [ "memchr", ] @@ -246,24 +246,23 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" @@ -285,9 +284,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -295,9 +294,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "approx" @@ -366,7 +365,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.24", + "time 0.3.28", ] [[package]] @@ -382,7 +381,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.24", + "time 0.3.28", ] [[package]] @@ -474,9 +473,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ "event-listener", ] @@ -489,18 +488,18 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -513,7 +512,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", ] [[package]] @@ -562,16 +561,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.20.0", + "addr2line 0.21.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.31.1", + "object 0.32.0", "rustc-demangle", ] @@ -601,9 +600,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" [[package]] name = "base64ct" @@ -665,7 +664,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -693,9 +692,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "bitvec" @@ -873,7 +872,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", - "regex-automata 0.3.4", + "regex-automata 0.3.7", "serde", ] @@ -973,11 +972,12 @@ checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" [[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 = [ "jobserver", + "libc", ] [[package]] @@ -1124,9 +1124,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.19" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" +checksum = "7c8d502cbaec4595d2e7d5f61e318f05417bd2b66fdc3809498f0d3fdf0bea27" dependencies = [ "clap_builder", "clap_derive", @@ -1135,9 +1135,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.19" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" +checksum = "5891c7bc0edb3e1c2204fc5e94009affabeb1821c9e5fdc3959536c5c0bb984d" dependencies = [ "anstream", "anstyle", @@ -1147,21 +1147,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "coarsetime" @@ -1226,9 +1226,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "constant_time_eq" @@ -1334,7 +1334,7 @@ dependencies = [ "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.27.3", "hashbrown 0.13.2", "log", "regalloc2", @@ -1790,7 +1790,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2053,23 +2053,37 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-rc.1" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" +checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" dependencies = [ "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", "fiat-crypto", - "packed_simd_2", - "platforms 3.0.2", + "platforms 3.1.2", + "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 2.0.29", +] + [[package]] name = "cxx" -version = "1.0.102" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f68e12e817cb19eaab81aaec582b4052d07debd3c3c6b083b9d361db47c7dc9d" +checksum = "28403c86fc49e3401fdf45499ba37fad6493d9329449d6449d7f0e10f4654d28" dependencies = [ "cc", "cxxbridge-flags", @@ -2079,9 +2093,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.102" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e789217e4ab7cf8cc9ce82253180a9fe331f35f5d339f0ccfe0270b39433f397" +checksum = "78da94fef01786dc3e0c76eafcd187abcaa9972c78e05ff4041e24fdf059c285" dependencies = [ "cc", "codespan-reporting", @@ -2089,24 +2103,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] name = "cxxbridge-flags" -version = "1.0.102" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78a19f4c80fd9ab6c882286fa865e92e07688f4387370a209508014ead8751d0" +checksum = "e2a6f5e1dfb4b34292ad4ea1facbfdaa1824705b231610087b00b17008641809" [[package]] name = "cxxbridge-macro" -version = "1.0.102" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fcfa71f66c8563c4fa9dd2bb68368d50267856f831ac5d85367e0805f9606c" +checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2183,9 +2197,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", @@ -2221,9 +2235,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8810e7e2cf385b1e9b50d68264908ec367ba642c96d02edfe61c39e88e2a3c01" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" [[package]] name = "derivative" @@ -2382,7 +2396,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2438,9 +2452,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" [[package]] name = "ecdsa" @@ -2460,7 +2474,7 @@ version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.7", + "der 0.7.8", "digest 0.10.7", "elliptic-curve 0.13.5", "rfc6979 0.4.0", @@ -2477,6 +2491,16 @@ dependencies = [ "signature 1.6.4", ] +[[package]] +name = "ed25519" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.1.0", +] + [[package]] name = "ed25519-dalek" version = "1.0.1" @@ -2484,13 +2508,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", - "ed25519", + "ed25519 1.5.3", "rand 0.7.3", - "serde", "sha2 0.9.9", "zeroize", ] +[[package]] +name = "ed25519-dalek" +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.2", + "rand_core 0.6.4", + "serde", + "sha2 0.10.7", + "zeroize", +] + [[package]] name = "ed25519-zebra" version = "3.1.0" @@ -2590,7 +2627,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2601,7 +2638,7 @@ checksum = "b893c4eb2dc092c811165f84dc7447fae16fb66521717968c34c509b39b1a5c5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2631,9 +2668,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -2707,8 +2744,8 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "evm" -version = "0.39.0" -source = "git+https://github.com/moonbeam-foundation/evm?branch=tgm-record-external-cost#53315e22da8494dbcb6b54a18e09775e956b7c73" +version = "0.39.1" +source = "git+https://github.com/moonbeam-foundation/evm?rev=a33ac87ad7462b7e7029d12c385492b2a8311d1c#a33ac87ad7462b7e7029d12c385492b2a8311d1c" dependencies = [ "auto_impl", "environmental", @@ -2728,7 +2765,7 @@ dependencies = [ [[package]] name = "evm-core" version = "0.39.0" -source = "git+https://github.com/moonbeam-foundation/evm?branch=tgm-record-external-cost#53315e22da8494dbcb6b54a18e09775e956b7c73" +source = "git+https://github.com/moonbeam-foundation/evm?rev=a33ac87ad7462b7e7029d12c385492b2a8311d1c#a33ac87ad7462b7e7029d12c385492b2a8311d1c" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2739,7 +2776,7 @@ dependencies = [ [[package]] name = "evm-gasometer" version = "0.39.0" -source = "git+https://github.com/moonbeam-foundation/evm?branch=tgm-record-external-cost#53315e22da8494dbcb6b54a18e09775e956b7c73" +source = "git+https://github.com/moonbeam-foundation/evm?rev=a33ac87ad7462b7e7029d12c385492b2a8311d1c#a33ac87ad7462b7e7029d12c385492b2a8311d1c" dependencies = [ "environmental", "evm-core", @@ -2750,7 +2787,7 @@ dependencies = [ [[package]] name = "evm-runtime" version = "0.39.0" -source = "git+https://github.com/moonbeam-foundation/evm?branch=tgm-record-external-cost#53315e22da8494dbcb6b54a18e09775e956b7c73" +source = "git+https://github.com/moonbeam-foundation/evm?rev=a33ac87ad7462b7e7029d12c385492b2a8311d1c#a33ac87ad7462b7e7029d12c385492b2a8311d1c" dependencies = [ "auto_impl", "environmental", @@ -2829,7 +2866,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2893,7 +2930,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "async-trait", "fp-consensus", @@ -2909,7 +2946,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "async-trait", "ethereum", @@ -2939,7 +2976,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "fc-db", "fc-storage", @@ -2962,7 +2999,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "ethereum", "ethereum-types", @@ -3012,7 +3049,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "ethereum", "ethereum-types", @@ -3025,7 +3062,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "ethereum", "ethereum-types", @@ -3087,13 +3124,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -3133,9 +3170,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "libz-sys", @@ -3205,7 +3242,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "hex", "impl-serde 0.4.0", @@ -3224,7 +3261,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "ethereum", "parity-scale-codec", @@ -3236,7 +3273,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "ethereum", "ethereum-types", @@ -3250,7 +3287,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "evm", "frame-support", @@ -3265,7 +3302,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "ethereum", "ethereum-types", @@ -3282,7 +3319,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "frame-support", "parity-scale-codec", @@ -3294,7 +3331,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "parity-scale-codec", "serde", @@ -3386,7 +3423,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3503,7 +3540,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3515,7 +3552,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3525,7 +3562,7 @@ source = "git+https://github.com/moonbeam-foundation/substrate?branch=moonbeam-p dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3605,7 +3642,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.4", + "rustix 0.38.10", "windows-sys 0.48.0", ] @@ -3692,7 +3729,7 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "waker-fn", ] @@ -3704,7 +3741,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3714,7 +3751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls 0.20.8", + "rustls 0.20.9", "webpki 0.22.0", ] @@ -3750,7 +3787,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "pin-utils", "slab", ] @@ -3851,6 +3888,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + [[package]] name = "glob" version = "0.3.1" @@ -3859,9 +3902,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aca8bbd8e0707c1887a8bbb7e6b40e228f251ff5d62c8220a4a7a53c73aff006" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ "aho-corasick", "bstr 1.6.0", @@ -3894,9 +3937,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -3976,9 +4019,9 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ "hashbrown 0.14.0", ] @@ -4107,7 +4150,7 @@ checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", ] [[package]] @@ -4124,9 +4167,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -4150,7 +4193,7 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "socket2 0.4.9", "tokio", "tower-service", @@ -4167,11 +4210,27 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.20.8", + "rustls 0.20.9", "rustls-native-certs", "tokio", - "tokio-rustls", - "webpki-roots", + "tokio-rustls 0.23.4", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +dependencies = [ + "futures-util", + "http", + "hyper", + "log", + "rustls 0.21.7", + "rustls-native-certs", + "tokio", + "tokio-rustls 0.24.1", + "webpki-roots 0.23.1", ] [[package]] @@ -4323,9 +4382,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.5" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" dependencies = [ "console", "instant", @@ -4428,7 +4487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", - "rustix 0.38.4", + "rustix 0.38.10", "windows-sys 0.48.0", ] @@ -4467,9 +4526,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-client", @@ -4482,9 +4541,9 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" +checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ "futures-util", "http", @@ -4495,17 +4554,17 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "tracing", - "webpki-roots", + "webpki-roots 0.25.2", ] [[package]] name = "jsonrpsee-core" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", "arrayvec 0.7.4", @@ -4531,13 +4590,13 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" +checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" dependencies = [ "async-trait", "hyper", - "hyper-rustls", + "hyper-rustls 0.24.1", "jsonrpsee-core", "jsonrpsee-types", "rustc-hash", @@ -4550,9 +4609,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck", "proc-macro-crate", @@ -4563,9 +4622,9 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc" +checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" dependencies = [ "futures-channel", "futures-util", @@ -4585,9 +4644,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" dependencies = [ "anyhow", "beef", @@ -4599,9 +4658,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b83daeecfc6517cfe210df24e570fb06213533dfb990318fae781f4c7119dd9" +checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ "http", "jsonrpsee-client-transport", @@ -4808,12 +4867,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "libm" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" - [[package]] name = "libm" version = "0.2.7" @@ -4944,12 +4997,12 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e2d584751cecb2aabaa56106be6be91338a60a0f4e420cf2af639204f596fc1" +checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58 0.4.0", - "ed25519-dalek", + "ed25519-dalek 2.0.0", "log", "multiaddr", "multihash 0.17.0", @@ -5080,7 +5133,7 @@ dependencies = [ "parking_lot 0.12.1", "quinn-proto", "rand 0.8.5", - "rustls 0.20.8", + "rustls 0.20.9", "thiserror", "tokio", ] @@ -5161,7 +5214,7 @@ dependencies = [ "libp2p-identity", "rcgen 0.10.0", "ring", - "rustls 0.20.8", + "rustls 0.20.9", "thiserror", "webpki 0.22.0", "x509-parser 0.14.0", @@ -5229,7 +5282,7 @@ dependencies = [ "rw-stream-sink", "soketto", "url", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -5393,9 +5446,9 @@ dependencies = [ [[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 = "lru" @@ -5540,9 +5593,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "76fc44e2588d5b436dbc3c6cf62aef290f90dab6235744a93dfe1cc18f451e2c" [[package]] name = "memfd" @@ -6920,7 +6973,7 @@ dependencies = [ [[package]] name = "nimbus-consensus" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#a30317eb6c26b07f1bd6bc9e0c3012c12fb43abd" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#94ea27fcfa2f37ce4ccd7892002d7bd9926bb78b" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -6950,7 +7003,7 @@ dependencies = [ [[package]] name = "nimbus-primitives" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#a30317eb6c26b07f1bd6bc9e0c3012c12fb43abd" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#94ea27fcfa2f37ce4ccd7892002d7bd9926bb78b" dependencies = [ "async-trait", "frame-benchmarking", @@ -7034,9 +7087,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", @@ -7045,9 +7098,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", ] @@ -7152,7 +7205,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -7175,9 +7228,9 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] @@ -7220,11 +7273,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.55" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if", "foreign-types", "libc", @@ -7241,7 +7294,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -7252,9 +7305,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" dependencies = [ "cc", "libc", @@ -7393,16 +7446,6 @@ dependencies = [ "sha2 0.10.7", ] -[[package]] -name = "packed_simd_2" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" -dependencies = [ - "cfg-if", - "libm 0.1.4", -] - [[package]] name = "pallet-asset-manager" version = "0.1.0" @@ -7441,7 +7484,7 @@ dependencies = [ [[package]] name = "pallet-author-inherent" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#a30317eb6c26b07f1bd6bc9e0c3012c12fb43abd" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#94ea27fcfa2f37ce4ccd7892002d7bd9926bb78b" dependencies = [ "frame-benchmarking", "frame-support", @@ -7460,7 +7503,7 @@ dependencies = [ [[package]] name = "pallet-author-mapping" version = "2.0.5" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#a30317eb6c26b07f1bd6bc9e0c3012c12fb43abd" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#94ea27fcfa2f37ce4ccd7892002d7bd9926bb78b" dependencies = [ "frame-benchmarking", "frame-support", @@ -7478,7 +7521,7 @@ dependencies = [ [[package]] name = "pallet-author-slot-filter" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#a30317eb6c26b07f1bd6bc9e0c3012c12fb43abd" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#94ea27fcfa2f37ce4ccd7892002d7bd9926bb78b" dependencies = [ "frame-benchmarking", "frame-support", @@ -7585,7 +7628,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "fp-evm", "frame-support", @@ -7715,7 +7758,7 @@ name = "pallet-crowdloan-rewards" version = "0.6.0" source = "git+https://github.com/moonbeam-foundation/crowdloan-rewards?branch=moonbeam-polkadot-v0.9.43#7def581ccb38bc7707f6918cde8901d6da3c8212" dependencies = [ - "ed25519-dalek", + "ed25519-dalek 1.0.1", "frame-benchmarking", "frame-support", "frame-system", @@ -7827,7 +7870,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "environmental", "ethereum", @@ -7894,7 +7937,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "environmental", "evm", @@ -8002,7 +8045,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "fp-evm", ] @@ -8010,7 +8053,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "fp-evm", "sp-core", @@ -8166,7 +8209,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "fp-evm", "frame-support", @@ -8213,7 +8256,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "fp-evm", "num", @@ -8416,7 +8459,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "fp-evm", "tiny-keccak", @@ -8425,7 +8468,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#9b811af44a6f2a8efde2f2b6d845d48c79992fad" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v0.9.43#a39b3011b9fb62b47931a199060c1b23926f34d8" dependencies = [ "fp-evm", "ripemd", @@ -8655,7 +8698,7 @@ dependencies = [ [[package]] name = "pallet-maintenance-mode" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#a30317eb6c26b07f1bd6bc9e0c3012c12fb43abd" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#94ea27fcfa2f37ce4ccd7892002d7bd9926bb78b" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -8707,7 +8750,7 @@ dependencies = [ [[package]] name = "pallet-migrations" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#a30317eb6c26b07f1bd6bc9e0c3012c12fb43abd" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#94ea27fcfa2f37ce4ccd7892002d7bd9926bb78b" dependencies = [ "frame-benchmarking", "frame-support", @@ -8953,7 +8996,7 @@ dependencies = [ [[package]] name = "pallet-randomness" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#a30317eb6c26b07f1bd6bc9e0c3012c12fb43abd" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#94ea27fcfa2f37ce4ccd7892002d7bd9926bb78b" dependencies = [ "frame-benchmarking", "frame-support", @@ -9139,7 +9182,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -9524,7 +9567,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -9636,7 +9679,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -9652,32 +9695,32 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 1.9.3", + "indexmap 2.0.0", ] [[package]] name = "pin-project" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -9688,9 +9731,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -9714,7 +9757,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.7", + "der 0.7.8", "spki 0.7.2", ] @@ -9732,9 +9775,9 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "platforms" -version = "3.0.2" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" [[package]] name = "polkadot-approval-distribution" @@ -10907,7 +10950,7 @@ dependencies = [ "concurrent-queue", "libc", "log", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "windows-sys 0.48.0", ] @@ -10948,9 +10991,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" +checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" [[package]] name = "ppv-lite86" @@ -11092,7 +11135,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -11167,7 +11210,7 @@ checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -11207,13 +11250,13 @@ dependencies = [ [[package]] name = "prometheus-client-derive-encode" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b6a5217beb0ad503ee7fa752d451c905113d70721b937126158f3106a48cc1" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] @@ -11328,7 +11371,7 @@ dependencies = [ "rand 0.8.5", "ring", "rustc-hash", - "rustls 0.20.8", + "rustls 0.20.9", "slab", "thiserror", "tinyvec", @@ -11338,9 +11381,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -11467,7 +11510,7 @@ checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring", - "time 0.3.24", + "time 0.3.28", "x509-parser 0.13.2", "yasna", ] @@ -11480,7 +11523,7 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.24", + "time 0.3.28", "yasna", ] @@ -11528,22 +11571,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ef7e18e8841942ddb1cf845054f8008410030a3997875d9e49b7a363063df1" +checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfaf0c85b766276c797f3791f5bc6d5bd116b41d53049af2789666b0c0bc9fa" +checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -11560,14 +11603,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.1" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.4", - "regex-syntax 0.7.4", + "regex-automata 0.3.7", + "regex-syntax 0.7.5", ] [[package]] @@ -11581,13 +11624,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.7.5", ] [[package]] @@ -11598,9 +11641,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "resolv-conf" @@ -11917,11 +11960,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.4" +version = "0.38.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", "linux-raw-sys 0.4.5", @@ -11943,9 +11986,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring", @@ -11953,6 +11996,18 @@ dependencies = [ "webpki 0.22.0", ] +[[package]] +name = "rustls" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +dependencies = [ + "log", + "ring", + "rustls-webpki 0.101.4", + "sct 0.7.0", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -11971,7 +12026,27 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.2", + "base64 0.21.3", +] + +[[package]] +name = "rustls-webpki" +version = "0.100.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +dependencies = [ + "ring", + "untrusted", ] [[package]] @@ -12120,7 +12195,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -12798,7 +12873,7 @@ dependencies = [ "futures 0.3.28", "futures-timer", "hyper", - "hyper-rustls", + "hyper-rustls 0.23.2", "libp2p", "num_cpus", "once_cell", @@ -13123,7 +13198,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -13310,7 +13385,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", - "der 0.7.7", + "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", "subtle", @@ -13393,29 +13468,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.180" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -13434,7 +13509,7 @@ dependencies = [ [[package]] name = "session-keys-primitives" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#a30317eb6c26b07f1bd6bc9e0c3012c12fb43abd" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#94ea27fcfa2f37ce4ccd7892002d7bd9926bb78b" dependencies = [ "async-trait", "frame-support", @@ -13590,9 +13665,9 @@ dependencies = [ [[package]] name = "similar-asserts" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbf644ad016b75129f01a34a355dcb8d66a5bc803e417c7a77cc5d5ee9fa0f18" +checksum = "e041bb827d1bfca18f213411d51b665309f1afb37a04a5d1464530e13779fc0f" dependencies = [ "console", "similar", @@ -13600,15 +13675,15 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -13666,14 +13741,14 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733" +checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" dependencies = [ "aes-gcm 0.9.4", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-rc.1", + "curve25519-dalek 4.0.0", "rand_core 0.6.4", "ring", "rustc_version", @@ -13749,7 +13824,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -13991,7 +14066,7 @@ dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -14010,7 +14085,7 @@ source = "git+https://github.com/moonbeam-foundation/substrate?branch=moonbeam-p dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -14045,8 +14120,8 @@ version = "7.0.0" source = "git+https://github.com/moonbeam-foundation/substrate?branch=moonbeam-polkadot-v0.9.43#d1afa36361cdad96108aebe6e2fe8d3a429ef23d" dependencies = [ "bytes", - "ed25519", - "ed25519-dalek", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", "futures 0.3.28", "libsecp256k1", "log", @@ -14221,7 +14296,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -14407,7 +14482,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -14482,7 +14557,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.7", + "der 0.7.8", ] [[package]] @@ -14608,9 +14683,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.41.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc443bad666016e012538782d9e3006213a7db43e9fb1dda91657dc06a6fa08" +checksum = "5e6915280e2d0db8911e5032a5c275571af6bdded2916abd691a659be25d3439" dependencies = [ "Inflector", "num-format", @@ -14991,9 +15066,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -15047,14 +15122,14 @@ checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.38.4", + "rustix 0.38.10", "windows-sys 0.48.0", ] @@ -15075,22 +15150,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -15165,9 +15240,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.24" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b79eabcd964882a646b3584543ccabeae7869e9ac32a46f6f22b7a5bd405308b" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ "deranged", "itoa", @@ -15184,9 +15259,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -15265,20 +15340,19 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2 0.4.9", + "socket2 0.5.3", "tokio-macros", "windows-sys 0.48.0", ] @@ -15291,7 +15365,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -15311,11 +15385,21 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.8", + "rustls 0.20.9", "tokio", "webpki 0.22.0", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.7", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.14" @@ -15323,7 +15407,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "tokio", "tokio-util", ] @@ -15338,7 +15422,7 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "tokio", "tracing", ] @@ -15403,14 +15487,14 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "bytes", "futures-core", "futures-util", "http", "http-body", "http-range-header", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "tower-layer", "tower-service", ] @@ -15435,7 +15519,7 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "log", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "tracing-attributes", "tracing-core", ] @@ -15448,7 +15532,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -15491,7 +15575,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -15670,9 +15754,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a84e0202ea606ba5ebee8507ab2bfbe89b98551ed9b8f0be198109275cff284b" +checksum = "6df60d81823ed9c520ee897489573da4b1d79ffbe006b8134f46de1a1aa03555" dependencies = [ "basic-toml", "glob", @@ -15838,9 +15922,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna 0.4.0", @@ -15968,7 +16052,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -16002,7 +16086,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -16104,7 +16188,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" dependencies = [ "downcast-rs", - "libm 0.2.7", + "libm", "memory_units", "num-rational", "num-traits", @@ -16164,7 +16248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.3", "bincode", "directories-next", "file-per-thread-logger", @@ -16189,7 +16273,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.27.3", "log", "object 0.30.4", "target-lexicon", @@ -16208,7 +16292,7 @@ dependencies = [ "anyhow", "cranelift-codegen", "cranelift-native", - "gimli", + "gimli 0.27.3", "object 0.30.4", "target-lexicon", "wasmtime-environ", @@ -16222,7 +16306,7 @@ checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli", + "gimli 0.27.3", "indexmap 1.9.3", "log", "object 0.30.4", @@ -16244,7 +16328,7 @@ dependencies = [ "bincode", "cfg-if", "cpp_demangle", - "gimli", + "gimli 0.27.3", "log", "object 0.30.4", "rustc-demangle", @@ -16354,6 +16438,21 @@ dependencies = [ "webpki 0.22.0", ] +[[package]] +name = "webpki-roots" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" +dependencies = [ + "rustls-webpki 0.100.2", +] + +[[package]] +name = "webpki-roots" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" + [[package]] name = "webrtc" version = "0.6.0" @@ -16380,7 +16479,7 @@ dependencies = [ "sha2 0.10.7", "stun", "thiserror", - "time 0.3.24", + "time 0.3.28", "tokio", "turn", "url", @@ -16412,9 +16511,9 @@ dependencies = [ [[package]] name = "webrtc-dtls" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05" +checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" dependencies = [ "aes 0.6.0", "aes-gcm 0.10.2", @@ -16429,12 +16528,11 @@ dependencies = [ "hkdf", "hmac 0.12.1", "log", - "oid-registry 0.6.1", "p256", "p384", "rand 0.8.5", "rand_core 0.6.4", - "rcgen 0.9.3", + "rcgen 0.10.0", "ring", "rustls 0.19.1", "sec1 0.3.0", @@ -16447,7 +16545,7 @@ dependencies = [ "tokio", "webpki 0.21.4", "webrtc-util", - "x25519-dalek 2.0.0-pre.1", + "x25519-dalek 2.0.0", "x509-parser 0.13.2", ] @@ -16747,7 +16845,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -16765,7 +16863,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -16785,17 +16883,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -16806,9 +16904,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[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" @@ -16824,9 +16922,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[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" @@ -16842,9 +16940,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[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" @@ -16860,9 +16958,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[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" @@ -16878,9 +16976,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[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" @@ -16890,9 +16988,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[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" @@ -16908,15 +17006,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[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.5.2" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd122eb777186e60c3fdf765a58ac76e41c582f1f535fbf3314434c6b58f3f7" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -16953,12 +17051,13 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0-pre.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek 4.0.0", "rand_core 0.6.4", + "serde", "zeroize", ] @@ -16978,7 +17077,7 @@ dependencies = [ "ring", "rusticata-macros", "thiserror", - "time 0.3.24", + "time 0.3.28", ] [[package]] @@ -16996,7 +17095,7 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time 0.3.24", + "time 0.3.28", ] [[package]] @@ -17060,7 +17159,7 @@ dependencies = [ [[package]] name = "xcm-primitives" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#a30317eb6c26b07f1bd6bc9e0c3012c12fb43abd" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v0.9.43#94ea27fcfa2f37ce4ccd7892002d7bd9926bb78b" dependencies = [ "sp-runtime", ] @@ -17099,7 +17198,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -17140,7 +17239,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.24", + "time 0.3.28", ] [[package]] @@ -17160,7 +17259,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index c66a40ab9b..ae7603f332 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -217,9 +217,9 @@ ethereum = { version = "0.14.0", default-features = false, features = [ "with-codec", ] } ethereum-types = { version = "0.14", default-features = false } -evm = { git = "https://github.com/moonbeam-foundation/evm", branch = "tgm-record-external-cost", default-features = false } -evm-gasometer = { git = "https://github.com/moonbeam-foundation/evm", branch = "tgm-record-external-cost", default-features = false } -evm-runtime = { git = "https://github.com/moonbeam-foundation/evm", branch = "tgm-record-external-cost", default-features = false } +evm = { git = "https://github.com/moonbeam-foundation/evm", rev = "a33ac87ad7462b7e7029d12c385492b2a8311d1c", default-features = false } +evm-gasometer = { git = "https://github.com/moonbeam-foundation/evm", rev = "a33ac87ad7462b7e7029d12c385492b2a8311d1c", default-features = false } +evm-runtime = { git = "https://github.com/moonbeam-foundation/evm", rev = "a33ac87ad7462b7e7029d12c385492b2a8311d1c", default-features = false } fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v0.9.43", default-features = false } fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v0.9.43", default-features = false } fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v0.9.43", default-features = false } diff --git a/pallets/ethereum-xcm/src/mock.rs b/pallets/ethereum-xcm/src/mock.rs index 11d52f5771..13c7d94490 100644 --- a/pallets/ethereum-xcm/src/mock.rs +++ b/pallets/ethereum-xcm/src/mock.rs @@ -146,6 +146,8 @@ impl FindAuthor for FindAuthorTruncated { } const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub const TransactionByteFee: u64 = 1; @@ -157,6 +159,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } pub struct HashedAddressMapping; @@ -188,6 +194,7 @@ impl pallet_evm::Config for Test { type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/assets-erc20/src/lib.rs b/precompiles/assets-erc20/src/lib.rs index 47deb63494..8d8c2336d6 100644 --- a/precompiles/assets-erc20/src/lib.rs +++ b/precompiles/assets-erc20/src/lib.rs @@ -277,6 +277,7 @@ where id: asset_id.clone().into(), delegate: Runtime::Lookup::unlookup(spender.clone()), }, + 0, )?; } // Dispatch call (if enough gas). @@ -288,6 +289,7 @@ where delegate: Runtime::Lookup::unlookup(spender), amount, }, + 0, )?; Ok(()) @@ -319,6 +321,7 @@ where target: Runtime::Lookup::unlookup(to), amount: value, }, + SYSTEM_ACCOUNT_SIZE, )?; } @@ -366,6 +369,7 @@ where destination: Runtime::Lookup::unlookup(to), amount: value, }, + SYSTEM_ACCOUNT_SIZE, )?; } else { // Dispatch call (if enough gas). @@ -377,6 +381,7 @@ where target: Runtime::Lookup::unlookup(to), amount: value, }, + SYSTEM_ACCOUNT_SIZE, )?; } } @@ -551,6 +556,7 @@ where beneficiary: Runtime::Lookup::unlookup(to), amount: value, }, + SYSTEM_ACCOUNT_SIZE, )?; } @@ -596,6 +602,7 @@ where who: Runtime::Lookup::unlookup(from), amount: value, }, + 0, )?; } @@ -636,6 +643,7 @@ where id: asset_id.into(), who: Runtime::Lookup::unlookup(account), }, + 0, )?; } @@ -667,6 +675,7 @@ where id: asset_id.into(), who: Runtime::Lookup::unlookup(account), }, + 0, )?; } @@ -694,6 +703,7 @@ where pallet_assets::Call::::freeze_asset { id: asset_id.into(), }, + 0, )?; } @@ -721,6 +731,7 @@ where pallet_assets::Call::::thaw_asset { id: asset_id.into(), }, + 0, )?; } @@ -754,6 +765,7 @@ where id: asset_id.into(), owner: Runtime::Lookup::unlookup(owner), }, + 0, )?; } @@ -794,6 +806,7 @@ where admin: Runtime::Lookup::unlookup(admin), freezer: Runtime::Lookup::unlookup(freezer), }, + 0, )?; } @@ -827,6 +840,7 @@ where symbol: symbol.into(), decimals, }, + 0, )?; } @@ -854,6 +868,7 @@ where pallet_assets::Call::::clear_metadata { id: asset_id.into(), }, + 0, )?; } diff --git a/precompiles/assets-erc20/src/mock.rs b/precompiles/assets-erc20/src/mock.rs index c4f99a5b56..ab712a0071 100644 --- a/precompiles/assets-erc20/src/mock.rs +++ b/precompiles/assets-erc20/src/mock.rs @@ -180,6 +180,8 @@ pub type LocalPCall = Erc20AssetsPrecompileSetCall; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block Storage Limit in bytes. Set to 40KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -189,6 +191,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -210,6 +216,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/author-mapping/src/lib.rs b/precompiles/author-mapping/src/lib.rs index 5b66d03b72..ebf2afc65b 100644 --- a/precompiles/author-mapping/src/lib.rs +++ b/precompiles/author-mapping/src/lib.rs @@ -78,7 +78,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = AuthorMappingCall::::add_association { nimbus_id }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -104,7 +104,7 @@ where new_nimbus_id, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -122,7 +122,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = AuthorMappingCall::::clear_association { nimbus_id }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -138,7 +138,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = AuthorMappingCall::::remove_keys {}; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -152,7 +152,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = AuthorMappingCall::::set_keys { keys: keys.into() }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } diff --git a/precompiles/author-mapping/src/mock.rs b/precompiles/author-mapping/src/mock.rs index 9769d01c52..b3eaf4c07c 100644 --- a/precompiles/author-mapping/src/mock.rs +++ b/precompiles/author-mapping/src/mock.rs @@ -108,6 +108,8 @@ pub type PCall = AuthorMappingPrecompileCall; mock_account!(AuthorMappingAccount, |_| MockAccount::from_u64(1)); const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -117,6 +119,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -138,6 +144,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/balances-erc20/src/lib.rs b/precompiles/balances-erc20/src/lib.rs index ba4b70327f..ade86c042c 100644 --- a/precompiles/balances-erc20/src/lib.rs +++ b/precompiles/balances-erc20/src/lib.rs @@ -288,6 +288,7 @@ where dest: Runtime::Lookup::unlookup(to), value: value, }, + SYSTEM_ACCOUNT_SIZE, )?; } @@ -353,6 +354,7 @@ where dest: Runtime::Lookup::unlookup(to), value: value, }, + SYSTEM_ACCOUNT_SIZE, )?; } @@ -414,6 +416,7 @@ where dest: Runtime::Lookup::unlookup(caller), value: amount, }, + SYSTEM_ACCOUNT_SIZE, )?; log2( diff --git a/precompiles/balances-erc20/src/mock.rs b/precompiles/balances-erc20/src/mock.rs index 359cb29607..2626da9b7a 100644 --- a/precompiles/balances-erc20/src/mock.rs +++ b/precompiles/balances-erc20/src/mock.rs @@ -101,6 +101,8 @@ pub type Precompiles = PrecompileSetBuilder< pub type PCall = Erc20BalancesPrecompileCall; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -110,6 +112,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -131,6 +137,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/batch/src/mock.rs b/precompiles/batch/src/mock.rs index 6017c91fa4..3ffc9c2619 100644 --- a/precompiles/batch/src/mock.rs +++ b/precompiles/batch/src/mock.rs @@ -122,6 +122,8 @@ mock_account!(Batch, |_| MockAccount::from_u64(1)); mock_account!(Revert, |_| MockAccount::from_u64(2)); const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -131,6 +133,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -152,6 +158,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/call-permit/src/mock.rs b/precompiles/call-permit/src/mock.rs index e0e424c8c4..a74d32ad9c 100644 --- a/precompiles/call-permit/src/mock.rs +++ b/precompiles/call-permit/src/mock.rs @@ -137,6 +137,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = (); + type GasLimitStorageGrowthRatio = (); type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/collective/src/lib.rs b/precompiles/collective/src/lib.rs index 9289c34397..85ad390ef4 100644 --- a/precompiles/collective/src/lib.rs +++ b/precompiles/collective/src/lib.rs @@ -136,6 +136,7 @@ where proposal, length_bound: proposal_length, }, + SYSTEM_ACCOUNT_SIZE, )?; log.record(handle)?; @@ -196,6 +197,7 @@ where proposal, length_bound: proposal_length, }, + SYSTEM_ACCOUNT_SIZE, )?; } @@ -230,6 +232,7 @@ where index: proposal_index, approve, }, + SYSTEM_ACCOUNT_SIZE, )?; log.record(handle)?; @@ -262,6 +265,7 @@ where ), length_bound, }, + SYSTEM_ACCOUNT_SIZE, )?; // We can know if the proposal was executed or not based on the `pays_fee` in diff --git a/precompiles/collective/src/mock.rs b/precompiles/collective/src/mock.rs index 15e2e9a5af..2aa3b10ad3 100644 --- a/precompiles/collective/src/mock.rs +++ b/precompiles/collective/src/mock.rs @@ -116,6 +116,8 @@ pub type Precompiles = PrecompileSetBuilder< pub type PCall = CollectivePrecompileCall; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -125,6 +127,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio : u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -146,6 +152,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/conviction-voting/src/lib.rs b/precompiles/conviction-voting/src/lib.rs index 6cab8c4df1..fe50b0110d 100644 --- a/precompiles/conviction-voting/src/lib.rs +++ b/precompiles/conviction-voting/src/lib.rs @@ -133,7 +133,7 @@ where let origin = Runtime::AddressMapping::into_account_id(caller); let call = ConvictionVotingCall::::vote { poll_index, vote }.into(); - >::try_dispatch(handle, Some(origin).into(), call)?; + >::try_dispatch(handle, Some(origin).into(), call, 0)?; event.record(handle)?; @@ -287,7 +287,7 @@ where let origin = Runtime::AddressMapping::into_account_id(caller); let call = ConvictionVotingCall::::remove_vote { class, index }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; event.record(handle)?; @@ -331,7 +331,7 @@ where index, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; event.record(handle)?; @@ -376,7 +376,12 @@ where balance: amount, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch( + handle, + Some(origin).into(), + call, + SYSTEM_ACCOUNT_SIZE, + )?; event.record(handle)?; @@ -399,7 +404,7 @@ where let origin = Runtime::AddressMapping::into_account_id(caller); let call = ConvictionVotingCall::::undelegate { class }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; event.record(handle)?; @@ -431,7 +436,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = ConvictionVotingCall::::unlock { class, target }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; event.record(handle)?; diff --git a/precompiles/conviction-voting/src/mock.rs b/precompiles/conviction-voting/src/mock.rs index 39cf81f1ec..468152d93a 100644 --- a/precompiles/conviction-voting/src/mock.rs +++ b/precompiles/conviction-voting/src/mock.rs @@ -109,6 +109,8 @@ impl pallet_balances::Config for Runtime { } const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -118,6 +120,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio : u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } pub type Precompiles = @@ -144,6 +150,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/crowdloan-rewards/src/lib.rs b/precompiles/crowdloan-rewards/src/lib.rs index 234ef29bd5..4158a67724 100644 --- a/precompiles/crowdloan-rewards/src/lib.rs +++ b/precompiles/crowdloan-rewards/src/lib.rs @@ -135,7 +135,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = pallet_crowdloan_rewards::Call::::claim {}; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -161,7 +161,7 @@ where let call = pallet_crowdloan_rewards::Call::::update_reward_address { new_reward_account }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } diff --git a/precompiles/crowdloan-rewards/src/mock.rs b/precompiles/crowdloan-rewards/src/mock.rs index bc92afc405..76fa6006b2 100644 --- a/precompiles/crowdloan-rewards/src/mock.rs +++ b/precompiles/crowdloan-rewards/src/mock.rs @@ -133,6 +133,8 @@ pub type Precompiles = pub type PCall = CrowdloanRewardsPrecompileCall; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -142,6 +144,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -163,6 +169,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/gmp/src/lib.rs b/precompiles/gmp/src/lib.rs index c663270345..f7f62e5f09 100644 --- a/precompiles/gmp/src/lib.rs +++ b/precompiles/gmp/src/lib.rs @@ -249,12 +249,16 @@ where if let Some(call) = call { log::debug!(target: "gmp-precompile", "sending xcm {:?}", call); let origin = Runtime::AddressMapping::into_account_id(handle.code_address()); - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call).map_err( - |e| { - log::debug!(target: "gmp-precompile", "error sending XCM: {:?}", e); - e - }, - )?; + RuntimeHelper::::try_dispatch( + handle, + Some(origin).into(), + call, + SYSTEM_ACCOUNT_SIZE, + ) + .map_err(|e| { + log::debug!(target: "gmp-precompile", "error sending XCM: {:?}", e); + e + })?; } else { log::debug!(target: "gmp-precompile", "no call provided, no XCM transfer"); } diff --git a/precompiles/gmp/src/mock.rs b/precompiles/gmp/src/mock.rs index ab884bc403..8fb97bc321 100644 --- a/precompiles/gmp/src/mock.rs +++ b/precompiles/gmp/src/mock.rs @@ -243,6 +243,8 @@ mock_account!(Batch, |_| MockAccount::from_u64(1)); mock_account!(Revert, |_| MockAccount::from_u64(2)); const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -252,6 +254,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -269,6 +275,7 @@ impl pallet_evm::Config for Runtime { type ChainId = (); type OnChargeTransaction = (); type BlockGasLimit = BlockGasLimit; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; type FindAuthor = (); type OnCreate = (); diff --git a/precompiles/pallet-democracy/src/lib.rs b/precompiles/pallet-democracy/src/lib.rs index f08e51d2a9..ce8ea967e7 100644 --- a/precompiles/pallet-democracy/src/lib.rs +++ b/precompiles/pallet-democracy/src/lib.rs @@ -237,7 +237,7 @@ where value, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; log2( handle.context().address, @@ -270,7 +270,7 @@ where proposal: prop_index, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; log2( handle.context().address, @@ -318,7 +318,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = DemocracyCall::::vote { ref_index, vote }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; log2( handle.context().address, @@ -350,7 +350,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = DemocracyCall::::remove_vote { index: ref_index }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -383,7 +383,12 @@ where balance: amount, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch( + handle, + Some(origin).into(), + call, + SYSTEM_ACCOUNT_SIZE, + )?; log2( handle.context().address, @@ -403,7 +408,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = DemocracyCall::::undelegate {}; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; log2( handle.context().address, @@ -431,7 +436,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = DemocracyCall::::unlock { target }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -453,7 +458,7 @@ where let call = PreimageCall::::note_preimage { bytes: encoded_proposal.into(), }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -488,7 +493,7 @@ where let call = PreimageCall::::note_preimage { bytes: encoded_proposal.into(), }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } diff --git a/precompiles/pallet-democracy/src/mock.rs b/precompiles/pallet-democracy/src/mock.rs index 12668bfc51..4ff5e97fb8 100644 --- a/precompiles/pallet-democracy/src/mock.rs +++ b/precompiles/pallet-democracy/src/mock.rs @@ -102,6 +102,8 @@ impl pallet_balances::Config for Runtime { } const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -111,6 +113,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } pub type Precompiles = @@ -137,6 +143,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/parachain-staking/src/lib.rs b/precompiles/parachain-staking/src/lib.rs index 11480d9158..bb2f05db6c 100644 --- a/precompiles/parachain-staking/src/lib.rs +++ b/precompiles/parachain-staking/src/lib.rs @@ -499,7 +499,7 @@ where }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -519,7 +519,7 @@ where }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -542,7 +542,7 @@ where }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -561,7 +561,7 @@ where pallet_parachain_staking::Call::::cancel_leave_candidates { candidate_count }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -574,7 +574,7 @@ where let call = pallet_parachain_staking::Call::::go_offline {}; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -587,7 +587,7 @@ where let call = pallet_parachain_staking::Call::::go_online {}; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -602,7 +602,7 @@ where let call = pallet_parachain_staking::Call::::candidate_bond_more { more }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -617,7 +617,7 @@ where let call = pallet_parachain_staking::Call::::schedule_candidate_bond_less { less }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -636,7 +636,7 @@ where pallet_parachain_staking::Call::::execute_candidate_bond_less { candidate }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -649,7 +649,7 @@ where let call = pallet_parachain_staking::Call::::cancel_candidate_bond_less {}; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -678,7 +678,7 @@ where }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -722,7 +722,7 @@ where }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -742,7 +742,7 @@ where }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -763,7 +763,7 @@ where pallet_parachain_staking::Call::::delegator_bond_more { candidate, more }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -786,7 +786,7 @@ where }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -809,7 +809,7 @@ where }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -828,7 +828,7 @@ where pallet_parachain_staking::Call::::cancel_delegation_request { candidate }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -866,7 +866,7 @@ where }; // Dispatch call (if enough gas). - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } diff --git a/precompiles/parachain-staking/src/mock.rs b/precompiles/parachain-staking/src/mock.rs index a00e1cf6c2..6b5bd05760 100644 --- a/precompiles/parachain-staking/src/mock.rs +++ b/precompiles/parachain-staking/src/mock.rs @@ -109,6 +109,8 @@ impl pallet_balances::Config for Runtime { } const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -118,6 +120,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } pub type Precompiles = @@ -144,6 +150,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/precompile-registry/src/mock.rs b/precompiles/precompile-registry/src/mock.rs index cf0ec6e30c..f11d9ef830 100644 --- a/precompiles/precompile-registry/src/mock.rs +++ b/precompiles/precompile-registry/src/mock.rs @@ -138,6 +138,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = (); + type GasLimitStorageGrowthRatio = (); type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/preimage/src/lib.rs b/precompiles/preimage/src/lib.rs index 6e80eac36a..36a7035f9c 100644 --- a/precompiles/preimage/src/lib.rs +++ b/precompiles/preimage/src/lib.rs @@ -76,7 +76,7 @@ where let call = PreimageCall::::note_preimage { bytes }.into(); - >::try_dispatch(handle, Some(origin).into(), call)?; + >::try_dispatch(handle, Some(origin).into(), call, 0)?; event.record(handle)?; Ok(hash) @@ -102,7 +102,7 @@ where let call = PreimageCall::::unnote_preimage { hash }.into(); - >::try_dispatch(handle, Some(origin).into(), call)?; + >::try_dispatch(handle, Some(origin).into(), call, 0)?; event.record(handle)?; diff --git a/precompiles/preimage/src/mock.rs b/precompiles/preimage/src/mock.rs index 83541a2e5e..86d8c7390a 100644 --- a/precompiles/preimage/src/mock.rs +++ b/precompiles/preimage/src/mock.rs @@ -101,6 +101,8 @@ impl pallet_balances::Config for Runtime { } const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -110,6 +112,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } pub type Precompiles = @@ -136,6 +142,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/proxy/src/lib.rs b/precompiles/proxy/src/lib.rs index e5cbe85874..3d5468f38e 100644 --- a/precompiles/proxy/src/lib.rs +++ b/precompiles/proxy/src/lib.rs @@ -197,7 +197,7 @@ where } .into(); - >::try_dispatch(handle, Some(origin).into(), call)?; + >::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -233,7 +233,7 @@ where } .into(); - >::try_dispatch(handle, Some(origin).into(), call)?; + >::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -247,7 +247,7 @@ where let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call: ProxyCall = ProxyCall::::remove_proxies {}.into(); - >::try_dispatch(handle, Some(origin).into(), call)?; + >::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -421,6 +421,7 @@ where balance }, }, + SYSTEM_ACCOUNT_SIZE, )?; Some(Transfer { diff --git a/precompiles/proxy/src/mock.rs b/precompiles/proxy/src/mock.rs index 5cfbf18274..6524998552 100644 --- a/precompiles/proxy/src/mock.rs +++ b/precompiles/proxy/src/mock.rs @@ -144,6 +144,8 @@ impl EnsureAddressOrigin for EnsureAddressAlways { } const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -153,6 +155,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { type FeeCalculator = (); @@ -173,6 +179,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/randomness/src/lib.rs b/precompiles/randomness/src/lib.rs index 60a7a9287d..37c9647b35 100644 --- a/precompiles/randomness/src/lib.rs +++ b/precompiles/randomness/src/lib.rs @@ -359,7 +359,7 @@ where let request_randomness_weight = <::WeightInfo>::request_randomness(); - RuntimeHelper::::record_weight_v2_cost(handle, request_randomness_weight)?; + RuntimeHelper::::reocrd_external_cost(handle, request_randomness_weight, 0)?; let request_id = Pallet::::request_randomness(request) .map_err(|e| revert(alloc::format!("Error in pallet_randomness: {:?}", e)))?; RuntimeHelper::::refund_weight_v2_cost(handle, request_randomness_weight, None)?; @@ -410,7 +410,7 @@ where let request_randomness_weight = <::WeightInfo>::request_randomness(); - RuntimeHelper::::record_weight_v2_cost(handle, request_randomness_weight)?; + RuntimeHelper::::reocrd_external_cost(handle, request_randomness_weight, 0)?; let request_id = Pallet::::request_randomness(request) .map_err(|e| revert(alloc::format!("Error in pallet_randomness: {:?}", e)))?; RuntimeHelper::::refund_weight_v2_cost(handle, request_randomness_weight, None)?; @@ -431,7 +431,7 @@ where <::WeightInfo>::prepare_fulfillment( ::MaxRandomWords::get() as u32, ); - RuntimeHelper::::record_weight_v2_cost(handle, prepare_fulfillment_max_weight)?; + RuntimeHelper::::reocrd_external_cost(handle, prepare_fulfillment_max_weight, 0)?; let pallet_randomness::FulfillArgs { request, deposit, @@ -455,7 +455,7 @@ where // prepare_and_finish_fulfillment_used_gas) let finish_fulfillment_weight = <::WeightInfo>::finish_fulfillment(); - RuntimeHelper::::record_weight_v2_cost(handle, finish_fulfillment_weight)?; + RuntimeHelper::::reocrd_external_cost(handle, finish_fulfillment_weight, 0)?; prepare_and_finish_fulfillment_used_gas += RuntimeHelper::::refund_weight_v2_cost( handle, finish_fulfillment_weight, @@ -525,7 +525,7 @@ where ) -> EvmResult { let increase_fee_weight = <::WeightInfo>::increase_fee(); - RuntimeHelper::::record_weight_v2_cost(handle, increase_fee_weight)?; + RuntimeHelper::::reocrd_external_cost(handle, increase_fee_weight, 0)?; let request_id = request_id.converted(); @@ -549,7 +549,11 @@ where ) -> EvmResult { let execute_request_expiration_weight = <::WeightInfo>::execute_request_expiration(); - RuntimeHelper::::record_weight_v2_cost(handle, execute_request_expiration_weight)?; + RuntimeHelper::::reocrd_external_cost( + handle, + execute_request_expiration_weight, + 0, + )?; let request_id = request_id.converted(); diff --git a/precompiles/randomness/src/mock.rs b/precompiles/randomness/src/mock.rs index 6dc1799fbe..ec7f49dd19 100644 --- a/precompiles/randomness/src/mock.rs +++ b/precompiles/randomness/src/mock.rs @@ -146,6 +146,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = (); + type GasLimitStorageGrowthRatio = (); type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/referenda/src/lib.rs b/precompiles/referenda/src/lib.rs index 29b40427f8..788f846668 100644 --- a/precompiles/referenda/src/lib.rs +++ b/precompiles/referenda/src/lib.rs @@ -287,7 +287,7 @@ where } .into(); - >::try_dispatch(handle, Some(origin).into(), call)?; + >::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(referendum_index) } @@ -563,7 +563,7 @@ where let call = ReferendaCall::::place_decision_deposit { index }.into(); - >::try_dispatch(handle, Some(origin).into(), call)?; + >::try_dispatch(handle, Some(origin).into(), call, 0)?; // Once the deposit has been succesfully placed, it is available in the ReferendumStatus. let ongoing_referendum = Referenda::::ensure_ongoing(index).map_err(|_| { @@ -616,7 +616,7 @@ where let call = ReferendaCall::::refund_decision_deposit { index }.into(); - >::try_dispatch(handle, Some(origin).into(), call)?; + >::try_dispatch(handle, Some(origin).into(), call, 0)?; let event = log1( handle.context().address, SELECTOR_LOG_DECISION_DEPOSIT_REFUNDED, @@ -652,7 +652,7 @@ where let call = ReferendaCall::::refund_submission_deposit { index }.into(); - >::try_dispatch(handle, Some(origin).into(), call)?; + >::try_dispatch(handle, Some(origin).into(), call, 0)?; let event = log1( handle.context().address, diff --git a/precompiles/referenda/src/mock.rs b/precompiles/referenda/src/mock.rs index 27c824cb76..2486b38785 100644 --- a/precompiles/referenda/src/mock.rs +++ b/precompiles/referenda/src/mock.rs @@ -122,6 +122,8 @@ pub type TestPrecompiles = PrecompileSetBuilder< pub type PCall = ReferendaPrecompileCall; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -131,6 +133,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -152,6 +158,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/relay-encoder/src/mock.rs b/precompiles/relay-encoder/src/mock.rs index 05253646e0..5f5a156711 100644 --- a/precompiles/relay-encoder/src/mock.rs +++ b/precompiles/relay-encoder/src/mock.rs @@ -122,6 +122,8 @@ pub type Precompiles = PrecompileSetBuilder< pub type PCall = RelayEncoderPrecompileCall; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -131,6 +133,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -152,6 +158,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/utils/src/evm/handle.rs b/precompiles/utils/src/evm/handle.rs index 2ae7c77282..dc29860c5d 100644 --- a/precompiles/utils/src/evm/handle.rs +++ b/precompiles/utils/src/evm/handle.rs @@ -66,7 +66,7 @@ impl PrecompileHandleExt for T { ) -> Result<(), evm::ExitError> { self.record_cost(crate::prelude::RuntimeHelper::::db_read_gas_cost())?; // TODO: record ref time when precompile will be benchmarked - self.record_external_cost(None, Some(data_max_encoded_len as u64)) + self.record_external_cost(None, Some(data_max_encoded_len as u64), None) } /// Record cost of a log manualy. @@ -201,6 +201,7 @@ mod tests { &mut self, _ref_time: Option, _proof_size: Option, + _storage_growth: Option, ) -> Result<(), fp_evm::ExitError> { Ok(()) } diff --git a/precompiles/utils/src/lib.rs b/precompiles/utils/src/lib.rs index 7c84765450..ec6b0c600e 100644 --- a/precompiles/utils/src/lib.rs +++ b/precompiles/utils/src/lib.rs @@ -73,7 +73,7 @@ pub mod prelude { RevertReason, }, }, - substrate::{RuntimeHelper, TryDispatchError}, + substrate::{RuntimeHelper, TryDispatchError, SYSTEM_ACCOUNT_SIZE}, EvmResult, }, alloc::string::String, diff --git a/precompiles/utils/src/precompile_set.rs b/precompiles/utils/src/precompile_set.rs index 8be669151e..0a02e1cca6 100644 --- a/precompiles/utils/src/precompile_set.rs +++ b/precompiles/utils/src/precompile_set.rs @@ -476,8 +476,10 @@ impl<'a, H: PrecompileHandle> PrecompileHandle for RestrictiveHandle<'a, H> { &mut self, ref_time: Option, proof_size: Option, + storage_growth: Option, ) -> Result<(), ExitError> { - self.handle.record_external_cost(ref_time, proof_size) + self.handle + .record_external_cost(ref_time, proof_size, storage_growth) } fn refund_external_cost(&mut self, ref_time: Option, proof_size: Option) { diff --git a/precompiles/utils/src/substrate.rs b/precompiles/utils/src/substrate.rs index 9d7940c2ba..27595ffa1d 100644 --- a/precompiles/utils/src/substrate.rs +++ b/precompiles/utils/src/substrate.rs @@ -30,6 +30,10 @@ use { pallet_evm::GasWeightMapping, }; +/// System account size in bytes = Pallet_Name_Hash (16) + Storage_name_hash (16) + +/// Blake2_128Concat (16) + AccountId (20) + AccountInfo (4 + 12 + AccountData (4* 16)) = 148 +pub const SYSTEM_ACCOUNT_SIZE: u64 = 148; + #[derive(Debug)] pub enum TryDispatchError { Evm(ExitError), @@ -58,9 +62,10 @@ where Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, { #[inline(always)] - pub fn record_weight_v2_cost( + pub fn reocrd_external_cost( handle: &mut impl PrecompileHandle, weight: Weight, + storage_growth: u64, ) -> Result<(), ExitError> { // Make sure there is enough gas. let remaining_gas = handle.remaining_gas(); @@ -71,7 +76,7 @@ where // Make sure there is enough remaining weight // TODO: record ref time when precompile will be benchmarked - handle.record_external_cost(None, Some(weight.proof_size())) + handle.record_external_cost(None, Some(weight.proof_size()), Some(storage_growth)) } #[inline(always)] @@ -101,6 +106,7 @@ where handle: &mut impl PrecompileHandle, origin: ::RuntimeOrigin, call: Call, + storage_growth: u64, ) -> Result where Runtime::RuntimeCall: From, @@ -108,7 +114,7 @@ where let call = Runtime::RuntimeCall::from(call); let dispatch_info = call.get_dispatch_info(); - Self::record_weight_v2_cost(handle, dispatch_info.weight) + Self::reocrd_external_cost(handle, dispatch_info.weight, storage_growth) .map_err(|e| TryDispatchError::Evm(e))?; // Dispatch call. diff --git a/precompiles/utils/src/testing/handle.rs b/precompiles/utils/src/testing/handle.rs index 4529141033..1a2e93d903 100644 --- a/precompiles/utils/src/testing/handle.rs +++ b/precompiles/utils/src/testing/handle.rs @@ -207,6 +207,7 @@ impl PrecompileHandle for MockHandle { &mut self, _ref_time: Option, _proof_size: Option, + _storage_growth: Option, ) -> Result<(), ExitError> { Ok(()) } diff --git a/precompiles/utils/tests-external/lib.rs b/precompiles/utils/tests-external/lib.rs index 2348abd273..8ab68d484f 100644 --- a/precompiles/utils/tests-external/lib.rs +++ b/precompiles/utils/tests-external/lib.rs @@ -202,6 +202,7 @@ mod tests { &mut self, _ref_time: Option, _proof_size: Option, + _storage_growth: Option, ) -> Result<(), fp_evm::ExitError> { Ok(()) } @@ -222,6 +223,8 @@ mod tests { pub type PCall = MockPrecompileCall; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; + /// Block storage limit in bytes. Set to 40 KB. + const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -231,6 +234,10 @@ mod tests { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -252,6 +259,7 @@ mod tests { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/xcm-transactor/src/functions.rs b/precompiles/xcm-transactor/src/functions.rs index bb799cd5a8..30039689ea 100644 --- a/precompiles/xcm-transactor/src/functions.rs +++ b/precompiles/xcm-transactor/src/functions.rs @@ -181,7 +181,7 @@ where refund: false, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -225,7 +225,7 @@ where refund: false, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -275,7 +275,7 @@ where refund: false, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -328,7 +328,7 @@ where refund: false, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -364,7 +364,7 @@ where call, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -402,7 +402,7 @@ where call, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -448,7 +448,7 @@ where call, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -496,7 +496,7 @@ where call, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -589,7 +589,7 @@ where refund, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -640,7 +640,7 @@ where refund, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -676,7 +676,7 @@ where call, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -722,7 +722,7 @@ where call, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } diff --git a/precompiles/xcm-transactor/src/mock.rs b/precompiles/xcm-transactor/src/mock.rs index 6bd56194e6..5ef88e350d 100644 --- a/precompiles/xcm-transactor/src/mock.rs +++ b/precompiles/xcm-transactor/src/mock.rs @@ -169,6 +169,8 @@ pub type PCallV2 = XcmTransactorPrecompileV2Call; pub type PCallV3 = XcmTransactorPrecompileV3Call; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -178,6 +180,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } /// A mapping function that converts Ethereum gas to Substrate weight @@ -211,6 +217,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/xcm-utils/src/lib.rs b/precompiles/xcm-utils/src/lib.rs index 732966ac16..f42ac6105f 100644 --- a/precompiles/xcm-utils/src/lib.rs +++ b/precompiles/xcm-utils/src/lib.rs @@ -216,7 +216,7 @@ where max_weight: Weight::from_parts(weight, DEFAULT_PROOF_SIZE), }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } @@ -243,7 +243,7 @@ where message: Box::new(xcm), }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; Ok(()) } diff --git a/precompiles/xcm-utils/src/mock.rs b/precompiles/xcm-utils/src/mock.rs index e6e1708442..5985b822e4 100644 --- a/precompiles/xcm-utils/src/mock.rs +++ b/precompiles/xcm-utils/src/mock.rs @@ -273,6 +273,8 @@ pub type Precompiles = PrecompileSetBuilder< pub type PCall = XcmUtilsPrecompileCall; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -282,6 +284,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } /// A mapping function that converts Ethereum gas to Substrate weight @@ -315,6 +321,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/precompiles/xtokens/src/lib.rs b/precompiles/xtokens/src/lib.rs index c4d3cdd4f4..dc10776863 100644 --- a/precompiles/xtokens/src/lib.rs +++ b/precompiles/xtokens/src/lib.rs @@ -107,7 +107,12 @@ where dest_weight_limit, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch( + handle, + Some(origin).into(), + call, + SYSTEM_ACCOUNT_SIZE, + )?; Ok(()) } @@ -157,7 +162,12 @@ where dest_weight_limit, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch( + handle, + Some(origin).into(), + call, + SYSTEM_ACCOUNT_SIZE, + )?; Ok(()) } @@ -191,7 +201,12 @@ where dest_weight_limit, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch( + handle, + Some(origin).into(), + call, + SYSTEM_ACCOUNT_SIZE, + )?; Ok(()) } @@ -237,7 +252,12 @@ where dest_weight_limit, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch( + handle, + Some(origin).into(), + call, + SYSTEM_ACCOUNT_SIZE, + )?; Ok(()) } @@ -297,7 +317,12 @@ where dest_weight_limit, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch( + handle, + Some(origin).into(), + call, + SYSTEM_ACCOUNT_SIZE, + )?; Ok(()) } @@ -352,7 +377,12 @@ where dest_weight_limit, }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call)?; + RuntimeHelper::::try_dispatch( + handle, + Some(origin).into(), + call, + SYSTEM_ACCOUNT_SIZE, + )?; Ok(()) } diff --git a/precompiles/xtokens/src/mock.rs b/precompiles/xtokens/src/mock.rs index 9dc8a36e4d..06daf101df 100644 --- a/precompiles/xtokens/src/mock.rs +++ b/precompiles/xtokens/src/mock.rs @@ -138,6 +138,8 @@ pub type Precompiles = pub type PCall = XtokensPrecompileCall; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -147,6 +149,10 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = { + let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); + block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) + }; } impl pallet_evm::Config for Runtime { @@ -168,6 +174,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index 880ad4fdbf..ea201a4883 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -391,7 +391,8 @@ pub const GAS_PER_SECOND: u64 = 40_000_000; /// Approximate ratio of the amount of Weight per Gas. /// u64 works for approximations because Weight is a very small unit compared to gas. pub const WEIGHT_PER_GAS: u64 = WEIGHT_REF_TIME_PER_SECOND / GAS_PER_SECOND; - +/// The highest amount of new storage that can be created in a block (40KB). +pub const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS); @@ -417,6 +418,9 @@ parameter_types! { /// (max_extrinsic.ref_time() / max_extrinsic.proof_size()) / WEIGHT_PER_GAS /// ) pub const GasLimitPovSizeRatio: u64 = 4; + /// The amount of gas per storage (in bytes): BLOCK_GAS_LIMIT / BLOCK_STORAGE_LIMIT + /// (15_000_000 / 40kb) + pub GasLimitStorageGrowthRatio: u64 = 366; } pub struct TransactionPaymentAsGasPrice; @@ -501,6 +505,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = FindAuthorAdapter; type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = moonbeam_weights::pallet_evm::WeightInfo; } @@ -1729,4 +1734,17 @@ mod tests { .base_extrinsic; assert!(base_extrinsic.ref_time() <= min_ethereum_transaction_weight.ref_time()); } + + #[test] + fn test_storage_growth_ratio_is_correct() { + let expected_storage_growth_ratio = BlockGasLimit::get() + .low_u64() + .saturating_div(BLOCK_STORAGE_LIMIT); + let actual_storage_growth_ratio = + ::GasLimitStorageGrowthRatio::get(); + assert_eq!( + expected_storage_growth_ratio, actual_storage_growth_ratio, + "Storage growth ratio is not correct" + ); + } } diff --git a/runtime/moonbase/tests/xcm_mock/parachain.rs b/runtime/moonbase/tests/xcm_mock/parachain.rs index 234903420c..784c6c538e 100644 --- a/runtime/moonbase/tests/xcm_mock/parachain.rs +++ b/runtime/moonbase/tests/xcm_mock/parachain.rs @@ -957,6 +957,8 @@ impl pallet_timestamp::Config for Runtime { use sp_core::U256; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -965,6 +967,8 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = + BlockGasLimit::get().min(u64::MAX.into()).low_u64().saturating_div(BLOCK_STORAGE_LIMIT); } impl pallet_evm::Config for Runtime { @@ -989,6 +993,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/runtime/moonbeam/src/lib.rs b/runtime/moonbeam/src/lib.rs index 85bda70087..a6fe2a941b 100644 --- a/runtime/moonbeam/src/lib.rs +++ b/runtime/moonbeam/src/lib.rs @@ -403,6 +403,8 @@ parameter_types! { /// (max_extrinsic.ref_time() / max_extrinsic.proof_size()) / WEIGHT_PER_GAS /// ) pub const GasLimitPovSizeRatio: u64 = 4; + /// The amount of gas per storage (in bytes). + pub GasLimitStorageGrowthRatio: u64 = 0; } pub struct TransactionPaymentAsGasPrice; @@ -490,6 +492,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = FindAuthorAdapter; type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = moonbeam_weights::pallet_evm::WeightInfo; } diff --git a/runtime/moonbeam/tests/xcm_mock/parachain.rs b/runtime/moonbeam/tests/xcm_mock/parachain.rs index bce8aeea9e..e2a87451d0 100644 --- a/runtime/moonbeam/tests/xcm_mock/parachain.rs +++ b/runtime/moonbeam/tests/xcm_mock/parachain.rs @@ -937,6 +937,8 @@ impl pallet_timestamp::Config for Runtime { use sp_core::U256; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -945,6 +947,8 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = + BlockGasLimit::get().min(u64::MAX.into()).low_u64().saturating_div(BLOCK_STORAGE_LIMIT); } impl pallet_evm::Config for Runtime { @@ -969,6 +973,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/runtime/moonriver/src/lib.rs b/runtime/moonriver/src/lib.rs index d018153afc..ccf13adba9 100644 --- a/runtime/moonriver/src/lib.rs +++ b/runtime/moonriver/src/lib.rs @@ -404,6 +404,8 @@ parameter_types! { /// (max_extrinsic.ref_time() / max_extrinsic.proof_size()) / WEIGHT_PER_GAS /// ) pub const GasLimitPovSizeRatio: u64 = 4; + /// The amount of gas per storage (in bytes). + pub GasLimitStorageGrowthRatio: u64 = 0; } pub struct TransactionPaymentAsGasPrice; @@ -491,6 +493,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = FindAuthorAdapter; type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = moonbeam_weights::pallet_evm::WeightInfo; } diff --git a/runtime/moonriver/tests/xcm_mock/parachain.rs b/runtime/moonriver/tests/xcm_mock/parachain.rs index 4e49ccab54..c3ac50063a 100644 --- a/runtime/moonriver/tests/xcm_mock/parachain.rs +++ b/runtime/moonriver/tests/xcm_mock/parachain.rs @@ -947,6 +947,8 @@ impl pallet_timestamp::Config for Runtime { use sp_core::U256; const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; +/// Block storage limit in bytes. Set to 40 KB. +const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; parameter_types! { pub BlockGasLimit: U256 = U256::from(u64::MAX); @@ -955,6 +957,8 @@ parameter_types! { let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); block_gas_limit.saturating_div(MAX_POV_SIZE) }; + pub GasLimitStorageGrowthRatio: u64 = + BlockGasLimit::get().min(u64::MAX.into()).low_u64().saturating_div(BLOCK_STORAGE_LIMIT); } impl pallet_evm::Config for Runtime { @@ -979,6 +983,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = (); type OnCreate = (); type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/scripts/verify-licenses.sh b/scripts/verify-licenses.sh index 58818ed8db..180baf2529 100755 --- a/scripts/verify-licenses.sh +++ b/scripts/verify-licenses.sh @@ -38,6 +38,7 @@ AUTHORS=( ) NAMES=( "webpki" + "rustls-webpki" "ring" "nimbus-consensus" ) diff --git a/test/contracts/src/StorageLoop.sol b/test/contracts/src/StorageLoop.sol new file mode 100644 index 0000000000..fcab685996 --- /dev/null +++ b/test/contracts/src/StorageLoop.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity >=0.8.2 <0.9.0; + +contract StorageLoop { + mapping(uint256 => uint256) public map; + mapping(uint256 => uint256) public map2; + + function store(uint16 n) public { + for (uint16 i = 0; i < n; i++) { + map[i] = i + 1; + } + } + + function store2(uint256 i) public { + map2[i] = i; + } +} diff --git a/test/suites/dev/test-contract/test-contract-fibonacci.ts b/test/suites/dev/test-contract/test-contract-fibonacci.ts index c38d63b5eb..a0b4b88357 100644 --- a/test/suites/dev/test-contract/test-contract-fibonacci.ts +++ b/test/suites/dev/test-contract/test-contract-fibonacci.ts @@ -24,6 +24,7 @@ describeSuite({ data, txnType, libraryType: "ethers", + gasLimit: 260_000n, }) ); diff --git a/test/suites/dev/test-eth-fee/test-eth-fee-history.ts b/test/suites/dev/test-eth-fee/test-eth-fee-history.ts index 877055d1f8..af4a565ff0 100644 --- a/test/suites/dev/test-eth-fee/test-eth-fee-history.ts +++ b/test/suites/dev/test-eth-fee/test-eth-fee-history.ts @@ -95,7 +95,7 @@ describeSuite({ feeResults.baseFeePerGas.length, "baseFeePerGas should always the requested block range + 1 (the next derived base fee)" ).toBe(block_count + 1); - expect(feeResults.gasUsedRatio).to.be.deep.eq(Array(block_count).fill(0.0311638)); + expect(feeResults.gasUsedRatio).to.be.deep.eq(Array(block_count).fill(0.042456)); expect( feeResults.reward.length, "should return two-dimensional reward list for the requested block range" diff --git a/test/suites/dev/test-fees/test-fee-multiplier-max.ts b/test/suites/dev/test-fees/test-fee-multiplier-max.ts index 7d0f03dba0..07eb6239a3 100644 --- a/test/suites/dev/test-fees/test-fee-multiplier-max.ts +++ b/test/suites/dev/test-fees/test-fee-multiplier-max.ts @@ -139,7 +139,7 @@ describeSuite({ blockNumber = (await context.polkadotJs().rpc.chain.getHeader()).number.toBigInt(); baseFeePerGas = (await context.viem().getBlock({ blockNumber: blockNumber })) .baseFeePerGas!; - expect(baseFeePerGas).to.equal(124880905088510n); + expect(baseFeePerGas).to.equal(124883240781855n); const rawSigned = await createEthersTransaction(context, { to: contractAddress, @@ -171,7 +171,7 @@ describeSuite({ expect(withdrawEvents?.length).to.equal(1); const withdrawEvent = withdrawEvents![0]; const amount = withdrawEvent.event.data.amount.toBigInt(); - expect(amount).to.equal(12017789020287671340n); + expect(amount).to.equal(12018013793401034070n); }, }); }, diff --git a/test/suites/dev/test-gas/test-gas-contract-creation.ts b/test/suites/dev/test-gas/test-gas-contract-creation.ts index 52d491e57b..b1dc139405 100644 --- a/test/suites/dev/test-gas/test-gas-contract-creation.ts +++ b/test/suites/dev/test-gas/test-gas-contract-creation.ts @@ -17,7 +17,7 @@ describeSuite({ account: ALITH_ADDRESS, data: bytecode, }) - ).to.equal(157029n); + ).to.equal(212848n); }, }); }, diff --git a/test/suites/dev/test-gas/test-gas-estimation-contracts.ts b/test/suites/dev/test-gas/test-gas-estimation-contracts.ts index 611cfb8217..5c1c5d2ed2 100644 --- a/test/suites/dev/test-gas/test-gas-estimation-contracts.ts +++ b/test/suites/dev/test-gas/test-gas-estimation-contracts.ts @@ -41,13 +41,13 @@ describeSuite({ data: bytecode, gasPrice: 0n, }); - expect(result).to.equal(174798n); + expect(result).to.equal(259115n); const result2 = await context.viem().estimateGas({ account: ALITH_ADDRESS, data: bytecode, }); - expect(result2).to.equal(174798n); + expect(result2).to.equal(259115n); }, }); @@ -142,7 +142,7 @@ describeSuite({ account: PRECOMPILE_BATCH_ADDRESS, data: bytecode, }) - ).toBe(157029n); + ).toBe(212848n); }, }); diff --git a/test/suites/dev/test-precompile/test-precompile-proxy.ts b/test/suites/dev/test-precompile/test-precompile-proxy.ts index 7898d7340e..734777d0f0 100644 --- a/test/suites/dev/test-precompile/test-precompile-proxy.ts +++ b/test/suites/dev/test-precompile/test-precompile-proxy.ts @@ -502,7 +502,10 @@ describeSuite({ // The account cannot be random otherwise the calldata might contain more // zero bytes and have a different gas cost const randomAccount = "0x1ced798a66b803d0dbb665680283980a939a6432"; - + // The tx can create an account, so record 148 bytes of storage growth + // Storage growth ratio is 366 + // expected_gas = 148 * 366 = 54168 + const expectedGas = 54168n; const rawTxn = await context.writePrecompile!({ precompileName: "Proxy", functionName: "addProxy", @@ -538,7 +541,7 @@ describeSuite({ const { gasUsed } = await context .viem() .getTransactionReceipt({ hash: result2!.hash as `0x${string}` }); - expect(gasUsed).to.equal(33344n); + expect(gasUsed).to.equal(expectedGas); expect(await context.viem().getBalance({ address: randomAccount })).toBe(parseEther("5")); diff --git a/test/suites/dev/test-storage-growth/test-block-storage-growth.ts b/test/suites/dev/test-storage-growth/test-block-storage-growth.ts new file mode 100644 index 0000000000..625a66bd32 --- /dev/null +++ b/test/suites/dev/test-storage-growth/test-block-storage-growth.ts @@ -0,0 +1,35 @@ +import "@moonbeam-network/api-augment"; +import { describeSuite, expect, fetchCompiledContract } from "@moonwall/cli"; +import { createEthersTransaction, sendRawTransaction } from "@moonwall/util"; +import { Abi, encodeDeployData } from "viem"; + +describeSuite({ + id: "D4003", + title: "Storage Block (40Kb) - Storage Growth Limit", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + it({ + id: "T01", + title: "should fill a block with 60 tx at most", + test: async function () { + const { abi, bytecode } = fetchCompiledContract("Fibonacci"); + const deployData = encodeDeployData({ + abi, + bytecode, + }); + + for (let i = 0; i < 120; i++) { + const rawTxn = await createEthersTransaction(context, { + data: deployData, + nonce: i, + gasLimit: 400000n, + }); + await sendRawTransaction(context, rawTxn); + } + + await context.createBlock(); + expect((await context.viem().getBlock()).transactions.length).toBe(60); + }, + }); + }, +}); diff --git a/test/suites/dev/test-storage-growth/test-evm-create-storage-growth.ts b/test/suites/dev/test-storage-growth/test-evm-create-storage-growth.ts new file mode 100644 index 0000000000..c5667cd7c7 --- /dev/null +++ b/test/suites/dev/test-storage-growth/test-evm-create-storage-growth.ts @@ -0,0 +1,70 @@ +import "@moonbeam-network/api-augment"; +import { + TransactionTypes, + deployCreateCompiledContract, + describeSuite, + expect, + fetchCompiledContract, +} from "@moonwall/cli"; +import { ALITH_ADDRESS, createEthersTransaction } from "@moonwall/util"; +import { expectEVMResult } from "helpers/eth-transactions"; + +describeSuite({ + id: "D4001", + title: "Storage growth limit - Contract Creation", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + // This is the gas cost of the transaction that deploys the Fibonacci contract: + // (Account Code Size (112) + Length of the bytecode (559)) * Storage Growth Gas Ratio (366) + const EXPECTED_STORAGE_GROWTH_GAS = 245_586; + for (const txnType of TransactionTypes) { + it({ + id: `T0${TransactionTypes.indexOf(txnType) + 1}`, + title: "should out of gas when gas provided is not enough to cover storage growth", + test: async function () { + const { bytecode } = fetchCompiledContract("Fibonacci"); + // Deploy contract with insufficient gas limit + const rawSigned = await createEthersTransaction(context, { + account: ALITH_ADDRESS, + data: bytecode, + gasLimit: 245_585, + }); + + const { result } = await context.createBlock(rawSigned); + // Check that the transaction failed with an out of gas error + expectEVMResult(result!.events, "Error", "OutOfGas"); + }, + }); + + it({ + id: `T0${TransactionTypes.indexOf(txnType) + 4}`, + title: "should estimate enough gas to cover storage growth", + test: async function () { + const estimatedGas = await context.viem().estimateGas({ + account: ALITH_ADDRESS, + data: fetchCompiledContract("Fibonacci").bytecode, + }); + + expect(estimatedGas).toBeGreaterThanOrEqual(EXPECTED_STORAGE_GROWTH_GAS); + expect(estimatedGas).toBe(267041n); + }, + }); + + it({ + id: `T0${TransactionTypes.indexOf(txnType) + 7}`, + title: "should deploy contract with enough gas to cover storage growth", + test: async function () { + const contractData = fetchCompiledContract("Fibonacci"); + const callCode = ( + await context.viem().call({ data: contractData.bytecode, gas: 245_586n }) + ).data; + const { contractAddress } = await context.deployContract!("Fibonacci"); + const deployedCode = await context + .viem("public") + .getBytecode({ address: contractAddress! }); + expect(callCode).to.be.eq(deployedCode); + }, + }); + } + }, +}); diff --git a/test/suites/dev/test-storage-growth/test-evm-store-storage-growth.ts b/test/suites/dev/test-storage-growth/test-evm-store-storage-growth.ts new file mode 100644 index 0000000000..aa299d09b0 --- /dev/null +++ b/test/suites/dev/test-storage-growth/test-evm-store-storage-growth.ts @@ -0,0 +1,78 @@ +import "@moonbeam-network/api-augment"; +import { + TransactionTypes, + beforeAll, + deployCreateCompiledContract, + describeSuite, + expect, +} from "@moonwall/cli"; +import { createEthersTransaction, sendRawTransaction } from "@moonwall/util"; +import { expectEVMResult } from "helpers/eth-transactions"; +import { expectOk } from "helpers/expect"; +import { Abi, encodeFunctionData } from "viem"; + +describeSuite({ + id: "D4002", + title: "Storage growth limit - New Entries", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let storageLoopAddress: `0x${string}`; + let storageLoopAbi: Abi; + // Number of bytes added to storage for a new entry. + const ACCOUNT_STORAGE_SIZE = 116; + // Ratio of gas to storage growth. (BlockGasLimit (15_000_000) / BlockStorageLimit (40kb)) + const GAS_LIMIT_STORAGE_GROWTH_RATIO = 366; + beforeAll(async () => { + const { contractAddress, abi } = await deployCreateCompiledContract(context, "StorageLoop"); + storageLoopAddress = contractAddress; + storageLoopAbi = abi; + + await context.createBlock(); + }); + + for (const txnType of TransactionTypes) { + it({ + id: `T0${TransactionTypes.indexOf(txnType) + 1}`, + title: "should out of gas when gas provided is not enough to cover storage growth", + test: async function () { + // Tx is creating 5 new storage entries. So, required gas is: + // (5 * ACCOUNT_STORAGE_SIZE) * GAS_LIMIT_STORAGE_GROWTH_RATIO = 212_280 + // Execute tx with insufficient gas limit + const rawSigned = await createEthersTransaction(context, { + to: storageLoopAddress, + data: encodeFunctionData({ + abi: storageLoopAbi, + functionName: "store", + // for each transaction type, we add 5 new storage entries + args: [5 + 5 * TransactionTypes.indexOf(txnType)], + }), + gasLimit: 212_270, + }); + + const { result } = await context.createBlock(rawSigned); + // Check that the transaction failed with an out of gas error + expectEVMResult(result!.events, "Error", "OutOfGas"); + }, + }); + + it({ + id: `T0${TransactionTypes.indexOf(txnType) + 4}`, + title: "should successfully execute when updating existing storage entries (no growth)", + test: async function () { + // Update 5 existing storage entries. So, required gas should be less than 212_280 + const rawSigned = await createEthersTransaction(context, { + to: storageLoopAddress, + data: encodeFunctionData({ + abi: storageLoopAbi, + functionName: "store", + args: [5], + }), + gasLimit: 50_000, + }); + + await expectOk(context.createBlock(rawSigned)); + }, + }); + } + }, +}); diff --git a/test/suites/dev/test-storage-growth/test-precompile-storage-growth.ts b/test/suites/dev/test-storage-growth/test-precompile-storage-growth.ts new file mode 100644 index 0000000000..219247d94e --- /dev/null +++ b/test/suites/dev/test-storage-growth/test-precompile-storage-growth.ts @@ -0,0 +1,108 @@ +import { describeSuite, expect, fetchCompiledContract } from "@moonwall/cli"; +import { + BALTATHAR_ADDRESS, + BALTATHAR_PRIVATE_KEY, + CONTRACT_PROXY_TYPE_ANY, + FAITH_ADDRESS, + FAITH_PRIVATE_KEY, + PRECOMPILE_NATIVE_ERC20_ADDRESS, +} from "@moonwall/util"; +import { parseEther } from "ethers"; +import { expectEVMResult } from "helpers/eth-transactions"; +import { before } from "node:test"; +import { encodeFunctionData } from "viem"; + +describeSuite({ + id: "D4004", + title: "Storage growth limit - Precompiles", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + const newAccount = "0x1ced798a66b803d0dbb665680283980a939a6432"; + // The tx can create an account, so record 148 bytes of storage growth + // Storage growth ratio is 366 + // expected_gas = 148 * 366 = 54168 + const expectedGas = 54168n; + + it({ + id: "T01", + title: "should fail transfer due to insufficient gas required to cover the storage growth", + test: async () => { + const { abi: ierc20Abi } = fetchCompiledContract("IERC20"); + + const rawTxn = await context.writePrecompile!({ + precompileName: "Proxy", + functionName: "addProxy", + args: [BALTATHAR_ADDRESS, CONTRACT_PROXY_TYPE_ANY, 0], + privateKey: FAITH_PRIVATE_KEY, + rawTxOnly: true, + gas: 1_000_000n, + }); + const { result } = await context.createBlock(rawTxn); + expectEVMResult(result!.events, "Succeed"); + + const balBefore = await context.viem().getBalance({ address: FAITH_ADDRESS }); + const rawTxn2 = await context.writePrecompile!({ + precompileName: "Proxy", + functionName: "proxy", + args: [ + FAITH_ADDRESS, + PRECOMPILE_NATIVE_ERC20_ADDRESS, + encodeFunctionData({ + abi: ierc20Abi, + functionName: "transfer", + args: [newAccount, parseEther("5")], + }), + ], + privateKey: BALTATHAR_PRIVATE_KEY, + rawTxOnly: true, + gas: 40_000n, + }); + + const { result: result2 } = await context.createBlock(rawTxn2); + // Check that the transaction failed with an out of gas error + expectEVMResult(result2!.events, "Error", "OutOfGas"); + + const balAfter = await context.viem().getBalance({ address: FAITH_ADDRESS }); + expect(balBefore - balAfter).to.equal(0n); + }, + }); + + it({ + id: "T02", + title: "should transfer correctly with the required gas to cover the storage growth", + test: async () => { + const balBefore = await context.viem().getBalance({ address: FAITH_ADDRESS }); + const { abi: ierc20Abi } = fetchCompiledContract("IERC20"); + + const rawTxn2 = await context.writePrecompile!({ + precompileName: "Proxy", + functionName: "proxy", + args: [ + FAITH_ADDRESS, + PRECOMPILE_NATIVE_ERC20_ADDRESS, + encodeFunctionData({ + abi: ierc20Abi, + functionName: "transfer", + args: [newAccount, parseEther("5")], + }), + ], + privateKey: BALTATHAR_PRIVATE_KEY, + rawTxOnly: true, + gas: expectedGas, + }); + + const { result } = await context.createBlock(rawTxn2); + // Check that the transaction failed with an out of gas error + expectEVMResult(result!.events, "Succeed"); + + const { gasUsed } = await context + .viem() + .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); + expect(gasUsed).to.equal(expectedGas); + + const balAfter = await context.viem().getBalance({ address: FAITH_ADDRESS }); + expect(balBefore - balAfter).to.equal(parseEther("5")); + }, + }); + }, +}); diff --git a/test/suites/dev/test-txpool/test-txpool-limits2.ts b/test/suites/dev/test-txpool/test-txpool-limits2.ts index 18cae5b5f0..cea13879ca 100644 --- a/test/suites/dev/test-txpool/test-txpool-limits2.ts +++ b/test/suites/dev/test-txpool/test-txpool-limits2.ts @@ -22,13 +22,13 @@ describeSuite({ const rawTxn = await createEthersTransaction(context, { data: deployData, nonce: i, - gas: 400000n, + gasLimit: 400000n, }); await sendRawTransaction(context, rawTxn); } await context.createBlock(); - expect((await context.viem().getBlock()).transactions.length).toBe(95); + expect((await context.viem().getBlock()).transactions.length).toBe(69); }, }); },