diff --git a/Cargo.lock b/Cargo.lock index 7ff3209ace..9f9d01ae8f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -80,16 +80,16 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.9.4" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +checksum = "bc3be92e19a7ef47457b8e6f90707e12b6ac5d20c6f3866584fa3be0787d839f" dependencies = [ "aead 0.4.3", "aes 0.7.5", "cipher 0.3.0", - "ctr 0.8.0", + "ctr 0.7.0", "ghash 0.4.4", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -103,7 +103,7 @@ dependencies = [ "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -134,6 +134,12 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "always-assert" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -388,6 +394,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.7.4" @@ -489,25 +504,80 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-executor" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" +dependencies = [ + "async-lock 2.8.0", + "async-task", + "concurrent-queue", + "fastrand 2.0.1", + "futures-lite 1.13.0", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.9", + "waker-fn", +] + [[package]] name = "async-io" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb41eb19024a91746eba0773aa5e16036045bbf45733766661099e182ea6a744" dependencies = [ - "async-lock", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite", + "futures-lite 2.2.0", "parking", - "polling", + "polling 3.3.2", "rustix 0.38.31", "slab", "tracing", "windows-sys 0.52.0", ] +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + [[package]] name = "async-lock" version = "3.3.0" @@ -519,6 +589,58 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-net" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" +dependencies = [ + "async-io 1.13.0", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.31", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-signal" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb3634b73397aa844481f814fad23bbf07fdb0eabec10f2eb95e58944b1ec32" +dependencies = [ + "async-io 2.3.0", + "async-lock 3.3.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.31", + "signal-hook-registry", + "slab", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "async-trait" version = "0.1.80" @@ -552,6 +674,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "atomic-take" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" + [[package]] name = "atomic-waker" version = "1.1.2" @@ -656,6 +784,15 @@ dependencies = [ "serde", ] +[[package]] +name = "binary-merkle-tree" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "hash-db", + "log", +] + [[package]] name = "bincode" version = "1.3.3" @@ -686,12 +823,27 @@ dependencies = [ "syn 2.0.65", ] +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes 0.11.0", +] + [[package]] name = "bitcoin-internals" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + [[package]] name = "bitcoin_hashes" version = "0.13.0" @@ -722,6 +874,7 @@ checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", + "serde", "tap", "wyz", ] @@ -747,6 +900,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", +] + [[package]] name = "blake2b_simd" version = "1.0.1" @@ -754,7 +917,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.4", "constant_time_eq 0.2.6", ] @@ -765,7 +928,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.4", "constant_time_eq 0.2.6", ] @@ -776,7 +939,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.4", "cc", "cfg-if", "constant_time_eq 0.3.0", @@ -800,6 +963,21 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "blocking" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +dependencies = [ + "async-channel", + "async-lock 2.8.0", + "async-task", + "atomic-waker", + "fastrand 1.9.0", + "futures-lite 1.13.0", + "log", +] + [[package]] name = "bounded-collections" version = "0.2.0" @@ -812,6 +990,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bounded-vec" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68534a48cbf63a4b1323c433cf21238c9ec23711e0df13b08c33e5c2082663ce" +dependencies = [ + "thiserror", +] + [[package]] name = "bs58" version = "0.4.0" @@ -952,6 +1139,12 @@ dependencies = [ "libc", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cexpr" version = "0.6.0" @@ -1004,6 +1197,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher 0.4.4", + "cpufeatures", +] + [[package]] name = "chacha20poly1305" version = "0.9.1" @@ -1011,9 +1215,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" dependencies = [ "aead 0.4.3", - "chacha20", + "chacha20 0.8.2", "cipher 0.3.0", - "poly1305", + "poly1305 0.7.2", "zeroize", ] @@ -1137,6 +1341,17 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +[[package]] +name = "coarsetime" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" +dependencies = [ + "libc", + "wasix", + "wasm-bindgen", +] + [[package]] name = "codespan-reporting" version = "0.11.1" @@ -1243,6 +1458,12 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "constant_time_eq" version = "0.2.6" @@ -1279,9 +1500,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core2" @@ -1301,6 +1522,16 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "cpu-time" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "cpufeatures" version = "0.2.9" @@ -1499,7 +1730,7 @@ checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array 0.14.7", "rand_core", - "subtle 2.4.1", + "subtle 2.6.1", "zeroize", ] @@ -1531,14 +1762,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] name = "ctr" -version = "0.8.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "a232f92a03f37dd7d7dd2adc67166c77e9cd88de5b019b9a9eecfaeaf7bfd481" dependencies = [ "cipher 0.3.0", ] @@ -1553,69 +1784,400 @@ dependencies = [ ] [[package]] -name = "curve25519-dalek" -version = "4.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +name = "cumulus-client-cli" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", - "rustc_version", - "subtle 2.4.1", - "zeroize", + "clap", + "parity-scale-codec", + "sc-chain-spec", + "sc-cli", + "sc-client-api", + "sc-service", + "sp-blockchain", + "sp-core", + "sp-runtime", + "url", ] [[package]] -name = "curve25519-dalek-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +name = "cumulus-client-collator" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.65", + "cumulus-client-consensus-common", + "cumulus-client-network", + "cumulus-primitives-core", + "futures", + "parity-scale-codec", + "parking_lot 0.12.3", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "sc-client-api", + "sp-api", + "sp-consensus", + "sp-core", + "sp-runtime", + "tracing", ] [[package]] -name = "cxx" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ba0a82363c553ecb7b4cd58ba6e1c017baef8e3cca4e7d66ca17879201144" +name = "cumulus-client-consensus-common" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", + "async-trait", + "cumulus-client-pov-recovery", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "dyn-clone", + "futures", + "log", + "parity-scale-codec", + "polkadot-primitives", + "sc-client-api", + "sc-consensus", + "sc-consensus-babe", + "schnellru", + "sp-blockchain", + "sp-consensus", + "sp-consensus-slots", + "sp-core", + "sp-runtime", + "sp-timestamp", + "sp-trie", + "sp-version", + "substrate-prometheus-endpoint", + "tracing", ] [[package]] -name = "cxx-build" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9ec8372f860c6ee7c6463b96a26d08dd590bcbcd9bf2d1894db09ae81410d3" +name = "cumulus-client-network" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.65", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "409667bbb937bae87f7cfa91ca29e1415bb92d415371e3344b5269c10d90d595" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" + "async-trait", + "cumulus-relay-chain-interface", + "futures", + "futures-timer", + "parity-scale-codec", + "parking_lot 0.12.3", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-parachain-primitives", + "polkadot-primitives", + "sc-client-api", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-version", + "tracing", +] + +[[package]] +name = "cumulus-client-pov-recovery" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "futures", + "futures-timer", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "rand", + "sc-client-api", + "sc-consensus", + "sp-api", + "sp-consensus", + "sp-maybe-compressed-blob", + "sp-runtime", + "sp-version", + "tracing", +] + +[[package]] +name = "cumulus-client-service" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "cumulus-client-cli", + "cumulus-client-collator", + "cumulus-client-consensus-common", + "cumulus-client-network", + "cumulus-client-pov-recovery", + "cumulus-primitives-core", + "cumulus-primitives-proof-size-hostfunction", + "cumulus-relay-chain-inprocess-interface", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-minimal-node", + "futures", + "polkadot-primitives", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-sync", + "sc-network-transactions", + "sc-rpc", + "sc-service", + "sc-sysinfo", + "sc-telemetry", + "sc-transaction-pool", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-io", + "sp-runtime", + "sp-transaction-pool", +] + +[[package]] +name = "cumulus-primitives-core" +version = "0.15.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "scale-info", + "sp-api", + "sp-runtime", + "sp-trie", + "staging-xcm", +] + +[[package]] +name = "cumulus-primitives-proof-size-hostfunction" +version = "0.10.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "sp-externalities", + "sp-runtime-interface", + "sp-trie", +] + +[[package]] +name = "cumulus-primitives-storage-weight-reclaim" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "cumulus-primitives-core", + "cumulus-primitives-proof-size-hostfunction", + "docify", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", +] + +[[package]] +name = "cumulus-relay-chain-inprocess-interface" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "futures", + "futures-timer", + "polkadot-cli", + "polkadot-service", + "sc-cli", + "sc-client-api", + "sc-sysinfo", + "sc-telemetry", + "sc-tracing", + "sp-api", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", +] + +[[package]] +name = "cumulus-relay-chain-interface" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "futures", + "jsonrpsee-core", + "parity-scale-codec", + "polkadot-overseer", + "sc-client-api", + "sp-api", + "sp-blockchain", + "sp-state-machine", + "sp-version", + "thiserror", +] + +[[package]] +name = "cumulus-relay-chain-minimal-node" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "array-bytes", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-rpc-interface", + "futures", + "polkadot-core-primitives", + "polkadot-network-bridge", + "polkadot-node-network-protocol", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "polkadot-service", + "sc-authority-discovery", + "sc-client-api", + "sc-network", + "sc-network-common", + "sc-service", + "sc-tracing", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-runtime", + "substrate-prometheus-endpoint", + "tokio", + "tracing", +] + +[[package]] +name = "cumulus-relay-chain-rpc-interface" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "either", + "futures", + "futures-timer", + "jsonrpsee", + "parity-scale-codec", + "pin-project", + "polkadot-overseer", + "rand", + "sc-client-api", + "sc-rpc-api", + "sc-service", + "schnellru", + "serde", + "serde_json", + "smoldot", + "smoldot-light", + "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-version", + "thiserror", + "tokio", + "tokio-util", + "tracing", + "url", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version", + "subtle 2.6.1", + "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.65", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core", + "subtle-ng", + "zeroize", +] + +[[package]] +name = "cxx" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1ba0a82363c553ecb7b4cd58ba6e1c017baef8e3cca4e7d66ca17879201144" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac9ec8372f860c6ee7c6463b96a26d08dd590bcbcd9bf2d1894db09ae81410d3" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn 2.0.65", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "409667bbb937bae87f7cfa91ca29e1415bb92d415371e3344b5269c10d90d595" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fb2a9757fb085d6d97856b28d4f049141ca4a61a64c697f4426433b5f6caa1f" dependencies = [ "proc-macro2", @@ -1780,7 +2342,7 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -1876,7 +2438,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] -name = "dtoa" +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dtoa" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" @@ -1944,7 +2512,7 @@ dependencies = [ "rand_core", "serde", "sha2 0.10.8", - "subtle 2.4.1", + "subtle 2.6.1", "zeroize", ] @@ -1988,7 +2556,7 @@ dependencies = [ "rand_core", "sec1", "serdect", - "subtle 2.4.1", + "subtle 2.6.1", "zeroize", ] @@ -2022,6 +2590,37 @@ dependencies = [ "syn 2.0.65", ] +[[package]] +name = "enumflags2" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" +dependencies = [ + "enumflags2_derive", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "enumn" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "env_logger" version = "0.10.0" @@ -2112,6 +2711,17 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + [[package]] name = "event-listener" version = "4.0.3" @@ -2135,9 +2745,8 @@ dependencies = [ [[package]] name = "evm" -version = "0.41.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767f43e9630cc36cf8ff2777cbb0121b055f0d1fd6eaaa13b46a1808f0d0e7e9" +version = "0.41.2" +source = "git+https://github.com/rust-ethereum/evm?branch=v0.x#879ffe209fbdaa0e3fdfa68a7cd48c0743841e0a" dependencies = [ "auto_impl", "environmental", @@ -2157,8 +2766,7 @@ dependencies = [ [[package]] name = "evm-core" version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1da6cedc5cedb4208e59467106db0d1f50db01b920920589f8e672c02fdc04f" +source = "git+https://github.com/rust-ethereum/evm?branch=v0.x#879ffe209fbdaa0e3fdfa68a7cd48c0743841e0a" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2169,8 +2777,7 @@ dependencies = [ [[package]] name = "evm-gasometer" version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dc0eb591abc5cd7b05bef6a036c2bb6c66ab6c5e0c5ce94bfe377ab670b1fd7" +source = "git+https://github.com/rust-ethereum/evm?branch=v0.x#879ffe209fbdaa0e3fdfa68a7cd48c0743841e0a" dependencies = [ "environmental", "evm-core", @@ -2181,8 +2788,7 @@ dependencies = [ [[package]] name = "evm-runtime" version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84bbe09b64ae13a29514048c1bb6fda6374ac0b4f6a1f15a443348ab88ef42cd" +source = "git+https://github.com/rust-ethereum/evm?branch=v0.x#879ffe209fbdaa0e3fdfa68a7cd48c0743841e0a" dependencies = [ "auto_impl", "environmental", @@ -2202,12 +2808,14 @@ dependencies = [ [[package]] name = "expander" -version = "2.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" +checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2" dependencies = [ "blake2 0.10.6", + "file-guard", "fs-err", + "prettyplease 0.2.20", "proc-macro2", "quote", "syn 2.0.65", @@ -2225,12 +2833,45 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + [[package]] name = "fastrand" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fatality" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec6f82451ff7f0568c6181287189126d492b5654e30a788add08027b6363d019" +dependencies = [ + "fatality-proc-macro", + "thiserror", +] + +[[package]] +name = "fatality-proc-macro" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb42427514b063d97ce21d5199f36c0c307d981434a6be32582bc79fe5bd2303" +dependencies = [ + "expander", + "indexmap 2.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "fc-api" version = "1.0.0-dev" @@ -2479,7 +3120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -2488,6 +3129,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" +[[package]] +name = "file-guard" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "file-per-thread-logger" version = "0.1.6" @@ -2664,6 +3315,7 @@ dependencies = [ name = "fp-evm" version = "3.0.0-dev" dependencies = [ + "cumulus-primitives-storage-weight-reclaim", "evm", "frame-support", "num_enum", @@ -2788,6 +3440,33 @@ dependencies = [ "thousands", ] +[[package]] +name = "frame-election-provider-solution-type" +version = "14.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "frame-election-provider-support" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-election-provider-solution-type", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-npos-elections", + "sp-runtime", +] + [[package]] name = "frame-executive" version = "37.0.0" @@ -2976,6 +3655,8 @@ version = "0.0.0" dependencies = [ "async-trait", "clap", + "cumulus-client-service", + "cumulus-primitives-storage-weight-reclaim", "fc-api", "fc-cli", "fc-consensus", @@ -3001,6 +3682,7 @@ dependencies = [ "pallet-transaction-payment-rpc", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", + "polkadot-service", "sc-basic-authorship", "sc-chain-spec", "sc-cli", @@ -3042,6 +3724,7 @@ dependencies = [ name = "frontier-template-runtime" version = "0.0.0" dependencies = [ + "cumulus-primitives-storage-weight-reclaim", "fp-account", "fp-evm", "fp-rpc", @@ -3100,6 +3783,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs4" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" +dependencies = [ + "rustix 0.38.31", + "windows-sys 0.48.0", +] + [[package]] name = "funty" version = "2.0.0" @@ -3176,6 +3869,21 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + [[package]] name = "futures-lite" version = "2.2.0" @@ -3378,7 +4086,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -3471,6 +4179,7 @@ checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "allocator-api2", + "serde", ] [[package]] @@ -3665,7 +4374,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.9", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -3703,9 +4412,9 @@ dependencies = [ "hyper 0.14.30", "log", "rustls 0.21.7", - "rustls-native-certs", + "rustls-native-certs 0.6.3", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] @@ -3795,7 +4504,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io", + "async-io 2.3.0", "core-foundation", "fnv", "futures", @@ -3905,6 +4614,12 @@ dependencies = [ "hashbrown 0.14.3", ] +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + [[package]] name = "inout" version = "0.1.3" @@ -3923,6 +4638,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "integer-encoding" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" + [[package]] name = "integer-sqrt" version = "0.1.5" @@ -3978,6 +4699,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "is_executable" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" +dependencies = [ + "winapi", +] + [[package]] name = "itertools" version = "0.10.5" @@ -4002,6 +4732,26 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +[[package]] +name = "jni" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +dependencies = [ + "cesu8", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + [[package]] name = "jobserver" version = "0.1.26" @@ -4030,8 +4780,32 @@ dependencies = [ "jsonrpsee-proc-macros", "jsonrpsee-server", "jsonrpsee-types", + "jsonrpsee-ws-client", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08163edd8bcc466c33d79e10f695cdc98c00d1e6ddfb95cec41b6b0279dd5432" +dependencies = [ + "base64 0.22.1", + "futures-util", + "http 1.1.0", + "jsonrpsee-core", + "pin-project", + "rustls 0.23.12", + "rustls-pki-types", + "rustls-platform-verifier", + "soketto 0.8.0", + "thiserror", "tokio", + "tokio-rustls 0.26.0", + "tokio-util", "tracing", + "url", ] [[package]] @@ -4044,18 +4818,21 @@ dependencies = [ "async-trait", "beef", "bytes", + "futures-timer", "futures-util", "http 1.1.0", "http-body 1.0.1", "http-body-util", "jsonrpsee-types", "parking_lot 0.12.3", + "pin-project", "rand", "rustc-hash", "serde", "serde_json", "thiserror", "tokio", + "tokio-stream", "tracing", ] @@ -4091,7 +4868,7 @@ dependencies = [ "route-recognizer", "serde", "serde_json", - "soketto", + "soketto 0.8.0", "thiserror", "tokio", "tokio-stream", @@ -4113,6 +4890,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "jsonrpsee-ws-client" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c28759775f5cb2f1ea9667672d3fe2b0e701d1f4b7b67954e60afe7fd058b5e" +dependencies = [ + "http 1.1.0", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", + "url", +] + [[package]] name = "k256" version = "0.13.3" @@ -4175,6 +4965,17 @@ dependencies = [ "smallvec", ] +[[package]] +name = "landlock" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9baa9eeb6e315942429397e617a190f4fdc696ef1ee0342939d641029cbb4ea7" +dependencies = [ + "enumflags2", + "libc", + "thiserror", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -4332,7 +5133,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "log", - "lru", + "lru 0.12.4", "quick-protobuf", "quick-protobuf-codec", "smallvec", @@ -4364,7 +5165,7 @@ version = "0.44.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16ea178dabba6dde6ffc260a8e0452ccdc8f79becf544946692fff9d412fc29d" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "asynchronous-codec", "bytes", "either", @@ -4576,7 +5377,7 @@ dependencies = [ "rcgen", "ring 0.16.20", "rustls 0.21.7", - "rustls-webpki", + "rustls-webpki 0.101.4", "thiserror", "x509-parser 0.15.1", "yasna", @@ -4627,10 +5428,10 @@ dependencies = [ "parking_lot 0.12.3", "pin-project-lite", "rw-stream-sink", - "soketto", + "soketto 0.8.0", "thiserror", "url", - "webpki-roots", + "webpki-roots 0.25.4", ] [[package]] @@ -4688,7 +5489,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -4770,6 +5571,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -4859,6 +5666,12 @@ version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +[[package]] +name = "lru" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" + [[package]] name = "lru" version = "0.12.4" @@ -5093,6 +5906,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "mick-jaeger" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" +dependencies = [ + "futures", + "rand", + "thrift", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -5126,7 +5950,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.4", "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", @@ -5139,11 +5963,45 @@ dependencies = [ "rand", "rand_chacha", "rand_distr", - "subtle 2.4.1", + "subtle 2.6.1", "thiserror", "zeroize", ] +[[package]] +name = "mmr-gadget" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "futures", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-offchain", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-beefy", + "sp-core", + "sp-mmr-primitives", + "sp-runtime", +] + +[[package]] +name = "mmr-rpc" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-mmr-primitives", + "sp-runtime", +] + [[package]] name = "mockall" version = "0.11.4" @@ -5361,6 +6219,12 @@ dependencies = [ "rand", ] +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" + [[package]] name = "native-tls" version = "0.2.11" @@ -5468,12 +6332,36 @@ dependencies = [ "libc", ] +[[package]] +name = "nix" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +dependencies = [ + "bitflags 2.4.0", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "no-std-compat" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -5557,7 +6445,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "itoa", ] @@ -5759,12 +6647,68 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "orchestra" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f6bbacc8c189a3f2e45e0fd0436e5d97f194db888e721bdbc3973e7dbed4c2" +dependencies = [ + "async-trait", + "dyn-clonable", + "futures", + "futures-timer", + "orchestra-proc-macro", + "pin-project", + "prioritized-metered-channel", + "thiserror", + "tracing", +] + +[[package]] +name = "orchestra-proc-macro" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7b1d40dd8f367db3c65bec8d3dd47d4a604ee8874480738f93191bddab4e0e0" +dependencies = [ + "expander", + "indexmap 2.0.0", + "itertools 0.11.0", + "petgraph", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ordered-float" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" +dependencies = [ + "num-traits", +] + [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "pallet-asset-rate" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + [[package]] name = "pallet-aura" version = "36.0.0" @@ -5781,6 +6725,21 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-authority-discovery" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-support", + "frame-system", + "pallet-session", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-authority-discovery", + "sp-runtime", +] + [[package]] name = "pallet-authorship" version = "37.0.0" @@ -5817,6 +6776,27 @@ dependencies = [ "sp-staking", ] +[[package]] +name = "pallet-bags-list" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "aquamarine", + "docify", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-tracing", +] + [[package]] name = "pallet-balances" version = "38.0.0" @@ -5847,69 +6827,58 @@ dependencies = [ ] [[package]] -name = "pallet-dynamic-fee" -version = "4.0.0-dev" +name = "pallet-beefy" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "fp-dynamic-fee", - "fp-evm", "frame-support", "frame-system", - "pallet-timestamp", + "log", + "pallet-authorship", + "pallet-session", "parity-scale-codec", "scale-info", - "sp-core", - "sp-inherents", - "sp-io", + "serde", + "sp-consensus-beefy", "sp-runtime", + "sp-session", + "sp-staking", ] [[package]] -name = "pallet-ethereum" -version = "4.0.0-dev" +name = "pallet-beefy-mmr" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "ethereum", - "ethereum-types", - "evm", - "fp-consensus", - "fp-ethereum", - "fp-evm", - "fp-rpc", - "fp-self-contained", - "fp-storage", + "array-bytes", + "binary-merkle-tree", "frame-support", "frame-system", - "hex", - "libsecp256k1", - "pallet-balances", - "pallet-evm", - "pallet-timestamp", + "log", + "pallet-beefy", + "pallet-mmr", + "pallet-session", "parity-scale-codec", - "rlp", "scale-info", + "serde", + "sp-api", + "sp-consensus-beefy", "sp-core", "sp-io", "sp-runtime", + "sp-state-machine", ] [[package]] -name = "pallet-evm" -version = "6.0.0-dev" +name = "pallet-bounties" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "environmental", - "evm", - "fp-account", - "fp-evm", "frame-benchmarking", "frame-support", "frame-system", - "hash-db", - "hex", - "hex-literal", - "impl-trait-for-tuples", "log", - "pallet-balances", - "pallet-evm-precompile-simple", - "pallet-timestamp", + "pallet-treasury", "parity-scale-codec", "scale-info", "sp-core", @@ -5918,102 +6887,328 @@ dependencies = [ ] [[package]] -name = "pallet-evm-chain-id" -version = "1.0.0-dev" +name = "pallet-broker" +version = "0.16.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ + "bitvec", + "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-runtime", ] [[package]] -name = "pallet-evm-precompile-blake2" -version = "2.0.0-dev" -dependencies = [ - "fp-evm", - "pallet-evm-test-vector-support", -] - -[[package]] -name = "pallet-evm-precompile-bls12377" -version = "1.0.0-dev" +name = "pallet-child-bounties" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "ark-bls12-377", - "ark-ec", - "ark-ff", - "ark-std", - "fp-evm", - "pallet-evm-test-vector-support", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-bounties", + "pallet-treasury", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] -name = "pallet-evm-precompile-bls12381" -version = "1.0.0-dev" +name = "pallet-collective" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "ark-bls12-381", - "ark-ec", - "ark-ff", - "ark-std", - "fp-evm", - "pallet-evm-test-vector-support", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] -name = "pallet-evm-precompile-bn128" -version = "2.0.0-dev" +name = "pallet-conviction-voting" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "fp-evm", - "pallet-evm-test-vector-support", - "sp-core", - "substrate-bn", + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", ] [[package]] -name = "pallet-evm-precompile-bw6761" -version = "1.0.0-dev" +name = "pallet-delegated-staking" +version = "4.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "ark-bw6-761", - "ark-ec", - "ark-ff", - "ark-std", - "fp-evm", - "pallet-evm-test-vector-support", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-staking", ] [[package]] -name = "pallet-evm-precompile-curve25519" -version = "1.0.0-dev" +name = "pallet-democracy" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "curve25519-dalek", - "fp-evm", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] -name = "pallet-evm-precompile-dispatch" -version = "2.0.0-dev" +name = "pallet-dynamic-fee" +version = "4.0.0-dev" dependencies = [ + "fp-dynamic-fee", "fp-evm", "frame-support", "frame-system", - "pallet-balances", - "pallet-evm", "pallet-timestamp", - "pallet-utility", "parity-scale-codec", "scale-info", "sp-core", + "sp-inherents", "sp-io", "sp-runtime", ] [[package]] -name = "pallet-evm-precompile-ed25519" -version = "2.0.0-dev" +name = "pallet-election-provider-multi-phase" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "ed25519-dalek", - "fp-evm", -] + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-election-provider-support-benchmarking", + "parity-scale-codec", + "rand", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "strum 0.26.2", +] + +[[package]] +name = "pallet-election-provider-support-benchmarking" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-system", + "parity-scale-codec", + "sp-npos-elections", + "sp-runtime", +] + +[[package]] +name = "pallet-elections-phragmen" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "sp-staking", +] + +[[package]] +name = "pallet-ethereum" +version = "4.0.0-dev" +dependencies = [ + "cumulus-primitives-storage-weight-reclaim", + "ethereum", + "ethereum-types", + "evm", + "fp-consensus", + "fp-ethereum", + "fp-evm", + "fp-rpc", + "fp-self-contained", + "fp-storage", + "frame-support", + "frame-system", + "hex", + "libsecp256k1", + "pallet-balances", + "pallet-evm", + "pallet-timestamp", + "parity-scale-codec", + "rlp", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-evm" +version = "6.0.0-dev" +dependencies = [ + "cumulus-primitives-storage-weight-reclaim", + "environmental", + "evm", + "fp-account", + "fp-evm", + "frame-benchmarking", + "frame-support", + "frame-system", + "hash-db", + "hex", + "hex-literal", + "impl-trait-for-tuples", + "log", + "pallet-balances", + "pallet-evm-precompile-simple", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-trie", +] + +[[package]] +name = "pallet-evm-chain-id" +version = "1.0.0-dev" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "pallet-evm-precompile-blake2" +version = "2.0.0-dev" +dependencies = [ + "fp-evm", + "pallet-evm-test-vector-support", +] + +[[package]] +name = "pallet-evm-precompile-bls12377" +version = "1.0.0-dev" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", + "fp-evm", + "pallet-evm-test-vector-support", +] + +[[package]] +name = "pallet-evm-precompile-bls12381" +version = "1.0.0-dev" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", + "fp-evm", + "pallet-evm-test-vector-support", +] + +[[package]] +name = "pallet-evm-precompile-bn128" +version = "2.0.0-dev" +dependencies = [ + "fp-evm", + "pallet-evm-test-vector-support", + "sp-core", + "substrate-bn", +] + +[[package]] +name = "pallet-evm-precompile-bw6761" +version = "1.0.0-dev" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-std", + "fp-evm", + "pallet-evm-test-vector-support", +] + +[[package]] +name = "pallet-evm-precompile-curve25519" +version = "1.0.0-dev" +dependencies = [ + "curve25519-dalek", + "fp-evm", +] + +[[package]] +name = "pallet-evm-precompile-dispatch" +version = "2.0.0-dev" +dependencies = [ + "fp-evm", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-evm", + "pallet-timestamp", + "pallet-utility", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-evm-precompile-ed25519" +version = "2.0.0-dev" +dependencies = [ + "ed25519-dalek", + "fp-evm", +] [[package]] name = "pallet-evm-precompile-modexp" @@ -6050,6 +7245,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", + "log", "pallet-balances", "pallet-evm", "pallet-timestamp", @@ -6075,6 +7271,24 @@ dependencies = [ "sp-core", ] +[[package]] +name = "pallet-fast-unstake" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "docify", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-staking", +] + [[package]] name = "pallet-grandpa" version = "37.0.0" @@ -6113,396 +7327,2028 @@ dependencies = [ ] [[package]] -name = "pallet-session" +name = "pallet-identity" version = "37.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ + "enumflags2", + "frame-benchmarking", "frame-support", "frame-system", - "impl-trait-for-tuples", "log", - "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core", "sp-io", "sp-runtime", - "sp-session", - "sp-staking", - "sp-state-machine", - "sp-trie", ] [[package]] -name = "pallet-sudo" -version = "37.0.0" +name = "pallet-im-online" +version = "36.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "docify", "frame-benchmarking", "frame-support", "frame-system", + "log", + "pallet-authorship", "parity-scale-codec", "scale-info", + "sp-application-crypto", + "sp-core", "sp-io", "sp-runtime", + "sp-staking", ] [[package]] -name = "pallet-timestamp" -version = "36.0.0" +name = "pallet-indices" +version = "37.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "docify", "frame-benchmarking", "frame-support", "frame-system", - "log", "parity-scale-codec", "scale-info", - "sp-inherents", + "sp-core", "sp-io", + "sp-keyring", "sp-runtime", - "sp-storage", - "sp-timestamp", ] [[package]] -name = "pallet-transaction-payment" +name = "pallet-membership" version = "37.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", - "serde", "sp-core", "sp-io", "sp-runtime", ] [[package]] -name = "pallet-transaction-payment-rpc" +name = "pallet-message-queue" version = "40.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "jsonrpsee", - "pallet-transaction-payment-rpc-runtime-api", + "environmental", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", "parity-scale-codec", - "sp-api", - "sp-blockchain", + "scale-info", + "sp-arithmetic", "sp-core", - "sp-rpc", + "sp-io", "sp-runtime", "sp-weights", ] [[package]] -name = "pallet-transaction-payment-rpc-runtime-api" +name = "pallet-mmr" version = "37.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "pallet-transaction-payment", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", "parity-scale-codec", - "sp-api", + "scale-info", + "sp-core", + "sp-io", + "sp-mmr-primitives", "sp-runtime", - "sp-weights", ] [[package]] -name = "pallet-utility" +name = "pallet-multisig" version = "37.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", - "sp-core", "sp-io", "sp-runtime", ] [[package]] -name = "parity-bip39" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" +name = "pallet-nis" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "bitcoin_hashes", - "rand", - "rand_core", - "serde", - "unicode-normalization", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-runtime", ] [[package]] -name = "parity-db" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" +name = "pallet-nomination-pools" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "blake2 0.10.6", - "crc32fast", - "fs2", - "hex", - "libc", + "frame-support", + "frame-system", "log", - "lz4", - "memmap2 0.5.10", - "parking_lot 0.12.3", - "rand", - "siphasher", - "snap", - "winapi", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-tracing", ] [[package]] -name = "parity-scale-codec" -version = "3.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +name = "pallet-nomination-pools-benchmarking" +version = "35.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "pallet-bags-list", + "pallet-delegated-staking", + "pallet-nomination-pools", + "pallet-staking", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-runtime-interface", + "sp-staking", ] [[package]] -name = "parity-scale-codec-derive" -version = "3.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +name = "pallet-nomination-pools-runtime-api" +version = "32.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 1.0.109", + "pallet-nomination-pools", + "parity-scale-codec", + "sp-api", ] [[package]] -name = "parity-wasm" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" - -[[package]] -name = "parking" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +name = "pallet-offences" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", + "sp-staking", ] [[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +name = "pallet-offences-benchmarking" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "lock_api", - "parking_lot_core 0.9.9", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-babe", + "pallet-balances", + "pallet-grandpa", + "pallet-im-online", + "pallet-offences", + "pallet-session", + "pallet-staking", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-staking", ] [[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +name = "pallet-parameters" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-core", + "sp-runtime", ] [[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +name = "pallet-preimage" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "smallvec", - "windows-targets 0.48.5", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] -name = "partial_sort" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" - -[[package]] -name = "password-hash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +name = "pallet-proxy" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "base64ct", - "rand_core", - "subtle 2.4.1", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", ] [[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +name = "pallet-ranked-collective" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "digest 0.10.7", - "password-hash", + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +name = "pallet-recovery" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "base64 0.13.1", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", ] [[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] +name = "pallet-referenda" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-root-testing" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-scheduler" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "pallet-session" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-state-machine", + "sp-trie", +] + +[[package]] +name = "pallet-session-benchmarking" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", + "pallet-staking", + "parity-scale-codec", + "rand", + "sp-runtime", + "sp-session", +] + +[[package]] +name = "pallet-society" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "rand_chacha", + "scale-info", + "sp-arithmetic", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-staking" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "rand_chacha", + "scale-info", + "serde", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-staking", +] + +[[package]] +name = "pallet-staking-reward-curve" +version = "12.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "pallet-staking-reward-fn" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "log", + "sp-arithmetic", +] + +[[package]] +name = "pallet-staking-runtime-api" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "parity-scale-codec", + "sp-api", + "sp-staking", +] + +[[package]] +name = "pallet-state-trie-migration" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-sudo" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-timestamp" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-storage", + "sp-timestamp", +] + +[[package]] +name = "pallet-tips" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-treasury", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-transaction-payment" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-transaction-payment-rpc" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "jsonrpsee", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "pallet-transaction-payment-rpc-runtime-api" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "pallet-transaction-payment", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "pallet-treasury" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "pallet-utility" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-vesting" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", +] + +[[package]] +name = "pallet-whitelist" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", +] + +[[package]] +name = "pallet-xcm" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "bounded-collections", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "xcm-runtime-apis", +] + +[[package]] +name = "pallet-xcm-benchmarks" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "parity-bip39" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" +dependencies = [ + "bitcoin_hashes 0.13.0", + "rand", + "rand_core", + "serde", + "unicode-normalization", +] + +[[package]] +name = "parity-db" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" +dependencies = [ + "blake2 0.10.6", + "crc32fast", + "fs2", + "hex", + "libc", + "log", + "lz4", + "memmap2 0.5.10", + "parking_lot 0.12.3", + "rand", + "siphasher", + "snap", + "winapi", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec 0.7.4", + "bitvec", + "byte-slice-cast", + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parity-wasm" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" + +[[package]] +name = "parking" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "partial_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" + +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core", + "subtle 2.6.1", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "password-hash", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] name = "pest" version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "pest_meta" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" +dependencies = [ + "once_cell", + "pest", + "sha2 0.10.8", +] + +[[package]] +name = "petgraph" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +dependencies = [ + "fixedbitset", + "indexmap 1.9.3", +] + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "polkadot-approval-distribution" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "bitvec", + "futures", + "futures-timer", + "itertools 0.11.0", + "polkadot-node-jaeger", + "polkadot-node-metrics", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "rand", + "tracing-gum", +] + +[[package]] +name = "polkadot-availability-bitfield-distribution" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "always-assert", + "futures", + "futures-timer", + "polkadot-node-network-protocol", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "rand", + "tracing-gum", +] + +[[package]] +name = "polkadot-availability-distribution" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "derive_more", + "fatality", + "futures", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "rand", + "sc-network", + "schnellru", + "sp-core", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-availability-recovery" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "fatality", + "futures", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "rand", + "sc-network", + "schnellru", + "thiserror", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-ckb-merkle-mountain-range" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4b44320e5f7ce2c18227537a3032ae5b2c476a7e8eddba45333e1011fc31b92" +dependencies = [ + "cfg-if", + "itertools 0.10.5", +] + +[[package]] +name = "polkadot-cli" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "cfg-if", + "clap", + "frame-benchmarking-cli", + "futures", + "log", + "polkadot-node-metrics", + "polkadot-node-primitives", + "polkadot-service", + "sc-cli", + "sc-executor", + "sc-service", + "sc-storage-monitor", + "sc-sysinfo", + "sc-tracing", + "sp-core", + "sp-io", + "sp-keyring", + "sp-maybe-compressed-blob", + "sp-runtime", + "substrate-build-script-utils", + "thiserror", +] + +[[package]] +name = "polkadot-collator-protocol" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "bitvec", + "fatality", + "futures", + "futures-timer", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-core", + "sp-keystore", + "sp-runtime", + "thiserror", + "tokio-util", + "tracing-gum", +] + +[[package]] +name = "polkadot-core-primitives" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "polkadot-dispute-distribution" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "derive_more", + "fatality", + "futures", + "futures-timer", + "indexmap 2.0.0", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sc-network", + "schnellru", + "sp-application-crypto", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-erasure-coding" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-primitives", + "reed-solomon-novelpoly", + "sp-core", + "sp-trie", + "thiserror", +] + +[[package]] +name = "polkadot-gossip-support" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "futures", + "futures-timer", + "polkadot-node-network-protocol", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "rand", + "rand_chacha", + "sc-network", + "sc-network-common", + "sp-application-crypto", + "sp-core", + "sp-crypto-hashing", + "sp-keystore", + "tracing-gum", +] + +[[package]] +name = "polkadot-network-bridge" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "always-assert", + "async-trait", + "bytes", + "fatality", + "futures", + "parity-scale-codec", + "parking_lot 0.12.3", + "polkadot-node-metrics", + "polkadot-node-network-protocol", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "sc-network", + "sp-consensus", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-collation-generation" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "futures", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-core", + "sp-maybe-compressed-blob", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-approval-voting" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "bitvec", + "derive_more", + "futures", + "futures-timer", + "itertools 0.11.0", + "kvdb", + "merlin", + "parity-scale-codec", + "polkadot-node-jaeger", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "rand", + "rand_chacha", + "rand_core", + "sc-keystore", + "schnellru", + "schnorrkel 0.11.4", + "sp-application-crypto", + "sp-consensus", + "sp-consensus-slots", + "sp-runtime", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-av-store" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "bitvec", + "futures", + "futures-timer", + "kvdb", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-jaeger", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "sp-consensus", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-backing" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "bitvec", + "fatality", + "futures", + "polkadot-erasure-coding", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "polkadot-statement-table", + "schnellru", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-bitfield-signing" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "futures", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-keystore", + "thiserror", + "tracing-gum", + "wasm-timer", +] + +[[package]] +name = "polkadot-node-core-candidate-validation" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "parity-scale-codec", + "polkadot-node-core-pvf", + "polkadot-node-metrics", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-parachain-primitives", + "polkadot-primitives", + "sp-maybe-compressed-blob", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-chain-api" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "futures", + "polkadot-node-metrics", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types", + "sc-client-api", + "sc-consensus-babe", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-chain-selection" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "futures", + "futures-timer", + "kvdb", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-dispute-coordinator" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "fatality", + "futures", + "kvdb", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sc-keystore", + "schnellru", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-parachains-inherent" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "sp-blockchain", + "sp-inherents", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-prospective-parachains" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "memchr", + "bitvec", + "fatality", + "futures", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", "thiserror", - "ucd-trie", + "tracing-gum", ] [[package]] -name = "pest_derive" -version = "2.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" +name = "polkadot-node-core-provisioner" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "pest", - "pest_generator", + "bitvec", + "fatality", + "futures", + "futures-timer", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "schnellru", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "always-assert", + "array-bytes", + "blake3", + "cfg-if", + "futures", + "futures-timer", + "parity-scale-codec", + "pin-project", + "polkadot-core-primitives", + "polkadot-node-core-pvf-common", + "polkadot-node-metrics", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-parachain-primitives", + "polkadot-primitives", + "rand", + "slotmap", + "sp-core", + "tempfile", + "thiserror", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-checker" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "futures", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-common" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "cpu-time", + "futures", + "landlock", + "libc", + "nix 0.28.0", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "sc-executor", + "sc-executor-common", + "sc-executor-wasmtime", + "seccompiler", + "sp-core", + "sp-crypto-hashing", + "sp-externalities", + "sp-io", + "sp-tracing", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-runtime-api" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "futures", + "polkadot-node-metrics", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types", + "polkadot-primitives", + "schnellru", + "sp-consensus-babe", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-jaeger" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "lazy_static", + "log", + "mick-jaeger", + "parity-scale-codec", + "parking_lot 0.12.3", + "polkadot-node-primitives", + "polkadot-primitives", + "sc-network", + "sc-network-types", + "sp-core", + "thiserror", + "tokio", +] + +[[package]] +name = "polkadot-node-metrics" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "bs58 0.5.0", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "polkadot-primitives", + "prioritized-metered-channel", + "sc-cli", + "sc-service", + "sc-tracing", + "substrate-prometheus-endpoint", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-network-protocol" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-channel", + "async-trait", + "bitvec", + "derive_more", + "fatality", + "futures", + "hex", + "parity-scale-codec", + "polkadot-node-jaeger", + "polkadot-node-primitives", + "polkadot-primitives", + "rand", + "sc-authority-discovery", + "sc-network", + "sc-network-types", + "sp-runtime", + "strum 0.26.2", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-primitives" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "bitvec", + "bounded-vec", + "futures", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "schnorrkel 0.11.4", + "serde", + "sp-application-crypto", + "sp-consensus-babe", + "sp-core", + "sp-keystore", + "sp-maybe-compressed-blob", + "sp-runtime", + "thiserror", + "zstd 0.12.4", +] + +[[package]] +name = "polkadot-node-subsystem" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "polkadot-node-jaeger", + "polkadot-node-subsystem-types", + "polkadot-overseer", +] + +[[package]] +name = "polkadot-node-subsystem-types" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "bitvec", + "derive_more", + "fatality", + "futures", + "orchestra", + "polkadot-node-jaeger", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-primitives", + "polkadot-statement-table", + "sc-client-api", + "sc-network", + "sc-network-types", + "sc-transaction-pool-api", + "smallvec", + "sp-api", + "sp-authority-discovery", + "sp-blockchain", + "sp-consensus-babe", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "polkadot-node-subsystem-util" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "derive_more", + "fatality", + "futures", + "futures-channel", + "itertools 0.11.0", + "kvdb", + "parity-db", + "parity-scale-codec", + "parking_lot 0.12.3", + "pin-project", + "polkadot-erasure-coding", + "polkadot-node-jaeger", + "polkadot-node-metrics", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types", + "polkadot-overseer", + "polkadot-primitives", + "prioritized-metered-channel", + "rand", + "sc-client-api", + "schnellru", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-overseer" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "orchestra", + "parking_lot 0.12.3", + "polkadot-node-metrics", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem-types", + "polkadot-primitives", + "sc-client-api", + "sp-api", + "sp-core", + "tikv-jemalloc-ctl", + "tracing-gum", +] + +[[package]] +name = "polkadot-parachain-primitives" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "bounded-collections", + "derive_more", + "parity-scale-codec", + "polkadot-core-primitives", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "polkadot-primitives" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "bitvec", + "hex-literal", + "log", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-staking", +] + +[[package]] +name = "polkadot-rpc" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "jsonrpsee", + "mmr-rpc", + "pallet-transaction-payment-rpc", + "polkadot-primitives", + "sc-chain-spec", + "sc-client-api", + "sc-consensus-babe", + "sc-consensus-babe-rpc", + "sc-consensus-beefy", + "sc-consensus-beefy-rpc", + "sc-consensus-epochs", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", + "sc-rpc", + "sc-rpc-spec-v2", + "sc-sync-state-rpc", + "sc-transaction-pool-api", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-keystore", + "sp-runtime", + "substrate-frame-rpc-system", + "substrate-state-trie-migration-rpc", ] [[package]] -name = "pest_generator" -version = "2.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" +name = "polkadot-runtime-common" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn 2.0.65", + "bitvec", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "libsecp256k1", + "log", + "pallet-asset-rate", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-broker", + "pallet-election-provider-multi-phase", + "pallet-fast-unstake", + "pallet-identity", + "pallet-session", + "pallet-staking", + "pallet-staking-reward-fn", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-treasury", + "pallet-vesting", + "parity-scale-codec", + "polkadot-primitives", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "slot-range-helper", + "sp-api", + "sp-core", + "sp-inherents", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "sp-session", + "sp-staking", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "static_assertions", ] [[package]] -name = "pest_meta" -version = "2.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" +name = "polkadot-runtime-metrics" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "once_cell", - "pest", - "sha2 0.10.8", + "bs58 0.5.0", + "frame-benchmarking", + "parity-scale-codec", + "polkadot-primitives", + "sp-tracing", ] [[package]] -name = "petgraph" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +name = "polkadot-runtime-parachains" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "fixedbitset", - "indexmap 1.9.3", + "bitflags 1.3.2", + "bitvec", + "derive_more", + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-broker", + "pallet-message-queue", + "pallet-session", + "pallet-staking", + "pallet-timestamp", + "pallet-vesting", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-metrics", + "rand", + "rand_chacha", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-session", + "sp-staking", + "staging-xcm", + "staging-xcm-executor", + "static_assertions", ] [[package]] -name = "pin-project" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +name = "polkadot-service" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "pin-project-internal", + "async-trait", + "frame-benchmarking", + "frame-benchmarking-cli", + "frame-support", + "frame-system", + "frame-system-rpc-runtime-api", + "futures", + "hex-literal", + "is_executable", + "kvdb", + "kvdb-rocksdb", + "log", + "mmr-gadget", + "pallet-babe", + "pallet-staking", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "parity-db", + "parity-scale-codec", + "parking_lot 0.12.3", + "polkadot-approval-distribution", + "polkadot-availability-bitfield-distribution", + "polkadot-availability-distribution", + "polkadot-availability-recovery", + "polkadot-collator-protocol", + "polkadot-core-primitives", + "polkadot-dispute-distribution", + "polkadot-gossip-support", + "polkadot-network-bridge", + "polkadot-node-collation-generation", + "polkadot-node-core-approval-voting", + "polkadot-node-core-av-store", + "polkadot-node-core-backing", + "polkadot-node-core-bitfield-signing", + "polkadot-node-core-candidate-validation", + "polkadot-node-core-chain-api", + "polkadot-node-core-chain-selection", + "polkadot-node-core-dispute-coordinator", + "polkadot-node-core-parachains-inherent", + "polkadot-node-core-prospective-parachains", + "polkadot-node-core-provisioner", + "polkadot-node-core-pvf", + "polkadot-node-core-pvf-checker", + "polkadot-node-core-runtime-api", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-rpc", + "polkadot-runtime-parachains", + "polkadot-statement-distribution", + "rococo-runtime", + "sc-authority-discovery", + "sc-basic-authorship", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-client-db", + "sc-consensus", + "sc-consensus-babe", + "sc-consensus-beefy", + "sc-consensus-grandpa", + "sc-consensus-slots", + "sc-executor", + "sc-keystore", + "sc-network", + "sc-network-common", + "sc-network-sync", + "sc-offchain", + "sc-service", + "sc-sync-state-rpc", + "sc-sysinfo", + "sc-telemetry", + "sc-transaction-pool", + "sc-transaction-pool-api", + "schnellru", + "serde", + "serde_json", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-grandpa", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-keystore", + "sp-mmr-primitives", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-state-machine", + "sp-storage", + "sp-timestamp", + "sp-transaction-pool", + "sp-version", + "sp-weights", + "staging-xcm", + "substrate-prometheus-endpoint", + "thiserror", + "tracing-gum", + "westend-runtime", + "xcm-runtime-apis", ] [[package]] -name = "pin-project-internal" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +name = "polkadot-statement-distribution" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.65", + "arrayvec 0.7.4", + "bitvec", + "fatality", + "futures", + "futures-timer", + "indexmap 2.0.0", + "parity-scale-codec", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-keystore", + "sp-staking", + "thiserror", + "tracing-gum", ] [[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +name = "polkadot-statement-table" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "der", - "spki", + "parity-scale-codec", + "polkadot-primitives", + "sp-core", + "tracing-gum", ] -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - [[package]] name = "polkavm" version = "0.9.3" @@ -6586,6 +9432,22 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26e85d3456948e650dff0cfc85603915847faf893ed1e66b020bb82ef4557120" +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + [[package]] name = "polling" version = "3.3.2" @@ -6608,7 +9470,18 @@ checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" dependencies = [ "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "universal-hash 0.4.0", +] + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash 0.5.1", ] [[package]] @@ -6620,7 +9493,7 @@ dependencies = [ "cfg-if", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "universal-hash 0.4.0", ] [[package]] @@ -6787,6 +9660,22 @@ dependencies = [ "uint", ] +[[package]] +name = "prioritized-metered-channel" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a172e6cc603231f2cf004232eabcecccc0da53ba576ab286ef7baa0cfc7927ad" +dependencies = [ + "coarsetime", + "crossbeam-queue", + "derive_more", + "futures", + "futures-timer", + "nanorand", + "thiserror", + "tracing", +] + [[package]] name = "proc-macro-crate" version = "1.1.3" @@ -7325,6 +10214,18 @@ dependencies = [ "thiserror", ] +[[package]] +name = "reed-solomon-novelpoly" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87413ebb313323d431e85d0afc5a68222aaed972843537cbfe5f061cf1b4bcab" +dependencies = [ + "derive_more", + "fs-err", + "static_init", + "thiserror", +] + [[package]] name = "ref-cast" version = "1.0.19" @@ -7431,7 +10332,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -7504,6 +10405,122 @@ dependencies = [ "librocksdb-sys", ] +[[package]] +name = "rococo-runtime" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "binary-merkle-tree", + "bitvec", + "frame-benchmarking", + "frame-executive", + "frame-metadata-hash-extension", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-asset-rate", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", + "pallet-bounties", + "pallet-child-bounties", + "pallet-collective", + "pallet-conviction-voting", + "pallet-democracy", + "pallet-elections-phragmen", + "pallet-grandpa", + "pallet-identity", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-mmr", + "pallet-multisig", + "pallet-nis", + "pallet-offences", + "pallet-parameters", + "pallet-preimage", + "pallet-proxy", + "pallet-ranked-collective", + "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", + "pallet-scheduler", + "pallet-session", + "pallet-society", + "pallet-staking", + "pallet-state-trie-migration", + "pallet-sudo", + "pallet-timestamp", + "pallet-tips", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-whitelist", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rococo-runtime-constants", + "scale-info", + "serde", + "serde_derive", + "serde_json", + "smallvec", + "sp-api", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-grandpa", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "static_assertions", + "substrate-wasm-builder", + "xcm-runtime-apis", +] + +[[package]] +name = "rococo-runtime-constants" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-builder", +] + [[package]] name = "route-recognizer" version = "0.3.1" @@ -7531,7 +10548,7 @@ dependencies = [ "log", "netlink-packet-route", "netlink-proto", - "nix", + "nix 0.24.3", "thiserror", "tokio", ] @@ -7596,6 +10613,20 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + [[package]] name = "rustix" version = "0.38.31" @@ -7628,10 +10659,25 @@ checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring 0.16.20", - "rustls-webpki", + "rustls-webpki 0.101.4", "sct", ] +[[package]] +name = "rustls" +version = "0.23.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +dependencies = [ + "log", + "once_cell", + "ring 0.17.3", + "rustls-pki-types", + "rustls-webpki 0.102.6", + "subtle 2.6.1", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -7639,7 +10685,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.3", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.1.3", + "rustls-pki-types", "schannel", "security-framework", ] @@ -7653,6 +10712,49 @@ dependencies = [ "base64 0.21.2", ] +[[package]] +name = "rustls-pemfile" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + +[[package]] +name = "rustls-platform-verifier" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93bda3f493b9abe5b93b3e7e3ecde0df292f2bd28c0296b90586ee0055ff5123" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls 0.23.12", + "rustls-native-certs 0.7.1", + "rustls-platform-verifier-android", + "rustls-webpki 0.102.6", + "security-framework", + "security-framework-sys", + "webpki-roots 0.26.3", + "winapi", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" version = "0.101.4" @@ -7663,12 +10765,34 @@ dependencies = [ "untrusted 0.7.1", ] +[[package]] +name = "rustls-webpki" +version = "0.102.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +dependencies = [ + "ring 0.17.3", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "ruzstd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +dependencies = [ + "byteorder", + "thiserror-core", + "twox-hash", +] + [[package]] name = "rw-stream-sink" version = "0.4.0" @@ -7715,6 +10839,36 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-authority-discovery" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "ip_network", + "libp2p", + "linked_hash_set", + "log", + "multihash 0.19.1", + "parity-scale-codec", + "prost 0.12.6", + "prost-build 0.12.6", + "rand", + "sc-client-api", + "sc-network", + "sc-network-types", + "sp-api", + "sp-authority-discovery", + "sp-blockchain", + "sp-core", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + [[package]] name = "sc-basic-authorship" version = "0.44.0" @@ -7909,67 +11063,145 @@ dependencies = [ ] [[package]] -name = "sc-consensus-aura" -version = "0.44.0" +name = "sc-consensus-aura" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "futures", + "log", + "parity-scale-codec", + "sc-block-builder", + "sc-client-api", + "sc-consensus", + "sc-consensus-slots", + "sc-telemetry", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-consensus-babe" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "async-trait", + "fork-tree", + "futures", + "log", + "num-bigint", + "num-rational", + "num-traits", + "parity-scale-codec", + "parking_lot 0.12.3", + "sc-client-api", + "sc-consensus", + "sc-consensus-epochs", + "sc-consensus-slots", + "sc-telemetry", + "sc-transaction-pool-api", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-slots", + "sp-core", + "sp-crypto-hashing", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-consensus-babe-rpc" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "futures", + "jsonrpsee", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-rpc-api", + "serde", + "sp-api", + "sp-application-crypto", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-keystore", + "sp-runtime", + "thiserror", +] + +[[package]] +name = "sc-consensus-beefy" +version = "23.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ + "array-bytes", + "async-channel", "async-trait", + "fnv", "futures", "log", "parity-scale-codec", - "sc-block-builder", + "parking_lot 0.12.3", "sc-client-api", "sc-consensus", - "sc-consensus-slots", - "sc-telemetry", + "sc-network", + "sc-network-gossip", + "sc-network-sync", + "sc-network-types", + "sc-utils", "sp-api", "sp-application-crypto", - "sp-block-builder", + "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-consensus-aura", - "sp-consensus-slots", + "sp-consensus-beefy", "sp-core", - "sp-inherents", + "sp-crypto-hashing", "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", + "wasm-timer", ] [[package]] -name = "sc-consensus-babe" -version = "0.44.0" +name = "sc-consensus-beefy-rpc" +version = "23.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "async-trait", - "fork-tree", "futures", + "jsonrpsee", "log", - "num-bigint", - "num-rational", - "num-traits", "parity-scale-codec", "parking_lot 0.12.3", - "sc-client-api", - "sc-consensus", - "sc-consensus-epochs", - "sc-consensus-slots", - "sc-telemetry", - "sc-transaction-pool-api", - "sp-api", + "sc-consensus-beefy", + "sc-rpc", + "serde", "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-slots", + "sp-consensus-beefy", "sp-core", - "sp-crypto-hashing", - "sp-inherents", - "sp-keystore", "sp-runtime", - "substrate-prometheus-endpoint", "thiserror", ] @@ -8030,6 +11262,26 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-grandpa-rpc" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "finality-grandpa", + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-consensus-grandpa", + "sc-rpc", + "serde", + "sp-blockchain", + "sp-core", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-consensus-manual-seal" version = "0.45.0" @@ -8190,7 +11442,7 @@ version = "0.14.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "array-bytes", - "arrayvec", + "arrayvec 0.7.4", "blake2 0.10.6", "bytes", "futures", @@ -8619,6 +11871,38 @@ dependencies = [ "sp-core", ] +[[package]] +name = "sc-storage-monitor" +version = "0.22.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "clap", + "fs4", + "log", + "sp-core", + "thiserror", + "tokio", +] + +[[package]] +name = "sc-sync-state-rpc" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "sc-chain-spec", + "sc-client-api", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-consensus-grandpa", + "serde", + "serde_json", + "sp-blockchain", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-sysinfo" version = "37.0.0" @@ -8834,6 +12118,22 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "schnorrkel" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek-ng", + "merlin", + "rand_core", + "sha2 0.9.9", + "subtle-ng", + "zeroize", +] + [[package]] name = "schnorrkel" version = "0.11.4" @@ -8842,14 +12142,14 @@ checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ "aead 0.5.2", "arrayref", - "arrayvec", + "arrayvec 0.7.4", "curve25519-dalek", "getrandom_or_panic", "merlin", "rand_core", "serde_bytes", "sha2 0.10.8", - "subtle 2.4.1", + "subtle 2.6.1", "zeroize", ] @@ -8901,10 +12201,19 @@ dependencies = [ "generic-array 0.14.7", "pkcs8", "serdect", - "subtle 2.4.1", + "subtle 2.6.1", "zeroize", ] +[[package]] +name = "seccompiler" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345a3e4dddf721a478089d4697b83c6c0a8f5bf16086f6c13397e4534eb6e2e5" +dependencies = [ + "libc", +] + [[package]] name = "secp256k1" version = "0.28.1" @@ -8934,22 +12243,23 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", + "num-bigint", "security-framework-sys", ] [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -9044,6 +12354,19 @@ dependencies = [ "serde", ] +[[package]] +name = "sha-1" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + [[package]] name = "sha-1" version = "0.10.1" @@ -9213,12 +12536,139 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" +[[package]] +name = "slot-range-helper" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "enumn", + "parity-scale-codec", + "paste", + "sp-runtime", +] + +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "version_check", +] + [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-net", + "async-process", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "smoldot" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" +dependencies = [ + "arrayvec 0.7.4", + "async-lock 2.8.0", + "atomic-take", + "base64 0.21.2", + "bip39", + "blake2-rfc", + "bs58 0.5.0", + "chacha20 0.9.1", + "crossbeam-queue", + "derive_more", + "ed25519-zebra", + "either", + "event-listener 2.5.3", + "fnv", + "futures-lite 1.13.0", + "futures-util", + "hashbrown 0.14.3", + "hex", + "hmac 0.12.1", + "itertools 0.11.0", + "libsecp256k1", + "merlin", + "no-std-net", + "nom", + "num-bigint", + "num-rational", + "num-traits", + "pbkdf2", + "pin-project", + "poly1305 0.8.0", + "rand", + "rand_chacha", + "ruzstd", + "schnorrkel 0.10.2", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3", + "siphasher", + "slab", + "smallvec", + "soketto 0.7.1", + "twox-hash", + "wasmi", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "smoldot-light" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" +dependencies = [ + "async-channel", + "async-lock 2.8.0", + "base64 0.21.2", + "blake2-rfc", + "derive_more", + "either", + "event-listener 2.5.3", + "fnv", + "futures-channel", + "futures-lite 1.13.0", + "futures-util", + "hashbrown 0.14.3", + "hex", + "itertools 0.11.0", + "log", + "lru 0.11.1", + "no-std-net", + "parking_lot 0.12.3", + "pin-project", + "rand", + "rand_chacha", + "serde", + "serde_json", + "siphasher", + "slab", + "smol", + "smoldot", + "zeroize", +] + [[package]] name = "snap" version = "1.1.0" @@ -9231,7 +12681,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" dependencies = [ - "aes-gcm 0.9.4", + "aes-gcm 0.9.2", "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek", @@ -9239,7 +12689,7 @@ dependencies = [ "ring 0.16.20", "rustc_version", "sha2 0.10.8", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -9262,6 +12712,21 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "soketto" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +dependencies = [ + "base64 0.13.1", + "bytes", + "futures", + "httparse", + "log", + "rand", + "sha-1 0.9.8", +] + [[package]] name = "soketto" version = "0.8.0" @@ -9340,6 +12805,18 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-authority-discovery" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-runtime", +] + [[package]] name = "sp-block-builder" version = "34.0.0" @@ -9415,7 +12892,27 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-timestamp", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-beefy" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "lazy_static", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-crypto-hashing", + "sp-io", + "sp-keystore", + "sp-mmr-primitives", + "sp-runtime", + "strum 0.26.2", ] [[package]] @@ -9474,7 +12971,7 @@ dependencies = [ "primitive-types", "rand", "scale-info", - "schnorrkel", + "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", @@ -9646,6 +13143,36 @@ dependencies = [ "sp-application-crypto", ] +[[package]] +name = "sp-mmr-primitives" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "log", + "parity-scale-codec", + "polkadot-ckb-merkle-mountain-range", + "scale-info", + "serde", + "sp-api", + "sp-core", + "sp-debug-derive", + "sp-runtime", + "thiserror", +] + +[[package]] +name = "sp-npos-elections" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-core", + "sp-runtime", +] + [[package]] name = "sp-offchain" version = "34.0.0" @@ -10139,6 +13666,47 @@ dependencies = [ "xcm-procedural", ] +[[package]] +name = "staging-xcm-builder" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-transaction-payment", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +name = "staging-xcm-executor" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "environmental", + "frame-benchmarking", + "frame-support", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-weights", + "staging-xcm", + "tracing", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -10181,14 +13749,14 @@ checksum = "6706347e49b13373f7ddfafad47df7583ed52083d6fc8a594eb2c80497ef959d" dependencies = [ "combine", "crc", - "fastrand", + "fastrand 2.0.1", "hmac 0.12.1", "once_cell", "openssl", "openssl-sys", "sctp-proto", "serde", - "sha-1", + "sha-1 0.10.1", "thiserror", "tracing", ] @@ -10247,7 +13815,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc dependencies = [ "hmac 0.12.1", "pbkdf2", - "schnorrkel", + "schnorrkel 0.11.4", "sha2 0.10.8", "zeroize", ] @@ -10304,6 +13872,23 @@ dependencies = [ "tokio", ] +[[package]] +name = "substrate-state-trie-migration-rpc" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "sc-client-api", + "sc-rpc-api", + "serde", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-trie", + "trie-db", +] + [[package]] name = "substrate-test-client" version = "2.0.1" @@ -10429,9 +14014,15 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.4.1" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subtle-ng" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" [[package]] name = "syn" @@ -10518,7 +14109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand", + "fastrand 2.0.1", "rustix 0.38.31", "windows-sys 0.52.0", ] @@ -10557,6 +14148,26 @@ dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "thiserror-impl" version = "1.0.61" @@ -10593,6 +14204,30 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "thrift" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e" +dependencies = [ + "byteorder", + "integer-encoding", + "log", + "ordered-float", + "threadpool", +] + +[[package]] +name = "tikv-jemalloc-ctl" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "619bfed27d807b54f7f776b9430d4f8060e66ee138a28632ca898584d462c31c" +dependencies = [ + "libc", + "paste", + "tikv-jemalloc-sys", +] + [[package]] name = "tikv-jemalloc-sys" version = "0.5.4+5.3.0-patched" @@ -10695,6 +14330,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.12", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.14" @@ -10716,9 +14362,9 @@ dependencies = [ "futures-util", "log", "rustls 0.21.7", - "rustls-native-certs", + "rustls-native-certs 0.6.3", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tungstenite", ] @@ -10877,6 +14523,29 @@ dependencies = [ "tracing", ] +[[package]] +name = "tracing-gum" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "coarsetime", + "polkadot-primitives", + "tracing", + "tracing-gum-proc-macro", +] + +[[package]] +name = "tracing-gum-proc-macro" +version = "5.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "expander", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -11135,12 +14804,12 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "universal-hash" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" dependencies = [ "generic-array 0.14.7", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -11150,7 +14819,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -11264,6 +14933,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "waker-fn" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" + [[package]] name = "walkdir" version = "2.4.0" @@ -11289,6 +14964,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasix" +version = "0.12.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" +dependencies = [ + "wasi", +] + [[package]] name = "wasm-bindgen" version = "0.2.87" @@ -11419,6 +15103,37 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmi" +version = "0.31.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" +dependencies = [ + "smallvec", + "spin 0.9.8", + "wasmi_arena", + "wasmi_core", + "wasmparser-nostd", +] + +[[package]] +name = "wasmi_arena" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" + +[[package]] +name = "wasmi_core" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" +dependencies = [ + "downcast-rs", + "libm", + "num-traits", + "paste", +] + [[package]] name = "wasmparser" version = "0.102.0" @@ -11429,6 +15144,15 @@ dependencies = [ "url", ] +[[package]] +name = "wasmparser-nostd" +version = "0.100.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5a015fe95f3504a94bb1462c717aae75253e39b9dd6c3fb1062c934535c64aa" +dependencies = [ + "indexmap-nostd", +] + [[package]] name = "wasmtime" version = "8.0.1" @@ -11650,6 +15374,137 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "webpki-roots" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "westend-runtime" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "binary-merkle-tree", + "bitvec", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", + "frame-metadata-hash-extension", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-asset-rate", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", + "pallet-collective", + "pallet-conviction-voting", + "pallet-delegated-staking", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-elections-phragmen", + "pallet-fast-unstake", + "pallet-grandpa", + "pallet-identity", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-mmr", + "pallet-multisig", + "pallet-nomination-pools", + "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", + "pallet-offences", + "pallet-offences-benchmarking", + "pallet-preimage", + "pallet-proxy", + "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", + "pallet-scheduler", + "pallet-session", + "pallet-session-benchmarking", + "pallet-society", + "pallet-staking", + "pallet-staking-reward-curve", + "pallet-staking-runtime-api", + "pallet-state-trie-migration", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-whitelist", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", + "westend-runtime-constants", + "xcm-runtime-apis", +] + +[[package]] +name = "westend-runtime-constants" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-builder", +] + [[package]] name = "which" version = "4.4.0" @@ -12034,6 +15889,20 @@ dependencies = [ "syn 2.0.65", ] +[[package]] +name = "xcm-runtime-apis" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", +] + [[package]] name = "xml-rs" version = "0.8.20" diff --git a/Cargo.toml b/Cargo.toml index cf7d008fc8..0c0cf8a432 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ derive_more = "0.99" environmental = { version = "1.1.4", default-features = false } ethereum = { version = "0.15.0", default-features = false } ethereum-types = { version = "0.14.1", default-features = false } -evm = { version = "0.41.1", default-features = false } +evm = { git = "https://github.com/rust-ethereum/evm", branch = "v0.x", default-features = false } futures = "0.3.30" hash-db = { version = "0.16.0", default-features = false } hex = { version = "0.4.3", default-features = false, features = ["alloc"] } @@ -129,6 +129,7 @@ sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2 sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } # Substrate FRAME @@ -155,6 +156,11 @@ substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk substrate-test-runtime-client = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +# Cumulus +cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } + # XCM xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } diff --git a/client/rpc/src/eth/format.rs b/client/rpc/src/eth/format.rs index 6f85130f28..52bc43eea8 100644 --- a/client/rpc/src/eth/format.rs +++ b/client/rpc/src/eth/format.rs @@ -42,6 +42,7 @@ impl Geth { VError::InvalidChainId => "invalid chain id".into(), VError::InvalidSignature => "invalid sender".into(), VError::GasLimitTooLow => "intrinsic gas too low".into(), + VError::ProofLimitTooLow => "intrinsic proof size too low".into(), VError::GasLimitTooHigh => "exceeds block gas limit".into(), VError::GasPriceTooLow => "gas price less than block base fee".into(), VError::PriorityFeeTooHigh => { diff --git a/frame/ethereum/Cargo.toml b/frame/ethereum/Cargo.toml index 651d9f4163..1820262bad 100644 --- a/frame/ethereum/Cargo.toml +++ b/frame/ethereum/Cargo.toml @@ -21,6 +21,8 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } +# Cumulus +cumulus-primitives-storage-weight-reclaim = { workspace = true } # Frontier fp-consensus = { workspace = true } fp-ethereum = { workspace = true } @@ -49,6 +51,8 @@ std = [ "rlp/std", "scale-codec/std", "scale-info/std", + # Cumulus + "cumulus-primitives-storage-weight-reclaim/std", # Substrate "frame-support/std", "frame-system/std", diff --git a/frame/ethereum/src/lib.rs b/frame/ethereum/src/lib.rs index 848960a51a..8d6b7b0822 100644 --- a/frame/ethereum/src/lib.rs +++ b/frame/ethereum/src/lib.rs @@ -64,7 +64,8 @@ use fp_consensus::{PostLog, PreLog, FRONTIER_ENGINE_ID}; pub use fp_ethereum::TransactionData; use fp_ethereum::ValidatedTransaction as ValidatedTransactionT; use fp_evm::{ - CallOrCreateInfo, CheckEvmTransaction, CheckEvmTransactionConfig, TransactionValidationError, + CallOrCreateInfo, CheckEvmTransaction, CheckEvmTransactionConfig, TransactionPov, + TransactionValidationError, }; pub use fp_rpc::TransactionStatus; use fp_storage::{EthereumStorageSchema, PALLET_ETHEREUM_SCHEMA}; @@ -294,7 +295,6 @@ pub mod pallet { fp_consensus::find_pre_log(&frame_system::Pallet::::digest()).is_err(), "pre log already exists; block is invalid", ); - Self::apply_validated_transaction(source, transaction).map(|(post_info, _)| post_info) } } @@ -361,17 +361,14 @@ pub mod pallet { } impl Pallet { - pub fn transaction_weight(transaction_data: &TransactionData) -> (Option, Option) { - match ::GasWeightMapping::gas_to_weight( + pub fn transaction_pov(transaction_data: &TransactionData) -> Option { + let weight_limit = ::GasWeightMapping::gas_to_weight( transaction_data.gas_limit.unique_saturated_into(), true, - ) { - weight_limit if weight_limit.proof_size() > 0 => ( - Some(weight_limit), - Some(transaction_data.proof_size_base_cost()), - ), - _ => (None, None), - } + ); + cumulus_primitives_storage_weight_reclaim::get_proof_size().map( + |proof_size_pre_execution| TransactionPov::new(weight_limit, proof_size_pre_execution), + ) } fn recover_signer(transaction: &Transaction) -> Option { @@ -493,7 +490,7 @@ impl Pallet { ) -> TransactionValidity { let transaction_data: TransactionData = transaction.into(); let transaction_nonce = transaction_data.nonce; - let (weight_limit, proof_size_base_cost) = Self::transaction_weight(&transaction_data); + let transaction_pov = Self::transaction_pov(&transaction_data); let (base_fee, _) = T::FeeCalculator::min_gas_price(); let (who, _) = pallet_evm::Pallet::::account_basic(&origin); @@ -506,8 +503,7 @@ impl Pallet { is_transactional: true, }, transaction_data.clone().into(), - weight_limit, - proof_size_base_cost, + transaction_pov, ) .validate_in_pool_for(&who) .and_then(|v| v.with_chain_id()) @@ -723,7 +719,7 @@ impl Pallet { config: Option, ) -> Result<(Option, Option, CallOrCreateInfo), DispatchErrorWithPostInfo> { let transaction_data: TransactionData = transaction.into(); - let (weight_limit, proof_size_base_cost) = Self::transaction_weight(&transaction_data); + let transaction_pov = Self::transaction_pov(&transaction_data); let is_transactional = true; let validate = false; @@ -801,8 +797,7 @@ impl Pallet { access_list, is_transactional, validate, - weight_limit, - proof_size_base_cost, + transaction_pov, config.as_ref().unwrap_or_else(|| T::config()), ) { Ok(res) => res, @@ -831,8 +826,7 @@ impl Pallet { access_list, is_transactional, validate, - weight_limit, - proof_size_base_cost, + transaction_pov, config.as_ref().unwrap_or_else(|| T::config()), ) { Ok(res) => res, @@ -861,7 +855,7 @@ impl Pallet { transaction: &Transaction, ) -> Result<(), TransactionValidityError> { let transaction_data: TransactionData = transaction.into(); - let (weight_limit, proof_size_base_cost) = Self::transaction_weight(&transaction_data); + let transaction_pov = Self::transaction_pov(&transaction_data); let (base_fee, _) = T::FeeCalculator::min_gas_price(); let (who, _) = pallet_evm::Pallet::::account_basic(&origin); @@ -874,8 +868,7 @@ impl Pallet { is_transactional: true, }, transaction_data.into(), - weight_limit, - proof_size_base_cost, + transaction_pov, ) .validate_in_block_for(&who) .and_then(|v| v.with_chain_id()) @@ -989,6 +982,9 @@ pub struct InvalidTransactionWrapper(InvalidTransaction); impl From for InvalidTransactionWrapper { fn from(validation_error: TransactionValidationError) -> Self { match validation_error { + TransactionValidationError::ProofLimitTooLow => InvalidTransactionWrapper( + InvalidTransaction::Custom(TransactionValidationError::ProofLimitTooLow as u8), + ), TransactionValidationError::GasLimitTooLow => InvalidTransactionWrapper( InvalidTransaction::Custom(TransactionValidationError::GasLimitTooLow as u8), ), diff --git a/frame/ethereum/src/mock.rs b/frame/ethereum/src/mock.rs index 332549ddd0..dd9b4a032e 100644 --- a/frame/ethereum/src/mock.rs +++ b/frame/ethereum/src/mock.rs @@ -31,6 +31,7 @@ use sp_runtime::{ traits::{BlakeTwo256, Dispatchable, IdentityLookup}, AccountId32, BuildStorage, }; + // Frontier use pallet_evm::{AddressMapping, EnsureAddressTruncated, FeeCalculator}; @@ -271,36 +272,12 @@ fn address_build(seed: u8) -> AccountInfo { } } -// This function basically just builds a genesis storage key/value store according to -// our desired mockup. -pub fn new_test_ext(accounts_len: usize) -> (Vec, sp_io::TestExternalities) { - // sc_cli::init_logger(""); - let mut ext = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap(); - - let pairs = (0..accounts_len) - .map(|i| address_build(i as u8)) - .collect::>(); - - let balances: Vec<_> = (0..accounts_len) - .map(|i| (pairs[i].account_id.clone(), 10_000_000)) - .collect(); - - pallet_balances::GenesisConfig:: { balances } - .assimilate_storage(&mut ext) - .unwrap(); - - (pairs, ext.into()) -} - // This function basically just builds a genesis storage key/value store according to // our desired mockup. pub fn new_test_ext_with_initial_balance( accounts_len: usize, initial_balance: u64, ) -> (Vec, sp_io::TestExternalities) { - // sc_cli::init_logger(""); let mut ext = frame_system::GenesisConfig::::default() .build_storage() .unwrap(); @@ -320,6 +297,10 @@ pub fn new_test_ext_with_initial_balance( (pairs, ext.into()) } +pub fn new_test_ext(accounts_len: usize) -> (Vec, sp_io::TestExternalities) { + new_test_ext_with_initial_balance(accounts_len, 10_000_000) +} + pub fn contract_address(sender: H160, nonce: u64) -> H160 { let mut rlp = RlpStream::new_list(2); rlp.append(&sender); diff --git a/frame/ethereum/src/tests/eip1559.rs b/frame/ethereum/src/tests/eip1559.rs index 2dd7f7c823..51f7af0741 100644 --- a/frame/ethereum/src/tests/eip1559.rs +++ b/frame/ethereum/src/tests/eip1559.rs @@ -19,8 +19,9 @@ use super::*; use evm::{ExitReason, ExitRevert, ExitSucceed}; -use fp_ethereum::{TransactionData, ValidatedTransaction}; +use fp_ethereum::ValidatedTransaction; use frame_support::{dispatch::DispatchClass, traits::Get, weights::Weight}; +use frame_system::limits::BlockWeights; use pallet_evm::{AddressMapping, GasWeightMapping}; fn eip1559_erc20_creation_unsigned_transaction() -> EIP1559UnsignedTransaction { @@ -45,8 +46,7 @@ fn transaction_with_max_extrinsic_gas_limit_should_success_pre_dispatch() { let alice = &pairs[0]; let bob = &pairs[1]; - let limits: frame_system::limits::BlockWeights = - ::BlockWeights::get(); + let limits: BlockWeights = ::BlockWeights::get(); let max_extrinsic = limits.get(DispatchClass::Normal).max_extrinsic.unwrap(); let max_extrinsic_gas = ::GasWeightMapping::weight_to_gas(max_extrinsic); @@ -82,8 +82,7 @@ fn transaction_with_gas_limit_greater_than_max_extrinsic_should_fail_pre_dispatc let alice = &pairs[0]; let bob = &pairs[1]; - let limits: frame_system::limits::BlockWeights = - ::BlockWeights::get(); + let limits: BlockWeights = ::BlockWeights::get(); let max_extrinsic = limits.get(DispatchClass::Normal).max_extrinsic.unwrap(); let base_extrinsic = limits.get(DispatchClass::Normal).base_extrinsic; let max_extrinsic_gas = ::GasWeightMapping::weight_to_gas( @@ -552,72 +551,3 @@ fn validated_transaction_apply_zero_gas_price_works() { assert_eq!(Balances::free_balance(&substrate_bob), 1_100); }); } - -#[test] -fn proof_size_weight_limit_validation_works() { - let (pairs, mut ext) = new_test_ext(1); - let alice = &pairs[0]; - - ext.execute_with(|| { - let mut tx = EIP1559UnsignedTransaction { - nonce: U256::from(2), - max_priority_fee_per_gas: U256::zero(), - max_fee_per_gas: U256::from(1), - gas_limit: U256::from(0x100000), - action: ethereum::TransactionAction::Call(alice.address), - value: U256::from(1), - input: Vec::new(), - }; - - let gas_limit: u64 = 1_000_000; - tx.gas_limit = U256::from(gas_limit); - - let weight_limit = - ::GasWeightMapping::gas_to_weight(gas_limit, true); - - // Gas limit cannot afford the extra byte and thus is expected to exhaust. - tx.input = vec![0u8; (weight_limit.proof_size() + 1) as usize]; - let tx = tx.sign(&alice.private_key, None); - - // Execute - assert!( - Ethereum::transact(RawOrigin::EthereumTransaction(alice.address).into(), tx,).is_err() - ); - }); -} - -#[test] -fn proof_size_base_cost_should_keep_the_same_in_execution_and_estimate() { - let (pairs, mut ext) = new_test_ext(1); - let alice = &pairs[0]; - - ext.execute_with(|| { - let raw_tx = EIP1559UnsignedTransaction { - nonce: U256::zero(), - max_priority_fee_per_gas: U256::zero(), - max_fee_per_gas: U256::zero(), - gas_limit: U256::from(21_000), - action: ethereum::TransactionAction::Create, - value: U256::from(100), - input: vec![9; 100], - }; - - let tx_data: TransactionData = (&raw_tx.sign(&alice.private_key, Some(100))).into(); - let estimate_tx_data = TransactionData::new( - raw_tx.action, - raw_tx.input, - raw_tx.nonce, - raw_tx.gas_limit, - None, - Some(raw_tx.max_fee_per_gas), - Some(raw_tx.max_priority_fee_per_gas), - raw_tx.value, - Some(100), - vec![], - ); - assert_eq!( - estimate_tx_data.proof_size_base_cost(), - tx_data.proof_size_base_cost() - ); - }); -} diff --git a/frame/ethereum/src/tests/eip2930.rs b/frame/ethereum/src/tests/eip2930.rs index 4cb6a13c4d..4bdf53a1af 100644 --- a/frame/ethereum/src/tests/eip2930.rs +++ b/frame/ethereum/src/tests/eip2930.rs @@ -19,7 +19,7 @@ use super::*; use evm::{ExitReason, ExitRevert, ExitSucceed}; -use fp_ethereum::{TransactionData, ValidatedTransaction}; +use fp_ethereum::ValidatedTransaction; use frame_support::{ dispatch::{DispatchClass, GetDispatchInfo}, weights::Weight, @@ -477,72 +477,3 @@ fn validated_transaction_apply_zero_gas_price_works() { assert_eq!(Balances::free_balance(&substrate_bob), 1_100); }); } - -#[test] -fn proof_size_weight_limit_validation_works() { - use pallet_evm::GasWeightMapping; - - let (pairs, mut ext) = new_test_ext(1); - let alice = &pairs[0]; - - ext.execute_with(|| { - let mut tx = EIP2930UnsignedTransaction { - nonce: U256::from(2), - gas_price: U256::from(1), - gas_limit: U256::from(0x100000), - action: ethereum::TransactionAction::Call(alice.address), - value: U256::from(1), - input: Vec::new(), - }; - - let gas_limit: u64 = 1_000_000; - tx.gas_limit = U256::from(gas_limit); - - let weight_limit = - ::GasWeightMapping::gas_to_weight(gas_limit, true); - - // Gas limit cannot afford the extra byte and thus is expected to exhaust. - tx.input = vec![0u8; (weight_limit.proof_size() + 1) as usize]; - let tx = tx.sign(&alice.private_key, None); - - // Execute - assert!( - Ethereum::transact(RawOrigin::EthereumTransaction(alice.address).into(), tx,).is_err() - ); - }); -} - -#[test] -fn proof_size_base_cost_should_keep_the_same_in_execution_and_estimate() { - let (pairs, mut ext) = new_test_ext(1); - let alice = &pairs[0]; - - ext.execute_with(|| { - let raw_tx = EIP2930UnsignedTransaction { - nonce: U256::zero(), - gas_price: U256::zero(), - gas_limit: U256::from(21_000), - action: ethereum::TransactionAction::Create, - value: U256::from(100), - input: vec![9; 100], - }; - - let tx_data: TransactionData = (&raw_tx.sign(&alice.private_key, Some(100))).into(); - let estimate_tx_data = TransactionData::new( - raw_tx.action, - raw_tx.input, - raw_tx.nonce, - raw_tx.gas_limit, - Some(raw_tx.gas_price), - None, - None, - raw_tx.value, - Some(100), - vec![], - ); - assert_eq!( - estimate_tx_data.proof_size_base_cost(), - tx_data.proof_size_base_cost() - ); - }); -} diff --git a/frame/ethereum/src/tests/legacy.rs b/frame/ethereum/src/tests/legacy.rs index e90d6cb092..9f2b4f6d71 100644 --- a/frame/ethereum/src/tests/legacy.rs +++ b/frame/ethereum/src/tests/legacy.rs @@ -19,7 +19,7 @@ use super::*; use evm::{ExitReason, ExitRevert, ExitSucceed}; -use fp_ethereum::{TransactionData, ValidatedTransaction}; +use fp_ethereum::ValidatedTransaction; use frame_support::{ dispatch::{DispatchClass, GetDispatchInfo}, weights::Weight, @@ -477,72 +477,3 @@ fn validated_transaction_apply_zero_gas_price_works() { assert_eq!(Balances::free_balance(&substrate_bob), 1_100); }); } - -#[test] -fn proof_size_weight_limit_validation_works() { - use pallet_evm::GasWeightMapping; - - let (pairs, mut ext) = new_test_ext(1); - let alice = &pairs[0]; - - ext.execute_with(|| { - let mut tx = LegacyUnsignedTransaction { - nonce: U256::from(2), - gas_price: U256::from(1), - gas_limit: U256::from(0x100000), - action: ethereum::TransactionAction::Call(alice.address), - value: U256::from(1), - input: Vec::new(), - }; - - let gas_limit: u64 = 1_000_000; - tx.gas_limit = U256::from(gas_limit); - - let weight_limit = - ::GasWeightMapping::gas_to_weight(gas_limit, true); - - // Gas limit cannot afford the extra byte and thus is expected to exhaust. - tx.input = vec![0u8; (weight_limit.proof_size() + 1) as usize]; - let tx = tx.sign(&alice.private_key); - - // Execute - assert!( - Ethereum::transact(RawOrigin::EthereumTransaction(alice.address).into(), tx,).is_err() - ); - }); -} - -#[test] -fn proof_size_base_cost_should_keep_the_same_in_execution_and_estimate() { - let (pairs, mut ext) = new_test_ext(1); - let alice = &pairs[0]; - - ext.execute_with(|| { - let raw_tx = LegacyUnsignedTransaction { - nonce: U256::zero(), - gas_price: U256::zero(), - gas_limit: U256::from(21_000), - action: ethereum::TransactionAction::Create, - value: U256::from(100), - input: vec![9; 100], - }; - - let tx_data: TransactionData = (&raw_tx.sign(&alice.private_key)).into(); - let estimate_tx_data = TransactionData::new( - raw_tx.action, - raw_tx.input, - raw_tx.nonce, - raw_tx.gas_limit, - Some(raw_tx.gas_price), - None, - None, - raw_tx.value, - Some(100), - vec![], - ); - assert_eq!( - estimate_tx_data.proof_size_base_cost(), - tx_data.proof_size_base_cost() - ); - }); -} diff --git a/frame/evm/Cargo.toml b/frame/evm/Cargo.toml index a5ee70e2b0..bea8ec6d37 100644 --- a/frame/evm/Cargo.toml +++ b/frame/evm/Cargo.toml @@ -37,6 +37,10 @@ hex = { workspace = true } pallet-balances = { workspace = true, features = ["default", "insecure_zero_ed"] } pallet-evm-precompile-simple = { workspace = true, features = ["default"] } pallet-timestamp = { workspace = true, features = ["default"] } +sp-state-machine = { workspace = true } +sp-trie = { workspace = true, features = ["default"] } +# Cumulus +cumulus-primitives-storage-weight-reclaim = { workspace = true } [features] default = ["std"] diff --git a/frame/evm/precompile/storage-cleaner/Cargo.toml b/frame/evm/precompile/storage-cleaner/Cargo.toml index 7f940c740b..3499013f3e 100644 --- a/frame/evm/precompile/storage-cleaner/Cargo.toml +++ b/frame/evm/precompile/storage-cleaner/Cargo.toml @@ -8,6 +8,7 @@ edition = { workspace = true } repository = { workspace = true } [dependencies] +log = { workspace = true } scale-codec = { package = "parity-scale-codec", workspace = true } # Substrate frame-support = { workspace = true } @@ -37,6 +38,7 @@ precompile-utils = { workspace = true, features = ["std", "testing"] } [features] default = ["std"] std = [ + "log/std", "scale-codec/std", # Substrate "frame-support/std", diff --git a/frame/evm/precompile/storage-cleaner/src/lib.rs b/frame/evm/precompile/storage-cleaner/src/lib.rs index e294b765e7..389f45bf33 100644 --- a/frame/evm/precompile/storage-cleaner/src/lib.rs +++ b/frame/evm/precompile/storage-cleaner/src/lib.rs @@ -23,7 +23,6 @@ extern crate alloc; use alloc::vec::Vec; use core::marker::PhantomData; -use fp_evm::{PrecompileFailure, ACCOUNT_BASIC_PROOF_SIZE, ACCOUNT_STORAGE_PROOF_SIZE}; use pallet_evm::AddressMapping; use precompile_utils::{prelude::*, EvmResult}; use sp_core::H160; @@ -36,8 +35,6 @@ mod tests; pub const ARRAY_LIMIT: u32 = 1_000; type GetArrayLimit = ConstU32; -// Storage key for suicided contracts: Blake2_128(16) + Key (H160(20)) -pub const SUICIDED_STORAGE_KEY: u64 = 36; #[derive(Debug, Clone)] pub struct StorageCleanerPrecompile(PhantomData); @@ -48,37 +45,20 @@ where Runtime: pallet_evm::Config, { /// Clear Storage entries of smart contracts that has been marked as suicided (self-destructed). It takes a list of - /// addresses and a limit as input. The limit is used to prevent the function from consuming too much gas. The - /// maximum number of storage entries that can be removed is limit - 1. + /// addresses and a limit as input. The limit is used to prevent the function from consuming too much gas. #[precompile::public("clearSuicidedStorage(address[],uint64)")] fn clear_suicided_storage( - handle: &mut impl PrecompileHandle, + _handle: &mut impl PrecompileHandle, addresses: BoundedVec, limit: u64, ) -> EvmResult { - let addresses: Vec<_> = addresses.into(); - let nb_addresses = addresses.len() as u64; if limit == 0 { return Err(revert("Limit should be greater than zero")); } - - Self::record_max_cost(handle, nb_addresses, limit)?; - let result = Self::clear_suicided_storage_inner(addresses, limit - 1)?; - Self::refund_cost(handle, result, nb_addresses, limit); - - Ok(()) - } - - /// This function iterates over the addresses, checks if each address is marked as suicided, and then deletes the storage - /// entries associated with that address. If there are no remaining entries, we clear the suicided contract by calling the - /// `clear_suicided_contract` function. - fn clear_suicided_storage_inner( - addresses: Vec
, - limit: u64, - ) -> Result { let mut deleted_entries = 0u64; let mut deleted_contracts = 0u64; + let addresses: Vec<_> = addresses.into(); for Address(address) in addresses { if !pallet_evm::Pallet::::is_account_suicided(&address) { return Err(revert(alloc::format!("NotSuicided: {}", address))); @@ -89,7 +69,7 @@ where .count(); deleted_entries = deleted_entries.saturating_add(deleted as u64); - // Check if the storage of this contract has been completly removed + // Check if the storage of this contract has been completely removed if pallet_evm::AccountStorages::::iter_key_prefix(address) .next() .is_none() @@ -102,96 +82,11 @@ where break; } } + log::info!(target: "evm", "The storage cleaner removed {} entries and {} contracts", deleted_entries, deleted_contracts); - Ok(RemovalResult { - deleted_entries, - deleted_contracts, - }) - } - - /// Record the maximum cost (Worst case Scenario) of the clear_suicided_storage function. - fn record_max_cost( - handle: &mut impl PrecompileHandle, - nb_addresses: u64, - limit: u64, - ) -> EvmResult { - let read_cost = RuntimeHelper::::db_read_gas_cost(); - let write_cost = RuntimeHelper::::db_write_gas_cost(); - let ref_time = 0u64 - // EVM:: Suicided (reads = nb_addresses) - .saturating_add(read_cost.saturating_mul(nb_addresses)) - // EVM:: Suicided (writes = nb_addresses) - .saturating_add(write_cost.saturating_mul(nb_addresses)) - // System: AccountInfo (reads = nb_addresses) for decrementing sufficients - .saturating_add(read_cost.saturating_mul(nb_addresses)) - // System: AccountInfo (writes = nb_addresses) for decrementing sufficients - .saturating_add(write_cost.saturating_mul(nb_addresses)) - // EVM: AccountStorage (reads = limit) - .saturating_add(read_cost.saturating_mul(limit)) - // EVM: AccountStorage (writes = limit) - .saturating_add(write_cost.saturating_mul(limit)); - - let proof_size = 0u64 - // Proof: EVM::Suicided (SUICIDED_STORAGE_KEY) * nb_addresses - .saturating_add(SUICIDED_STORAGE_KEY.saturating_mul(nb_addresses)) - // Proof: EVM::AccountStorage (ACCOUNT_BASIC_PROOF_SIZE) * limit - .saturating_add(ACCOUNT_STORAGE_PROOF_SIZE.saturating_mul(limit)) - // Proof: System::AccountInfo (ACCOUNT_BASIC_PROOF_SIZE) * nb_addresses - .saturating_add(ACCOUNT_BASIC_PROOF_SIZE.saturating_mul(nb_addresses)); - - handle.record_external_cost(Some(ref_time), Some(proof_size), None)?; Ok(()) } - /// Refund the additional cost recorded for the clear_suicided_storage function. - fn refund_cost( - handle: &mut impl PrecompileHandle, - result: RemovalResult, - nb_addresses: u64, - limit: u64, - ) { - let read_cost = RuntimeHelper::::db_read_gas_cost(); - let write_cost = RuntimeHelper::::db_write_gas_cost(); - - let extra_entries = limit.saturating_sub(result.deleted_entries); - let extra_contracts = nb_addresses.saturating_sub(result.deleted_contracts); - - let mut ref_time = 0u64; - let mut proof_size = 0u64; - - // Refund the cost of the remaining entries - if extra_entries > 0 { - ref_time = ref_time - // EVM:: AccountStorage (reads = extra_entries) - .saturating_add(read_cost.saturating_mul(extra_entries)) - // EVM:: AccountStorage (writes = extra_entries) - .saturating_add(write_cost.saturating_mul(extra_entries)); - proof_size = proof_size - // Proof: EVM::AccountStorage (ACCOUNT_BASIC_PROOF_SIZE) * extra_entries - .saturating_add(ACCOUNT_STORAGE_PROOF_SIZE.saturating_mul(extra_entries)); - } - - // Refund the cost of the remaining contracts - if extra_contracts > 0 { - ref_time = ref_time - // EVM:: Suicided (reads = extra_contracts) - .saturating_add(read_cost.saturating_mul(extra_contracts)) - // EVM:: Suicided (writes = extra_contracts) - .saturating_add(write_cost.saturating_mul(extra_contracts)) - // System: AccountInfo (reads = extra_contracts) for decrementing sufficients - .saturating_add(read_cost.saturating_mul(extra_contracts)) - // System: AccountInfo (writes = extra_contracts) for decrementing sufficients - .saturating_add(write_cost.saturating_mul(extra_contracts)); - proof_size = proof_size - // Proof: EVM::Suicided (SUICIDED_STORAGE_KEY) * extra_contracts - .saturating_add(SUICIDED_STORAGE_KEY.saturating_mul(extra_contracts)) - // Proof: System::AccountInfo (ACCOUNT_BASIC_PROOF_SIZE) * extra_contracts - .saturating_add(ACCOUNT_BASIC_PROOF_SIZE.saturating_mul(extra_contracts)); - } - - handle.refund_external_cost(Some(ref_time), Some(proof_size)); - } - /// Clears the storage of a suicided contract. /// /// This function will remove the given address from the list of suicided contracts @@ -203,8 +98,3 @@ where let _ = frame_system::Pallet::::dec_sufficients(&account_id); } } - -struct RemovalResult { - pub deleted_entries: u64, - pub deleted_contracts: u64, -} diff --git a/frame/evm/precompile/storage-cleaner/src/tests.rs b/frame/evm/precompile/storage-cleaner/src/tests.rs index facf88d6c3..8884644b81 100644 --- a/frame/evm/precompile/storage-cleaner/src/tests.rs +++ b/frame/evm/precompile/storage-cleaner/src/tests.rs @@ -295,7 +295,7 @@ fn test_clear_suicided_contract_limit_works() { assert_eq!( pallet_evm::AccountStorages::::iter_prefix(addresses[1].0).count(), - 3 + 2 ); assert!(pallet_evm::Suicided::::contains_key( @@ -310,7 +310,7 @@ fn test_clear_suicided_contract_limit_respected() { .with_balances(vec![(Alice.into(), 10000000000000000000)]) .build() .execute_with(|| { - let suicided_address = mock_contracts([5])[0].0; + let suicided_address = mock_contracts([6])[0].0; // Add contract to the suicided contracts pallet_evm::Suicided::::insert(suicided_address, ()); diff --git a/frame/evm/src/lib.rs b/frame/evm/src/lib.rs index 81de8a366a..f0ff4f52d9 100644 --- a/frame/evm/src/lib.rs +++ b/frame/evm/src/lib.rs @@ -59,12 +59,12 @@ extern crate alloc; #[cfg(feature = "runtime-benchmarks")] pub mod benchmarking; - #[cfg(test)] mod mock; -pub mod runner; #[cfg(test)] mod tests; + +pub mod runner; pub mod weights; use alloc::{collections::btree_map::BTreeMap, vec::Vec}; @@ -246,7 +246,6 @@ pub mod pallet { is_transactional, validate, None, - None, T::config(), ) { Ok(info) => info, @@ -321,7 +320,6 @@ pub mod pallet { is_transactional, validate, None, - None, T::config(), ) { Ok(info) => info, @@ -409,7 +407,6 @@ pub mod pallet { is_transactional, validate, None, - None, T::config(), ) { Ok(info) => info, @@ -504,6 +501,8 @@ pub mod pallet { Reentrancy, /// EIP-3607, TransactionMustComeFromEOA, + /// Proof size limit is too low + ProofLimitTooLow, /// Undefined error. Undefined, } @@ -521,6 +520,7 @@ pub mod pallet { TransactionValidationError::InvalidFeeInput => Error::::GasPriceTooLow, TransactionValidationError::InvalidChainId => Error::::InvalidChainId, TransactionValidationError::InvalidSignature => Error::::InvalidSignature, + TransactionValidationError::ProofLimitTooLow => Error::::ProofLimitTooLow, TransactionValidationError::UnknownError => Error::::Undefined, } } diff --git a/frame/evm/src/mock.rs b/frame/evm/src/mock.rs index ab98820f11..f0ff1f4e67 100644 --- a/frame/evm/src/mock.rs +++ b/frame/evm/src/mock.rs @@ -18,6 +18,7 @@ //! Test mock for unit tests and benchmarking use core::str::FromStr; +// Substrate use frame_support::{ derive_impl, parameter_types, traits::{ConstU32, FindAuthor}, diff --git a/frame/evm/src/runner/mod.rs b/frame/evm/src/runner/mod.rs index 45ed14299e..7614c205b2 100644 --- a/frame/evm/src/runner/mod.rs +++ b/frame/evm/src/runner/mod.rs @@ -17,19 +17,17 @@ pub mod stack; -use crate::{Config, Weight}; use alloc::vec::Vec; -use fp_evm::{CallInfo, CreateInfo}; +// Substrate use sp_core::{H160, H256, U256}; +use sp_runtime::DispatchError; +// Frontier +use fp_evm::{CallInfo, CreateInfo, TransactionPov}; -#[derive(Debug)] -pub struct RunnerError> { - pub error: E, - pub weight: Weight, -} +use crate::{Config, Weight}; pub trait Runner { - type Error: Into; + type Error: Into; fn validate( source: H160, @@ -42,8 +40,7 @@ pub trait Runner { nonce: Option, access_list: Vec<(H160, Vec)>, is_transactional: bool, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, evm_config: &evm::Config, ) -> Result<(), RunnerError>; @@ -59,8 +56,7 @@ pub trait Runner { access_list: Vec<(H160, Vec)>, is_transactional: bool, validate: bool, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, config: &evm::Config, ) -> Result>; @@ -75,8 +71,7 @@ pub trait Runner { access_list: Vec<(H160, Vec)>, is_transactional: bool, validate: bool, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, config: &evm::Config, ) -> Result>; @@ -92,8 +87,13 @@ pub trait Runner { access_list: Vec<(H160, Vec)>, is_transactional: bool, validate: bool, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, config: &evm::Config, ) -> Result>; } + +#[derive(Debug, PartialEq)] +pub struct RunnerError { + pub error: E, + pub weight: Weight, +} diff --git a/frame/evm/src/runner/stack.rs b/frame/evm/src/runner/stack.rs index 0707159cd2..ca0f0d2dce 100644 --- a/frame/evm/src/runner/stack.rs +++ b/frame/evm/src/runner/stack.rs @@ -26,8 +26,8 @@ use core::{marker::PhantomData, mem}; use evm::{ backend::Backend as BackendT, executor::stack::{Accessed, StackExecutor, StackState as StackStateT, StackSubstateMetadata}, - gasometer::{GasCost, StorageTarget}, - ExitError, ExitReason, ExternalOperation, Opcode, Transfer, + gasometer::GasCost, + ExitError, ExitReason, Opcode, Transfer, }; // Substrate use frame_support::{ @@ -41,15 +41,14 @@ use sp_core::{H160, H256, U256}; use sp_runtime::traits::UniqueSaturatedInto; // Frontier use fp_evm::{ - AccessedStorage, CallInfo, CreateInfo, ExecutionInfoV2, IsPrecompileResult, Log, PrecompileSet, - Vicinity, WeightInfo, ACCOUNT_BASIC_PROOF_SIZE, ACCOUNT_CODES_METADATA_PROOF_SIZE, - ACCOUNT_STORAGE_PROOF_SIZE, IS_EMPTY_CHECK_PROOF_SIZE, WRITE_PROOF_SIZE, + CallInfo, CreateInfo, ExecutionInfoV2, IsPrecompileResult, Log, PrecompileSet, TransactionPov, + Vicinity, WeightInfo, }; use crate::{ - runner::Runner as RunnerT, AccountCodes, AccountCodesMetadata, AccountStorages, AddressMapping, - BalanceOf, BlockHashMapping, Config, Error, Event, FeeCalculator, OnChargeEVMTransaction, - OnCreate, Pallet, RunnerError, + runner::Runner as RunnerT, AccountCodes, AccountStorages, AddressMapping, BalanceOf, + BlockHashMapping, Config, Error, Event, FeeCalculator, OnChargeEVMTransaction, OnCreate, + Pallet, RunnerError, }; #[cfg(feature = "forbid-evm-reentrancy")] @@ -75,8 +74,7 @@ where config: &'config evm::Config, precompiles: &'precompiles T::PrecompilesType, is_transactional: bool, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, f: F, ) -> Result, RunnerError>> where @@ -112,8 +110,7 @@ where f, base_fee, weight, - weight_limit, - proof_size_base_cost, + transaction_pov, ); // Set IN_EVM to false @@ -137,8 +134,7 @@ where f: F, base_fee: U256, weight: Weight, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, ) -> Result, RunnerError>> where F: FnOnce( @@ -151,14 +147,6 @@ where ) -> (ExitReason, R), R: Default, { - // Used to record the external costs in the evm through the StackState implementation - let maybe_weight_info = - WeightInfo::new_from_weight_limit(weight_limit, proof_size_base_cost).map_err( - |_| RunnerError { - error: Error::::GasLimitTooLow, - weight, - }, - )?; // The precompile check is only used for transactional invocations. However, here we always // execute the check, because the check has side effects. match precompiles.is_precompile(source, gas_limit) { @@ -173,7 +161,7 @@ where standard: gas_limit.into(), effective: gas_limit.into(), }, - weight_info: maybe_weight_info, + weight_info: None, logs: Default::default(), }) } @@ -228,9 +216,8 @@ where error: Error::::FeeOverflow, weight, })?; - // Deduct fee from the `source` account. Returns `None` if `total_fee` is Zero. - let fee = T::OnChargeTransaction::withdraw_fee(&source, total_fee) + let pre_fee = T::OnChargeTransaction::withdraw_fee(&source, total_fee) .map_err(|e| RunnerError { error: e, weight })?; // Execute the EVM call. @@ -238,42 +225,28 @@ where gas_price: base_fee, origin: source, }; - let metadata = StackSubstateMetadata::new(gas_limit, config); - let state = SubstrateStackState::new(&vicinity, metadata, maybe_weight_info); + let state = SubstrateStackState::new(&vicinity, metadata, transaction_pov); let mut executor = StackExecutor::new_with_precompiles(state, config, precompiles); - let (reason, retv) = f(&mut executor); // Post execution. - let used_gas = executor.used_gas(); - let effective_gas = match executor.state().weight_info() { - Some(weight_info) => U256::from(core::cmp::max( - used_gas, - weight_info - .proof_size_usage - .unwrap_or_default() - .saturating_mul(T::GasLimitPovSizeRatio::get()), - )), - _ => used_gas.into(), - }; - let actual_fee = effective_gas.saturating_mul(total_fee_per_gas); - let actual_base_fee = effective_gas.saturating_mul(base_fee); + let opcode_used_gas = executor.used_gas(); + let proof_size_used_gas = transaction_pov.map_or(0, |pov| { + pov.proof_size_used() + .saturating_mul(T::GasLimitPovSizeRatio::get()) + }); + let used_gas = U256::from(core::cmp::max(opcode_used_gas, proof_size_used_gas)); + + let fee = used_gas.saturating_mul(total_fee_per_gas); + let base_fee = used_gas.saturating_mul(base_fee); log::debug!( target: "evm", - "Execution {:?} [source: {:?}, value: {}, gas_limit: {}, actual_fee: {}, used_gas: {}, effective_gas: {}, base_fee: {}, total_fee_per_gas: {}, is_transactional: {}]", - reason, - source, - value, - gas_limit, - actual_fee, - used_gas, - effective_gas, - base_fee, - total_fee_per_gas, - is_transactional + "Execution {:?} [source: {:?}, value: {}, opcode_used_gas: {}, proof_size_used_gas: {}, used_gas: {}, fee: {}, base_fee: {}, total_fee_per_gas: {}, is_transactional: {}]", + reason, source, value, opcode_used_gas, proof_size_used_gas, used_gas, fee, base_fee, total_fee_per_gas, is_transactional ); + // The difference between initially withdrawn and the actual cost is refunded. // // Considered the following request: @@ -295,16 +268,9 @@ where // Refunded 200 - 40 = 160. // Tip 5 * 6 = 30. // Burned 200 - (160 + 30) = 10. Which is equivalent to gas_used * base_fee. - let actual_priority_fee = T::OnChargeTransaction::correct_and_deposit_fee( - &source, - // Actual fee after evm execution, including tip. - actual_fee, - // Base fee. - actual_base_fee, - // Fee initially withdrawn. - fee, - ); - T::OnChargeTransaction::pay_priority_fee(actual_priority_fee); + let priority_fee = + T::OnChargeTransaction::correct_and_deposit_fee(&source, fee, base_fee, pre_fee); + T::OnChargeTransaction::pay_priority_fee(priority_fee); let state = executor.into_state(); @@ -340,10 +306,10 @@ where value: retv, exit_reason: reason, used_gas: fp_evm::UsedGas { - standard: used_gas.into(), - effective: effective_gas, + standard: opcode_used_gas.into(), + effective: used_gas, }, - weight_info: state.weight_info(), + weight_info: transaction_pov.map(WeightInfo::from_transaction_pov), logs: state.substate.logs, }) } @@ -366,8 +332,7 @@ where nonce: Option, access_list: Vec<(H160, Vec)>, is_transactional: bool, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, evm_config: &evm::Config, ) -> Result<(), RunnerError> { let (base_fee, mut weight) = T::FeeCalculator::min_gas_price(); @@ -394,8 +359,7 @@ where value, access_list, }, - weight_limit, - proof_size_base_cost, + transaction_pov, ) .validate_in_block_for(&source_account) .and_then(|v| v.with_base_fee()) @@ -416,8 +380,7 @@ where access_list: Vec<(H160, Vec)>, is_transactional: bool, validate: bool, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, config: &evm::Config, ) -> Result> { if validate { @@ -432,8 +395,7 @@ where nonce, access_list.clone(), is_transactional, - weight_limit, - proof_size_base_cost, + transaction_pov, config, )?; } @@ -447,8 +409,7 @@ where config, &precompiles, is_transactional, - weight_limit, - proof_size_base_cost, + transaction_pov, |executor| executor.transact_call(source, target, value, input, gas_limit, access_list), ) } @@ -464,8 +425,7 @@ where access_list: Vec<(H160, Vec)>, is_transactional: bool, validate: bool, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, config: &evm::Config, ) -> Result> { if validate { @@ -480,8 +440,7 @@ where nonce, access_list.clone(), is_transactional, - weight_limit, - proof_size_base_cost, + transaction_pov, config, )?; } @@ -495,8 +454,7 @@ where config, &precompiles, is_transactional, - weight_limit, - proof_size_base_cost, + transaction_pov, |executor| { let address = executor.create_address(evm::CreateScheme::Legacy { caller: source }); T::OnCreate::on_create(source, address); @@ -519,8 +477,7 @@ where access_list: Vec<(H160, Vec)>, is_transactional: bool, validate: bool, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, config: &evm::Config, ) -> Result> { if validate { @@ -535,8 +492,7 @@ where nonce, access_list.clone(), is_transactional, - weight_limit, - proof_size_base_cost, + transaction_pov, config, )?; } @@ -551,8 +507,7 @@ where config, &precompiles, is_transactional, - weight_limit, - proof_size_base_cost, + transaction_pov, |executor| { let address = executor.create_address(evm::CreateScheme::Create2 { caller: source, @@ -665,19 +620,12 @@ impl<'config> SubstrateStackSubstate<'config> { } } -#[derive(Default, Clone, Eq, PartialEq)] -pub struct Recorded { - account_codes: Vec, - account_storages: BTreeMap<(H160, H256), bool>, -} - /// Substrate backend for EVM. pub struct SubstrateStackState<'vicinity, 'config, T> { vicinity: &'vicinity Vicinity, substate: SubstrateStackSubstate<'config>, original_storage: BTreeMap<(H160, H256), H256>, - recorded: Recorded, - weight_info: Option, + transaction_pov: Option, _marker: PhantomData, } @@ -686,7 +634,7 @@ impl<'vicinity, 'config, T: Config> SubstrateStackState<'vicinity, 'config, T> { pub fn new( vicinity: &'vicinity Vicinity, metadata: StackSubstateMetadata<'config>, - weight_info: Option, + transaction_pov: Option, ) -> Self { Self { vicinity, @@ -696,24 +644,11 @@ impl<'vicinity, 'config, T: Config> SubstrateStackState<'vicinity, 'config, T> { logs: Vec::new(), parent: None, }, - _marker: PhantomData, original_storage: BTreeMap::new(), - recorded: Default::default(), - weight_info, + transaction_pov, + _marker: PhantomData, } } - - pub fn weight_info(&self) -> Option { - self.weight_info - } - - pub fn recorded(&self) -> &Recorded { - &self.recorded - } - - pub fn info_mut(&mut self) -> (&mut Option, &mut Recorded) { - (&mut self.weight_info, &mut self.recorded) - } } impl<'vicinity, 'config, T: Config> BackendT for SubstrateStackState<'vicinity, 'config, T> @@ -819,7 +754,15 @@ where } fn exit_commit(&mut self) -> Result<(), ExitError> { - self.substate.exit_commit() + // For the parachains, it's essential to consider storage proof as the weight does. + // The consumed storage proof size utilizes the underlying host function. Return out of gas if the transaction requires too much storage proof. + match self.transaction_pov { + Some(pov) if pov.proof_size_used() > pov.weight_limit.proof_size() => { + self.substate.exit_discard()?; + Err(ExitError::OutOfGas) + } + _ => self.substate.exit_commit(), + } } fn exit_revert(&mut self) -> Result<(), ExitError> { @@ -949,221 +892,29 @@ where >::account_code_metadata(address).hash } - fn record_external_operation(&mut self, op: evm::ExternalOperation) -> Result<(), ExitError> { - let size_limit: u64 = self - .metadata() - .gasometer() - .config() - .create_contract_limit - .unwrap_or_default() as u64; - let (weight_info, recorded) = self.info_mut(); - - if let Some(weight_info) = weight_info { - match op { - ExternalOperation::AccountBasicRead => { - weight_info.try_record_proof_size_or_fail(ACCOUNT_BASIC_PROOF_SIZE)? - } - ExternalOperation::AddressCodeRead(address) => { - let maybe_record = !recorded.account_codes.contains(&address); - // Skip if the address has been already recorded this block - if maybe_record { - // First we record account emptiness check. - // Transfers to EOAs with standard 21_000 gas limit are able to - // pay for this pov size. - weight_info.try_record_proof_size_or_fail(IS_EMPTY_CHECK_PROOF_SIZE)?; - if >::decode_len(address).unwrap_or(0) == 0 { - return Ok(()); - } - - weight_info - .try_record_proof_size_or_fail(ACCOUNT_CODES_METADATA_PROOF_SIZE)?; - if let Some(meta) = >::get(address) { - weight_info.try_record_proof_size_or_fail(meta.size)?; - } else if let Some(remaining_proof_size) = - weight_info.remaining_proof_size() - { - let pre_size = remaining_proof_size.min(size_limit); - weight_info.try_record_proof_size_or_fail(pre_size)?; - - let actual_size = Pallet::::account_code_metadata(address).size; - if actual_size > pre_size { - return Err(ExitError::OutOfGas); - } - // Refund unused proof size - weight_info.refund_proof_size(pre_size.saturating_sub(actual_size)); - } - recorded.account_codes.push(address); - } - } - ExternalOperation::IsEmpty => { - weight_info.try_record_proof_size_or_fail(IS_EMPTY_CHECK_PROOF_SIZE)? - } - ExternalOperation::Write(_) => { - weight_info.try_record_proof_size_or_fail(WRITE_PROOF_SIZE)? - } - }; - } + fn record_external_operation(&mut self, _op: evm::ExternalOperation) -> Result<(), ExitError> { Ok(()) } fn record_external_dynamic_opcode_cost( &mut self, - opcode: Opcode, + _opcode: Opcode, _gas_cost: GasCost, - target: evm::gasometer::StorageTarget, + _target: evm::gasometer::StorageTarget, ) -> Result<(), ExitError> { - // If account code or storage slot is in the overlay it is already accounted for and early exit - let accessed_storage: Option = match target { - StorageTarget::Address(address) => { - if self.recorded().account_codes.contains(&address) { - return Ok(()); - } else { - Some(AccessedStorage::AccountCodes(address)) - } - } - StorageTarget::Slot(address, index) => { - if self - .recorded() - .account_storages - .contains_key(&(address, index)) - { - return Ok(()); - } else { - Some(AccessedStorage::AccountStorages((address, index))) - } - } - _ => None, - }; - - let size_limit: u64 = self - .metadata() - .gasometer() - .config() - .create_contract_limit - .unwrap_or_default() as u64; - let (weight_info, recorded) = self.info_mut(); - - if let Some(weight_info) = weight_info { - // proof_size_limit is None indicates no need to record proof size, return directly. - if weight_info.proof_size_limit.is_none() { - return Ok(()); - }; - - let mut record_account_codes_proof_size = - |address: H160, empty_check: bool| -> Result<(), ExitError> { - let mut base_size = ACCOUNT_CODES_METADATA_PROOF_SIZE; - if empty_check { - base_size = base_size.saturating_add(IS_EMPTY_CHECK_PROOF_SIZE); - } - weight_info.try_record_proof_size_or_fail(base_size)?; - - if let Some(meta) = >::get(address) { - weight_info.try_record_proof_size_or_fail(meta.size)?; - } else if let Some(remaining_proof_size) = weight_info.remaining_proof_size() { - let pre_size = remaining_proof_size.min(size_limit); - weight_info.try_record_proof_size_or_fail(pre_size)?; - - let actual_size = Pallet::::account_code_metadata(address).size; - if actual_size > pre_size { - return Err(ExitError::OutOfGas); - } - // Refund unused proof size - weight_info.refund_proof_size(pre_size.saturating_sub(actual_size)); - } - - Ok(()) - }; - - // Proof size is fixed length for writes (a 32-byte hash in a merkle trie), and - // the full key/value for reads. For read and writes over the same storage, the full value - // is included. - // For cold reads involving code (call, callcode, staticcall and delegatecall): - // - We depend on https://github.com/paritytech/frontier/pull/893 - // - Try to get the cached size or compute it on the fly - // - We record the actual size after caching, refunding the difference between it and the initially deducted - // contract size limit. - match opcode { - Opcode::BALANCE => { - weight_info.try_record_proof_size_or_fail(ACCOUNT_BASIC_PROOF_SIZE)?; - } - Opcode::EXTCODESIZE | Opcode::EXTCODECOPY | Opcode::EXTCODEHASH => { - if let Some(AccessedStorage::AccountCodes(address)) = accessed_storage { - record_account_codes_proof_size(address, false)?; - recorded.account_codes.push(address); - } - } - Opcode::CALLCODE | Opcode::CALL | Opcode::DELEGATECALL | Opcode::STATICCALL => { - if let Some(AccessedStorage::AccountCodes(address)) = accessed_storage { - record_account_codes_proof_size(address, true)?; - recorded.account_codes.push(address); - } - } - Opcode::SLOAD => { - if let Some(AccessedStorage::AccountStorages((address, index))) = - accessed_storage - { - weight_info.try_record_proof_size_or_fail(ACCOUNT_STORAGE_PROOF_SIZE)?; - recorded.account_storages.insert((address, index), true); - } - } - Opcode::SSTORE => { - if let Some(AccessedStorage::AccountStorages((address, index))) = - accessed_storage - { - let size = WRITE_PROOF_SIZE.saturating_add(ACCOUNT_STORAGE_PROOF_SIZE); - weight_info.try_record_proof_size_or_fail(size)?; - recorded.account_storages.insert((address, index), true); - } - } - Opcode::CREATE | Opcode::CREATE2 => { - weight_info.try_record_proof_size_or_fail(WRITE_PROOF_SIZE)?; - } - // When calling SUICIDE a target account will receive the self destructing - // address's balance. We need to account for both: - // - Target basic account read - // - 5 bytes of `decode_len` - Opcode::SUICIDE => { - weight_info.try_record_proof_size_or_fail(IS_EMPTY_CHECK_PROOF_SIZE)?; - } - // Rest of dynamic opcodes that do not involve proof size recording, do nothing - _ => return Ok(()), - }; - } - Ok(()) } fn record_external_cost( &mut self, - ref_time: Option, - proof_size: Option, + _ref_time: Option, + _proof_size: Option, _storage_growth: Option, ) -> Result<(), ExitError> { - let weight_info = if let (Some(weight_info), _) = self.info_mut() { - weight_info - } else { - return Ok(()); - }; - - if let Some(amount) = ref_time { - weight_info.try_record_ref_time_or_fail(amount)?; - } - if let Some(amount) = proof_size { - weight_info.try_record_proof_size_or_fail(amount)?; - } Ok(()) } - fn refund_external_cost(&mut self, ref_time: Option, proof_size: Option) { - if let Some(weight_info) = self.weight_info.as_mut() { - if let Some(amount) = ref_time { - weight_info.refund_ref_time(amount); - } - if let Some(amount) = proof_size { - weight_info.refund_proof_size(amount); - } - } - } + fn refund_external_cost(&mut self, _ref_time: Option, _proof_size: Option) {} } #[cfg(feature = "forbid-evm-reentrancy")] @@ -1205,7 +956,6 @@ mod tests { &MockPrecompileSet, false, None, - None, |_| { let res = Runner::::execute( H160::default(), @@ -1217,7 +967,6 @@ mod tests { &MockPrecompileSet, false, None, - None, |_| (ExitReason::Succeed(ExitSucceed::Stopped), ()), ); assert_matches!( @@ -1249,7 +998,6 @@ mod tests { &MockPrecompileSet, false, None, - None, |_| (ExitReason::Succeed(ExitSucceed::Stopped), ()), ); assert!(res.is_ok()); diff --git a/frame/evm/src/tests.rs b/frame/evm/src/tests.rs index a8c2405264..bb9cf6b0e1 100644 --- a/frame/evm/src/tests.rs +++ b/frame/evm/src/tests.rs @@ -17,619 +17,29 @@ #![cfg(test)] -use super::*; -use crate::mock::*; - +use std::{collections::BTreeMap, str::FromStr}; +// Frontier +use fp_evm::TransactionPov; +// Substrate use frame_support::{ assert_ok, traits::{LockIdentifier, LockableCurrency, WithdrawReasons}, }; +use sp_core::Blake2Hasher; +use sp_io::TestExternalities; use sp_runtime::BuildStorage; -use std::{collections::BTreeMap, str::FromStr}; - -mod proof_size_test { - use super::*; - use fp_evm::{ - CreateInfo, ACCOUNT_BASIC_PROOF_SIZE, ACCOUNT_CODES_METADATA_PROOF_SIZE, - ACCOUNT_STORAGE_PROOF_SIZE, IS_EMPTY_CHECK_PROOF_SIZE, WRITE_PROOF_SIZE, - }; - use frame_support::traits::StorageInfoTrait; - // pragma solidity ^0.8.2; - // contract Callee { - // // ac4c25b2 - // function void() public { - // uint256 foo = 1; - // } - // } - pub const PROOF_SIZE_TEST_CALLEE_CONTRACT_BYTECODE: &str = - include_str!("./res/proof_size_test_callee_contract_bytecode.txt"); - // pragma solidity ^0.8.2; - // contract ProofSizeTest { - // uint256 foo; - // constructor() { - // foo = 6; - // } - // // 35f56c3b - // function test_balance(address who) public { - // // cold - // uint256 a = address(who).balance; - // // warm - // uint256 b = address(who).balance; - // } - // // e27a0ecd - // function test_sload() public returns (uint256) { - // // cold - // uint256 a = foo; - // // warm - // uint256 b = foo; - // return b; - // } - // // 4f3080a9 - // function test_sstore() public { - // // cold - // foo = 4; - // // warm - // foo = 5; - // } - // // c6d6f606 - // function test_call(Callee _callee) public { - // _callee.void(); - // } - // // 944ddc62 - // function test_oog() public { - // uint256 i = 1; - // while(true) { - // address who = address(uint160(uint256(keccak256(abi.encodePacked(bytes32(i)))))); - // uint256 a = address(who).balance; - // i = i + 1; - // } - // } - // } - pub const PROOF_SIZE_TEST_CONTRACT_BYTECODE: &str = - include_str!("./res/proof_size_test_contract_bytecode.txt"); - - fn create_proof_size_test_callee_contract( - gas_limit: u64, - weight_limit: Option, - ) -> Result>> { - ::Runner::create( - H160::default(), - hex::decode(PROOF_SIZE_TEST_CALLEE_CONTRACT_BYTECODE.trim_end()).unwrap(), - U256::zero(), - gas_limit, - Some(FixedGasPrice::min_gas_price().0), - None, - None, - Vec::new(), - true, // transactional - true, // must be validated - weight_limit, - Some(0), - &::config().clone(), - ) - } - - fn create_proof_size_test_contract( - gas_limit: u64, - weight_limit: Option, - ) -> Result>> { - ::Runner::create( - H160::default(), - hex::decode(PROOF_SIZE_TEST_CONTRACT_BYTECODE.trim_end()).unwrap(), - U256::zero(), - gas_limit, - Some(FixedGasPrice::min_gas_price().0), - None, - None, - Vec::new(), - true, // non-transactional - true, // must be validated - weight_limit, - Some(0), - &::config().clone(), - ) - } - - #[test] - fn account_basic_proof_size_constant_matches() { - assert_eq!( - ACCOUNT_BASIC_PROOF_SIZE, - frame_system::Account::::storage_info() - .first() - .expect("item") - .max_size - .expect("size") as u64 - ); - } - - #[test] - fn account_storage_proof_size_constant_matches() { - assert_eq!( - ACCOUNT_STORAGE_PROOF_SIZE, - AccountStorages::::storage_info() - .first() - .expect("item") - .max_size - .expect("size") as u64 - ); - } - - #[test] - fn account_codes_metadata_proof_size_constant_matches() { - assert_eq!( - ACCOUNT_CODES_METADATA_PROOF_SIZE, - AccountCodesMetadata::::storage_info() - .first() - .expect("item") - .max_size - .expect("size") as u64 - ); - } - - #[test] - fn proof_size_create_accounting_works() { - new_test_ext().execute_with(|| { - let gas_limit: u64 = 1_000_000; - let weight_limit = FixedGasWeightMapping::::gas_to_weight(gas_limit, true); - - let result = create_proof_size_test_callee_contract(gas_limit, Some(weight_limit)) - .expect("create succeeds"); - - // Creating a new contract does not involve reading the code from storage. - // We account for a fixed hash proof size write, an empty check and . - let write_cost = WRITE_PROOF_SIZE; - let is_empty_check = IS_EMPTY_CHECK_PROOF_SIZE; - let nonce_increases = ACCOUNT_BASIC_PROOF_SIZE * 2; - let expected_proof_size = write_cost + is_empty_check + nonce_increases; - - let actual_proof_size = result - .weight_info - .expect("weight info") - .proof_size_usage - .expect("proof size usage"); - - assert_eq!(expected_proof_size, actual_proof_size); - }); - } +use sp_state_machine::TrieBackendBuilder; +use sp_trie::{proof_size_extension::ProofSizeExt, recorder::Recorder}; - #[test] - fn proof_size_subcall_accounting_works() { - new_test_ext().execute_with(|| { - // Create callee contract A - let gas_limit: u64 = 1_000_000; - let weight_limit = FixedGasWeightMapping::::gas_to_weight(gas_limit, true); - let result = - create_proof_size_test_callee_contract(gas_limit, None).expect("create succeeds"); - - let subcall_contract_address = result.value; - - // Create proof size test contract B - let result = create_proof_size_test_contract(gas_limit, None).expect("create succeeds"); - - let call_contract_address = result.value; - - // Call B, that calls A, with weight limit - // selector for ProofSizeTest::test_call function.. - let mut call_data: String = "c6d6f606000000000000000000000000".to_owned(); - // ..encode the callee address argument - call_data.push_str(&format!("{:x}", subcall_contract_address)); - - let result = ::Runner::call( - H160::default(), - call_contract_address, - hex::decode(&call_data).unwrap(), - U256::zero(), - gas_limit, - Some(FixedGasPrice::min_gas_price().0), - None, - None, - Vec::new(), - true, // transactional - true, // must be validated - Some(weight_limit), - Some(0), - &::config().clone(), - ) - .expect("call succeeds"); - - // Expected proof size - let reading_main_contract_len = AccountCodes::::get(call_contract_address).len(); - let reading_contract_len = AccountCodes::::get(subcall_contract_address).len(); - let read_account_metadata = ACCOUNT_CODES_METADATA_PROOF_SIZE as usize; - let is_empty_check = (IS_EMPTY_CHECK_PROOF_SIZE * 2) as usize; - let increase_nonce = (ACCOUNT_BASIC_PROOF_SIZE * 3) as usize; - let expected_proof_size = ((read_account_metadata * 2) - + reading_contract_len - + reading_main_contract_len - + is_empty_check + increase_nonce) as u64; - - let actual_proof_size = result - .weight_info - .expect("weight info") - .proof_size_usage - .expect("proof size usage"); - - assert_eq!(expected_proof_size, actual_proof_size); - }); - } - - #[test] - fn proof_size_balance_accounting_works() { - new_test_ext().execute_with(|| { - let gas_limit: u64 = 1_000_000; - let weight_limit = FixedGasWeightMapping::::gas_to_weight(gas_limit, true); - - // Create proof size test contract - let result = create_proof_size_test_contract(gas_limit, None).expect("create succeeds"); - - let call_contract_address = result.value; - - // selector for ProofSizeTest::balance function.. - let mut call_data: String = "35f56c3b000000000000000000000000".to_owned(); - // ..encode bobs address - call_data.push_str(&format!("{:x}", H160::random())); - - let result = ::Runner::call( - H160::default(), - call_contract_address, - hex::decode(&call_data).unwrap(), - U256::zero(), - gas_limit, - Some(FixedGasPrice::min_gas_price().0), - None, - None, - Vec::new(), - true, // transactional - true, // must be validated - Some(weight_limit), - Some(0), - &::config().clone(), - ) - .expect("call succeeds"); - - // - Three account reads. - // - Main contract code read. - // - One metadata read. - let basic_account_size = (ACCOUNT_BASIC_PROOF_SIZE * 3) as usize; - let read_account_metadata = ACCOUNT_CODES_METADATA_PROOF_SIZE as usize; - let is_empty_check = IS_EMPTY_CHECK_PROOF_SIZE as usize; - let increase_nonce = ACCOUNT_BASIC_PROOF_SIZE as usize; - let reading_main_contract_len = AccountCodes::::get(call_contract_address).len(); - let expected_proof_size = (basic_account_size - + read_account_metadata - + reading_main_contract_len - + is_empty_check + increase_nonce) as u64; - - let actual_proof_size = result - .weight_info - .expect("weight info") - .proof_size_usage - .expect("proof size usage"); - - assert_eq!(expected_proof_size, actual_proof_size); - }); - } - - #[test] - fn proof_size_sload_accounting_works() { - new_test_ext().execute_with(|| { - let gas_limit: u64 = 1_000_000; - let weight_limit = FixedGasWeightMapping::::gas_to_weight(gas_limit, true); - - // Create proof size test contract - let result = create_proof_size_test_contract(gas_limit, None).expect("create succeeds"); - - let call_contract_address = result.value; - - // selector for ProofSizeTest::test_sload function.. - let call_data: String = "e27a0ecd".to_owned(); - let result = ::Runner::call( - H160::default(), - call_contract_address, - hex::decode(call_data).unwrap(), - U256::zero(), - gas_limit, - Some(FixedGasPrice::min_gas_price().0), - None, - None, - Vec::new(), - true, // transactional - true, // must be validated - Some(weight_limit), - Some(0), - &::config().clone(), - ) - .expect("call succeeds"); - - let reading_main_contract_len = - AccountCodes::::get(call_contract_address).len() as u64; - let expected_proof_size = reading_main_contract_len - + ACCOUNT_STORAGE_PROOF_SIZE - + ACCOUNT_CODES_METADATA_PROOF_SIZE - + IS_EMPTY_CHECK_PROOF_SIZE - + (ACCOUNT_BASIC_PROOF_SIZE * 2); - - let actual_proof_size = result - .weight_info - .expect("weight info") - .proof_size_usage - .expect("proof size usage"); - - assert_eq!(expected_proof_size, actual_proof_size); - }); - } - - #[test] - fn proof_size_sstore_accounting_works() { - new_test_ext().execute_with(|| { - let gas_limit: u64 = 1_000_000; - let weight_limit = FixedGasWeightMapping::::gas_to_weight(gas_limit, true); - - // Create proof size test contract - let result = create_proof_size_test_contract(gas_limit, None).expect("create succeeds"); - - let call_contract_address = result.value; - - // selector for ProofSizeTest::test_sstore function.. - let call_data: String = "4f3080a9".to_owned(); - let result = ::Runner::call( - H160::default(), - call_contract_address, - hex::decode(call_data).unwrap(), - U256::zero(), - gas_limit, - Some(FixedGasPrice::min_gas_price().0), - None, - None, - Vec::new(), - true, // transactional - true, // must be validated - Some(weight_limit), - Some(0), - &::config().clone(), - ) - .expect("call succeeds"); - - let reading_main_contract_len = - AccountCodes::::get(call_contract_address).len() as u64; - let expected_proof_size = reading_main_contract_len - + WRITE_PROOF_SIZE - + ACCOUNT_CODES_METADATA_PROOF_SIZE - + ACCOUNT_STORAGE_PROOF_SIZE - + IS_EMPTY_CHECK_PROOF_SIZE - + (ACCOUNT_BASIC_PROOF_SIZE * 2); - - let actual_proof_size = result - .weight_info - .expect("weight info") - .proof_size_usage - .expect("proof size usage"); - - assert_eq!(expected_proof_size, actual_proof_size); - }); - } - - #[test] - fn proof_size_oog_works() { - new_test_ext().execute_with(|| { - let gas_limit: u64 = 1_000_000; - let mut weight_limit = FixedGasWeightMapping::::gas_to_weight(gas_limit, true); - - // Artifically set a lower proof size limit so we OOG this instead gas. - *weight_limit.proof_size_mut() = weight_limit.proof_size() / 2; - - // Create proof size test contract - let result = create_proof_size_test_contract(gas_limit, None).expect("create succeeds"); - - let call_contract_address = result.value; - - // selector for ProofSizeTest::test_oog function.. - let call_data: String = "944ddc62".to_owned(); - let result = ::Runner::call( - H160::default(), - call_contract_address, - hex::decode(call_data).unwrap(), - U256::zero(), - gas_limit, - Some(FixedGasPrice::min_gas_price().0), - None, - None, - Vec::new(), - true, // transactional - true, // must be validated - Some(weight_limit), - Some(0), - &::config().clone(), - ) - .expect("call succeeds"); - - // Find how many random balance reads can we do with the available proof size. - let reading_main_contract_len = - AccountCodes::::get(call_contract_address).len() as u64; - let overhead = reading_main_contract_len - + ACCOUNT_CODES_METADATA_PROOF_SIZE - + IS_EMPTY_CHECK_PROOF_SIZE; - let available_proof_size = weight_limit.proof_size() - overhead; - let number_balance_reads = - available_proof_size.saturating_div(ACCOUNT_BASIC_PROOF_SIZE); - // The actual proof size consumed by those balance reads. - let expected_proof_size = overhead + (number_balance_reads * ACCOUNT_BASIC_PROOF_SIZE); - - let actual_proof_size = result - .weight_info - .expect("weight info") - .proof_size_usage - .expect("proof size usage"); - - assert_eq!(expected_proof_size, actual_proof_size); - }); - } - - #[test] - fn uncached_account_code_proof_size_accounting_works() { - new_test_ext().execute_with(|| { - // Create callee contract A - let gas_limit: u64 = 1_000_000; - let weight_limit = FixedGasWeightMapping::::gas_to_weight(gas_limit, true); - let result = - create_proof_size_test_callee_contract(gas_limit, None).expect("create succeeds"); - - let subcall_contract_address = result.value; - - // Expect callee contract code hash and size to be cached - let _ = >::get(subcall_contract_address) - .expect("contract code hash and size are cached"); - - // Remove callee cache - >::remove(subcall_contract_address); - - // Create proof size test contract B - let result = create_proof_size_test_contract(gas_limit, None).expect("create succeeds"); - - let call_contract_address = result.value; - - // Call B, that calls A, with weight limit - // selector for ProofSizeTest::test_call function.. - let mut call_data: String = "c6d6f606000000000000000000000000".to_owned(); - // ..encode the callee address argument - call_data.push_str(&format!("{:x}", subcall_contract_address)); - let result = ::Runner::call( - H160::default(), - call_contract_address, - hex::decode(&call_data).unwrap(), - U256::zero(), - gas_limit, - Some(FixedGasPrice::min_gas_price().0), - None, - None, - Vec::new(), - true, // transactional - true, // must be validated - Some(weight_limit), - Some(0), - &::config().clone(), - ) - .expect("call succeeds"); - - // Expected proof size - let read_account_metadata = ACCOUNT_CODES_METADATA_PROOF_SIZE as usize; - let is_empty_check = (IS_EMPTY_CHECK_PROOF_SIZE * 2) as usize; - let increase_nonce = (ACCOUNT_BASIC_PROOF_SIZE * 3) as usize; - let reading_main_contract_len = AccountCodes::::get(call_contract_address).len(); - let reading_callee_contract_len = - AccountCodes::::get(subcall_contract_address).len(); - // In order to do the subcall, we need to check metadata 3 times - - // one for each contract + one for the call opcode -, load two bytecodes - caller and callee. - let expected_proof_size = ((read_account_metadata * 2) - + reading_callee_contract_len - + reading_main_contract_len - + is_empty_check + increase_nonce) as u64; - - let actual_proof_size = result - .weight_info - .expect("weight info") - .proof_size_usage - .expect("proof size usage"); - - assert_eq!(expected_proof_size, actual_proof_size); - }); - } - - #[test] - fn proof_size_breaks_standard_transfer() { - new_test_ext().execute_with(|| { - // In this test we do a simple transfer to an address with an stored code which is - // greater in size (and thus load cost) than the transfer flat fee of 21_000. - - // We assert that providing 21_000 gas limit will not work, because the pov size limit - // will OOG. - let fake_contract_address = H160::random(); - let config = ::config().clone(); - let fake_contract_code = vec![0; config.create_contract_limit.expect("a value")]; - AccountCodes::::insert(fake_contract_address, fake_contract_code); - - let gas_limit: u64 = 21_000; - let weight_limit = FixedGasWeightMapping::::gas_to_weight(gas_limit, true); - - let result = ::Runner::call( - H160::default(), - fake_contract_address, - Vec::new(), - U256::from(777), - gas_limit, - Some(FixedGasPrice::min_gas_price().0), - None, - None, - Vec::new(), - true, // transactional - true, // must be validated - Some(weight_limit), - Some(0), - &config, - ) - .expect("call succeeds"); - - assert_eq!( - result.exit_reason, - crate::ExitReason::Error(crate::ExitError::OutOfGas) - ); - }); - } - - #[test] - fn proof_size_based_refunding_works() { - new_test_ext().execute_with(|| { - // In this test we do a simple transfer to an address with an stored code which is - // greater in size (and thus load cost) than the transfer flat fee of 21_000. - - // Assert that if we provide enough gas limit, the refund will be based on the pov - // size consumption, not the 21_000 gas. - let fake_contract_address = H160::random(); - let config = ::config().clone(); - let fake_contract_code = vec![0; config.create_contract_limit.expect("a value")]; - AccountCodes::::insert(fake_contract_address, fake_contract_code); - - let gas_limit: u64 = 700_000; - let weight_limit = FixedGasWeightMapping::::gas_to_weight(gas_limit, true); - - let result = ::Runner::call( - H160::default(), - fake_contract_address, - Vec::new(), - U256::from(777), - gas_limit, - Some(FixedGasPrice::min_gas_price().0), - None, - None, - Vec::new(), - true, // transactional - true, // must be validated - Some(weight_limit), - Some(0), - &config, - ) - .expect("call succeeds"); - - let ratio = <::GasLimitPovSizeRatio as Get>::get(); - let used_gas = result.used_gas; - let actual_proof_size = result - .weight_info - .expect("weight info") - .proof_size_usage - .expect("proof size usage"); - - assert_eq!(used_gas.standard, U256::from(21_000)); - assert_eq!(used_gas.effective, U256::from(actual_proof_size * ratio)); - }); - } -} +use super::*; +use crate::mock::*; type Balances = pallet_balances::Pallet; #[allow(clippy::upper_case_acronyms)] type EVM = Pallet; -pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::::default() +pub fn new_test_ext() -> TestExternalities { + let mut storage = frame_system::GenesisConfig::::default() .build_storage() .unwrap(); @@ -673,17 +83,34 @@ pub fn new_test_ext() -> sp_io::TestExternalities { 12345, )], } - .assimilate_storage(&mut t) + .assimilate_storage(&mut storage) .expect("Pallet balances storage can be assimilated"); crate::GenesisConfig:: { accounts, ..Default::default() } - .assimilate_storage(&mut t) + .assimilate_storage(&mut storage) .unwrap(); - t.into() + storage.into() +} + +pub fn new_text_ext_with_recorder() -> TestExternalities { + let text_ext = new_test_ext(); + + let root = *text_ext.backend.root(); + let db = text_ext.backend.into_storage(); + let recorder: Recorder = Default::default(); + let backend_with_reorder = TrieBackendBuilder::new(db, root) + .with_recorder(recorder.clone()) + .build(); + + let mut test_ext_with_recorder: TestExternalities = TestExternalities::default(); + test_ext_with_recorder.backend = backend_with_reorder; + test_ext_with_recorder.register_extension(ProofSizeExt::new(recorder)); + + test_ext_with_recorder } #[test] @@ -1066,7 +493,6 @@ fn runner_non_transactional_calls_with_non_balance_accounts_is_ok_without_gas_pr false, // non-transactional true, // must be validated None, - None, &::config().clone(), ) .expect("Non transactional call succeeds"); @@ -1102,7 +528,6 @@ fn runner_non_transactional_calls_with_non_balance_accounts_is_err_with_gas_pric false, // non-transactional true, // must be validated None, - None, &::config().clone(), ); assert!(res.is_err()); @@ -1126,7 +551,6 @@ fn runner_transactional_call_with_zero_gas_price_fails() { true, // transactional true, // must be validated None, - None, &::config().clone(), ); assert!(res.is_err()); @@ -1150,7 +574,6 @@ fn runner_max_fee_per_gas_gte_max_priority_fee_per_gas() { true, // transactional true, // must be validated None, - None, &::config().clone(), ); assert!(res.is_err()); @@ -1167,7 +590,6 @@ fn runner_max_fee_per_gas_gte_max_priority_fee_per_gas() { false, // non-transactional true, // must be validated None, - None, &::config().clone(), ); assert!(res.is_err()); @@ -1192,7 +614,6 @@ fn eip3607_transaction_from_contract() { true, // transactional false, // not sure be validated None, - None, &::config().clone(), ) { Err(RunnerError { @@ -1217,7 +638,6 @@ fn eip3607_transaction_from_contract() { false, // non-transactional true, // must be validated None, - None, &::config().clone(), ) .is_ok()); @@ -1260,3 +680,197 @@ fn metadata_empty_dont_code_gets_cached() { assert!(>::get(address).is_none()); }); } + +// SPDX-License-Identifier: GPL-3.0 +// pragma solidity >=0.8.2 <0.9.0; +// contract ProofTest { +// uint256 number; +// +// function set_number(uint num) public { +// number = num; +// } +// +// function get_number() public view returns (uint256) { +// return number; +// } +// } + +const PROOF_TEST_BYTECODE: &str = "6080604052348015600e575f80fd5b506101438061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c8063d6d1ee1414610038578063eeb4e36714610054575b5f80fd5b610052600480360381019061004d91906100ba565b610072565b005b61005c61007b565b60405161006991906100f4565b60405180910390f35b805f8190555050565b5f8054905090565b5f80fd5b5f819050919050565b61009981610087565b81146100a3575f80fd5b50565b5f813590506100b481610090565b92915050565b5f602082840312156100cf576100ce610083565b5b5f6100dc848285016100a6565b91505092915050565b6100ee81610087565b82525050565b5f6020820190506101075f8301846100e5565b9291505056fea26469706673582212201114104d5a56d94d03255e0f9fa699d53db26e355fb37f735caa200d7ce5158e64736f6c634300081a0033"; + +#[test] +fn proof_size_create_contract() { + let proof_size = || -> u64 { + cumulus_primitives_storage_weight_reclaim::get_proof_size() + .expect("ensure the proof size host function is enabled.") + }; + + let mut test_ext_with_recorder = new_text_ext_with_recorder(); + test_ext_with_recorder.execute_with(|| { + // The initial proof size should be 0 + assert_eq!(proof_size(), 0); + // Read the storage increases the proof size + EVM::account_basic(&H160::from_str("1000000000000000000000000000000000000002").unwrap()); + assert_eq!(proof_size(), 583); + AccountCodes::::get( + H160::from_str("1000000000000000000000000000000000000001").unwrap(), + ); + assert_eq!(proof_size(), 799); + }); + + test_ext_with_recorder.execute_with(|| { + let transaction_pov = + TransactionPov::new(Weight::from_parts(10000000000000, 5000), proof_size()); + let res = ::Runner::create( + H160::default(), + hex::decode(PROOF_TEST_BYTECODE).unwrap(), + U256::zero(), + 10000000, + Some(FixedGasPrice::min_gas_price().0), + None, + None, + Vec::new(), + true, // transactional| + true, // must be validated + Some(transaction_pov), + &::config().clone(), + ) + .expect("create contract failed"); + let contract_addr = res.value; + assert!(!AccountCodes::::get(contract_addr).is_empty()); + assert_eq!(proof_size(), 1196); + }); +} + +#[test] +fn proof_size_reach_limit() { + let proof_size = || -> u64 { + cumulus_primitives_storage_weight_reclaim::get_proof_size() + .expect("ensure the proof size host function is enabled.") + }; + + let mut test_ext_with_recorder = new_text_ext_with_recorder(); + // create contract run out of proof size + test_ext_with_recorder.execute_with(|| { + let transaction_pov = + TransactionPov::new(Weight::from_parts(10000000000000, 101), proof_size()); + let res = ::Runner::create( + H160::default(), + hex::decode(PROOF_TEST_BYTECODE).unwrap(), + U256::zero(), + 10000000, + Some(FixedGasPrice::min_gas_price().0), + None, + None, + Vec::new(), + true, // transactional + true, // must be validated + Some(transaction_pov), + &::config().clone(), + ) + .expect("create contract failed"); + assert_eq!(res.exit_reason, ExitReason::Error(ExitError::OutOfGas)); + let contract_addr = res.value; + assert!(AccountCodes::::get(contract_addr).is_empty()); + }); + + // call contract run out of proof size + test_ext_with_recorder.execute_with(|| { + let mut transaction_pov = + TransactionPov::new(Weight::from_parts(10000000000000, 5000), proof_size()); + let res = ::Runner::create( + H160::default(), + hex::decode(PROOF_TEST_BYTECODE).unwrap(), + U256::zero(), + 10000000, + Some(FixedGasPrice::min_gas_price().0), + None, + None, + Vec::new(), + true, // transactional + true, // must be validated + Some(transaction_pov), + &::config().clone(), + ) + .expect("create contract failed"); + let contract_addr = res.value; + assert!(!AccountCodes::::get(contract_addr).is_empty()); + + // set_number(6) + let calldata = "d6d1ee140000000000000000000000000000000000000000000000000000000000000006"; + transaction_pov.proof_size_pre_execution = 100; + transaction_pov.weight_limit = Weight::from_parts(10000000000000, 1); + let res = ::Runner::call( + H160::default(), + contract_addr, + hex::decode(calldata).unwrap(), + U256::zero(), + 10000000, + Some(FixedGasPrice::min_gas_price().0), + None, + None, + Vec::new(), + true, // transactional + false, // must be validated + Some(transaction_pov), + &::config().clone(), + ) + .expect("call contract failed"); + assert_eq!(res.exit_reason, ExitReason::Error(ExitError::OutOfGas)); + + // get_number() + let calldata = "eeb4e367"; + transaction_pov.weight_limit = Weight::from_parts(10000000000000, 50000); + let res = ::Runner::call( + H160::default(), + contract_addr, + hex::decode(calldata).unwrap(), + U256::zero(), + 10000000, + Some(FixedGasPrice::min_gas_price().0), + None, + None, + Vec::new(), + true, // transactional + false, // must be validated + Some(transaction_pov), + &::config().clone(), + ) + .expect("call contract failed"); + assert_eq!(U256::from_big_endian(&res.value), U256::from(0)); + }); +} + +#[test] +fn proof_size_reach_limit_nonce_increase() { + let proof_size = || -> u64 { + cumulus_primitives_storage_weight_reclaim::get_proof_size() + .expect("ensure the proof size host function is enabled.") + }; + + let mut test_ext_with_recorder = new_text_ext_with_recorder(); + test_ext_with_recorder.execute_with(|| { + let original_nonce = EVM::account_basic(&H160::default()).0.nonce; + let transaction_pov = + TransactionPov::new(Weight::from_parts(10000000000000, 101), proof_size()); + let res = ::Runner::create( + H160::default(), + hex::decode(PROOF_TEST_BYTECODE).unwrap(), + U256::zero(), + 10000000, + Some(FixedGasPrice::min_gas_price().0), + None, + None, + Vec::new(), + true, // transactional + true, // must be validated + Some(transaction_pov), + &::config().clone(), + ) + .expect("create contract failed"); + assert_eq!(res.exit_reason, ExitReason::Error(ExitError::OutOfGas)); + assert_eq!( + EVM::account_basic(&H160::default()).0.nonce, + original_nonce + 1 + ); + }); +} diff --git a/primitives/ethereum/src/lib.rs b/primitives/ethereum/src/lib.rs index 6a76d95d11..919b35acf5 100644 --- a/primitives/ethereum/src/lib.rs +++ b/primitives/ethereum/src/lib.rs @@ -78,18 +78,6 @@ impl TransactionData { access_list, } } - - // The transact call wrapped in the extrinsic is part of the PoV, record this as a base cost for the size of the proof. - pub fn proof_size_base_cost(&self) -> u64 { - self.encode() - .len() - // signature - .saturating_add(65) - // pallet index - .saturating_add(1) - // call index - .saturating_add(1) as u64 - } } impl From for CheckEvmTransactionInput { diff --git a/primitives/evm/Cargo.toml b/primitives/evm/Cargo.toml index 9cacc4e27d..9ddbdf08b1 100644 --- a/primitives/evm/Cargo.toml +++ b/primitives/evm/Cargo.toml @@ -20,6 +20,8 @@ serde = { workspace = true, optional = true } frame-support = { workspace = true } sp-core = { workspace = true } sp-runtime = { workspace = true } +# Cumulus +cumulus-primitives-storage-weight-reclaim = { workspace = true } [features] default = ["std"] @@ -33,6 +35,8 @@ std = [ "frame-support/std", "sp-core/std", "sp-runtime/std", + # Cumulus + "cumulus-primitives-storage-weight-reclaim/std", ] serde = [ "dep:serde", diff --git a/primitives/evm/src/lib.rs b/primitives/evm/src/lib.rs index efc94593a4..92f604b708 100644 --- a/primitives/evm/src/lib.rs +++ b/primitives/evm/src/lib.rs @@ -58,23 +58,33 @@ pub struct Vicinity { /// Origin of the transaction. pub origin: H160, } +#[derive(Clone, Copy, Eq, PartialEq, Debug, Encode, Decode, TypeInfo)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub struct TransactionPov { + pub weight_limit: Weight, + pub proof_size_pre_execution: u64, +} -/// `System::Account` 16(hash) + 20 (key) + 60 (AccountInfo::max_encoded_len) -pub const ACCOUNT_BASIC_PROOF_SIZE: u64 = 96; -/// `AccountCodesMetadata` read, temptatively 16 (hash) + 20 (key) + 40 (CodeMetadata). -pub const ACCOUNT_CODES_METADATA_PROOF_SIZE: u64 = 76; -/// 16 (hash1) + 20 (key1) + 16 (hash2) + 32 (key2) + 32 (value) -pub const ACCOUNT_STORAGE_PROOF_SIZE: u64 = 116; -/// Fixed trie 32 byte hash. -pub const WRITE_PROOF_SIZE: u64 = 32; -/// Account basic proof size + 5 bytes max of `decode_len` call. -pub const IS_EMPTY_CHECK_PROOF_SIZE: u64 = 93; +impl TransactionPov { + pub fn new(weight_limit: Weight, proof_size_pre_execution: u64) -> Self { + Self { + weight_limit, + proof_size_pre_execution, + } + } + + pub fn proof_size_used(&self) -> u64 { + let Some(proof_size_post_execution) = + cumulus_primitives_storage_weight_reclaim::get_proof_size() + else { + return 0; + }; -pub enum AccessedStorage { - AccountCodes(H160), - AccountStorages((H160, H256)), + proof_size_post_execution.saturating_sub(self.proof_size_pre_execution) + } } +// Retain this structure to maintain API compatibility #[derive(Clone, Copy, Eq, PartialEq, Debug, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct WeightInfo { @@ -85,95 +95,13 @@ pub struct WeightInfo { } impl WeightInfo { - pub fn new_from_weight_limit( - weight_limit: Option, - proof_size_base_cost: Option, - ) -> Result, &'static str> { - Ok(match (weight_limit, proof_size_base_cost) { - (None, _) => None, - (Some(weight_limit), Some(proof_size_base_cost)) - if weight_limit.proof_size() >= proof_size_base_cost => - { - Some(WeightInfo { - ref_time_limit: Some(weight_limit.ref_time()), - proof_size_limit: Some(weight_limit.proof_size()), - ref_time_usage: Some(0u64), - proof_size_usage: Some(proof_size_base_cost), - }) - } - (Some(weight_limit), None) => Some(WeightInfo { - ref_time_limit: Some(weight_limit.ref_time()), - proof_size_limit: None, - ref_time_usage: Some(0u64), - proof_size_usage: None, - }), - _ => return Err("must provide Some valid weight limit or None"), - }) - } - - fn try_consume(&self, cost: u64, limit: u64, usage: u64) -> Result { - let usage = usage.checked_add(cost).ok_or(ExitError::OutOfGas)?; - if usage > limit { - return Err(ExitError::OutOfGas); - } - Ok(usage) - } - - pub fn try_record_ref_time_or_fail(&mut self, cost: u64) -> Result<(), ExitError> { - if let (Some(ref_time_usage), Some(ref_time_limit)) = - (self.ref_time_usage, self.ref_time_limit) - { - let ref_time_usage = self.try_consume(cost, ref_time_limit, ref_time_usage)?; - if ref_time_usage > ref_time_limit { - return Err(ExitError::OutOfGas); - } - self.ref_time_usage = Some(ref_time_usage); - } - Ok(()) - } - - pub fn try_record_proof_size_or_fail(&mut self, cost: u64) -> Result<(), ExitError> { - if let (Some(proof_size_usage), Some(proof_size_limit)) = - (self.proof_size_usage, self.proof_size_limit) - { - let proof_size_usage = self.try_consume(cost, proof_size_limit, proof_size_usage)?; - if proof_size_usage > proof_size_limit { - return Err(ExitError::OutOfGas); - } - self.proof_size_usage = Some(proof_size_usage); - } - Ok(()) - } - - pub fn refund_proof_size(&mut self, amount: u64) { - if let Some(proof_size_usage) = self.proof_size_usage { - let proof_size_usage = proof_size_usage.saturating_sub(amount); - self.proof_size_usage = Some(proof_size_usage); - } - } - - pub fn refund_ref_time(&mut self, amount: u64) { - if let Some(ref_time_usage) = self.ref_time_usage { - let ref_time_usage = ref_time_usage.saturating_sub(amount); - self.ref_time_usage = Some(ref_time_usage); - } - } - pub fn remaining_proof_size(&self) -> Option { - if let (Some(proof_size_usage), Some(proof_size_limit)) = - (self.proof_size_usage, self.proof_size_limit) - { - return Some(proof_size_limit.saturating_sub(proof_size_usage)); - } - None - } - - pub fn remaining_ref_time(&self) -> Option { - if let (Some(ref_time_usage), Some(ref_time_limit)) = - (self.ref_time_usage, self.ref_time_limit) - { - return Some(ref_time_limit.saturating_sub(ref_time_usage)); + pub fn from_transaction_pov(transaction_pov: TransactionPov) -> Self { + Self { + ref_time_limit: Some(transaction_pov.weight_limit.ref_time()), + proof_size_limit: Some(transaction_pov.weight_limit.proof_size()), + ref_time_usage: Some(0), + proof_size_usage: Some(transaction_pov.proof_size_used()), } - None } } diff --git a/primitives/evm/src/validation.rs b/primitives/evm/src/validation.rs index 4359dcaef1..4d21edb017 100644 --- a/primitives/evm/src/validation.rs +++ b/primitives/evm/src/validation.rs @@ -17,9 +17,10 @@ #![allow(clippy::comparison_chain)] +use crate::TransactionPov; use alloc::vec::Vec; pub use evm::backend::Basic as Account; -use frame_support::{sp_runtime::traits::UniqueSaturatedInto, weights::Weight}; +use frame_support::sp_runtime::traits::UniqueSaturatedInto; use sp_core::{H160, H256, U256}; #[derive(Debug)] @@ -49,8 +50,7 @@ pub struct CheckEvmTransactionConfig<'config> { pub struct CheckEvmTransaction<'config, E: From> { pub config: CheckEvmTransactionConfig<'config>, pub transaction: CheckEvmTransactionInput, - pub weight_limit: Option, - pub proof_size_base_cost: Option, + pub transaction_pov: Option, _marker: core::marker::PhantomData, } @@ -58,6 +58,8 @@ pub struct CheckEvmTransaction<'config, E: From> { #[repr(u8)] #[derive(num_enum::FromPrimitive, num_enum::IntoPrimitive, Debug)] pub enum TransactionValidationError { + /// The proof limit is too low + ProofLimitTooLow, /// The transaction gas limit is too low GasLimitTooLow, /// The transaction gas limit is too hign @@ -87,14 +89,12 @@ impl<'config, E: From> CheckEvmTransaction<'config, pub fn new( config: CheckEvmTransactionConfig<'config>, transaction: CheckEvmTransactionInput, - weight_limit: Option, - proof_size_base_cost: Option, + transaction_pov: Option, ) -> Self { CheckEvmTransaction { config, transaction, - weight_limit, - proof_size_base_cost, + transaction_pov, _marker: Default::default(), } } @@ -201,17 +201,6 @@ impl<'config, E: From> CheckEvmTransaction<'config, pub fn validate_common(&self) -> Result<&Self, E> { if self.config.is_transactional { - // Try to subtract the proof_size_base_cost from the Weight proof_size limit or fail. - // Validate the weight limit can afford recording the proof size cost. - if let (Some(weight_limit), Some(proof_size_base_cost)) = - (self.weight_limit, self.proof_size_base_cost) - { - let _ = weight_limit - .proof_size() - .checked_sub(proof_size_base_cost) - .ok_or(TransactionValidationError::GasLimitTooLow)?; - } - // We must ensure a transaction can pay the cost of its data bytes. // If it can't it should not be included in a block. let mut gasometer = evm::gasometer::Gasometer::new( @@ -260,6 +249,7 @@ mod tests { InvalidFeeInput, InvalidChainId, InvalidSignature, + ProofLimitTooLow, UnknownError, } @@ -278,6 +268,7 @@ mod tests { TransactionValidationError::InvalidFeeInput => TestError::InvalidFeeInput, TransactionValidationError::InvalidChainId => TestError::InvalidChainId, TransactionValidationError::InvalidSignature => TestError::InvalidSignature, + TransactionValidationError::ProofLimitTooLow => TestError::ProofLimitTooLow, TransactionValidationError::UnknownError => TestError::UnknownError, } } @@ -295,8 +286,7 @@ mod tests { pub max_fee_per_gas: Option, pub max_priority_fee_per_gas: Option, pub value: U256, - pub weight_limit: Option, - pub proof_size_base_cost: Option, + pub transaction_pov: Option, } impl Default for TestCase { @@ -313,8 +303,7 @@ mod tests { max_fee_per_gas: Some(U256::from(1_000_000_000u128)), max_priority_fee_per_gas: Some(U256::from(1_000_000_000u128)), value: U256::from(1u8), - weight_limit: None, - proof_size_base_cost: None, + transaction_pov: None, } } } @@ -332,8 +321,7 @@ mod tests { max_fee_per_gas, max_priority_fee_per_gas, value, - weight_limit, - proof_size_base_cost, + transaction_pov, } = input; CheckEvmTransaction::::new( CheckEvmTransactionConfig { @@ -355,8 +343,7 @@ mod tests { value, access_list: vec![], }, - weight_limit, - proof_size_base_cost, + transaction_pov, ) } @@ -380,17 +367,6 @@ mod tests { }) } - fn transaction_gas_limit_low_proof_size<'config>( - is_transactional: bool, - ) -> CheckEvmTransaction<'config, TestError> { - test_env(TestCase { - weight_limit: Some(Weight::from_parts(1, 1)), - proof_size_base_cost: Some(2), - is_transactional, - ..Default::default() - }) - } - fn transaction_gas_limit_high<'config>() -> CheckEvmTransaction<'config, TestError> { test_env(TestCase { blockchain_gas_limit: U256::from(1u8), @@ -568,42 +544,6 @@ mod tests { assert!(res.is_ok()); } - // Gas limit too low for proof size recording transactional fails in pool and in block. - #[test] - fn validate_in_pool_and_block_transactional_fails_gas_limit_too_low_proof_size() { - let who = Account { - balance: U256::from(1_000_000u128), - nonce: U256::zero(), - }; - let is_transactional = true; - let test = transaction_gas_limit_low_proof_size(is_transactional); - // Pool - let res = test.validate_in_pool_for(&who); - assert!(res.is_err()); - assert_eq!(res.unwrap_err(), TestError::GasLimitTooLow); - // Block - let res = test.validate_in_block_for(&who); - assert!(res.is_err()); - assert_eq!(res.unwrap_err(), TestError::GasLimitTooLow); - } - - // Gas limit too low non-transactional succeeds in pool and in block. - #[test] - fn validate_in_pool_and_block_non_transactional_succeeds_gas_limit_too_low_proof_size() { - let who = Account { - balance: U256::from(1_000_000u128), - nonce: U256::zero(), - }; - let is_transactional = false; - let test = transaction_gas_limit_low_proof_size(is_transactional); - // Pool - let res = test.validate_in_pool_for(&who); - assert!(res.is_ok()); - // Block - let res = test.validate_in_block_for(&who); - assert!(res.is_ok()); - } - // Gas limit too high fails in pool and in block. #[test] fn validate_in_pool_for_fails_gas_limit_too_high() { diff --git a/template/node/Cargo.toml b/template/node/Cargo.toml index 70016bf93c..687efca56f 100644 --- a/template/node/Cargo.toml +++ b/template/node/Cargo.toml @@ -21,7 +21,6 @@ jsonrpsee = { workspace = true, features = ["server", "macros"] } log = { workspace = true } scale-codec = { package = "parity-scale-codec", workspace = true } serde_json = { workspace = true, features = ["arbitrary_precision"] } - # Substrate prometheus-endpoint = { package = "substrate-prometheus-endpoint", workspace = true } sc-basic-authorship = { workspace = true } @@ -55,6 +54,10 @@ sp-runtime = { workspace = true, features = ["default"] } sp-session = { workspace = true, features = ["default"] } sp-timestamp = { workspace = true, features = ["default"] } sp-transaction-pool = { workspace = true, features = ["default"] } +# Cumulus +cumulus-client-service = { workspace = true } +cumulus-primitives-storage-weight-reclaim = { workspace = true, optional = true } +polkadot-service = { workspace = true, optional = true } # These dependencies are used for RPC frame-system-rpc-runtime-api = { workspace = true } pallet-transaction-payment-rpc = { workspace = true } @@ -113,5 +116,9 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", "sc-service/runtime-benchmarks", + # Cumulus + "cumulus-primitives-storage-weight-reclaim", + "polkadot-service/runtime-benchmarks", + # Frontier "frontier-template-runtime/runtime-benchmarks", ] diff --git a/template/node/src/benchmarking.rs b/template/node/src/benchmarking.rs index 2dafe1247b..a024f5e343 100644 --- a/template/node/src/benchmarking.rs +++ b/template/node/src/benchmarking.rs @@ -15,6 +15,7 @@ use fp_account::AccountId20; use frontier_template_runtime::{self as runtime, AccountId, Balance, BalancesCall, SystemCall}; use crate::service::Client; +use polkadot_service as _; /// Generates extrinsics for the `benchmark overhead` command. /// @@ -133,6 +134,7 @@ pub fn create_benchmark_extrinsic( frame_system::CheckNonce::::from(nonce), frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), + cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim::::new(), ); let raw_payload = runtime::SignedPayload::from_raw( @@ -147,6 +149,7 @@ pub fn create_benchmark_extrinsic( (), (), (), + (), ), ); let signature = raw_payload.using_encoded(|e| sender.sign(e)); diff --git a/template/node/src/service.rs b/template/node/src/service.rs index 8749729863..d771cb0985 100644 --- a/template/node/src/service.rs +++ b/template/node/src/service.rs @@ -38,11 +38,15 @@ use crate::{ #[cfg(feature = "runtime-benchmarks")] pub type HostFunctions = ( sp_io::SubstrateHostFunctions, + cumulus_client_service::storage_proof_size::HostFunctions, frame_benchmarking::benchmarking::HostFunctions, ); /// Otherwise we use empty host functions for ext host functions. #[cfg(not(feature = "runtime-benchmarks"))] -pub type HostFunctions = sp_io::SubstrateHostFunctions; +pub type HostFunctions = ( + sp_io::SubstrateHostFunctions, + cumulus_client_service::storage_proof_size::HostFunctions, +); pub type Backend = FullBackend; pub type Client = FullClient; @@ -105,11 +109,13 @@ where let executor = sc_service::new_wasm_executor(config); - let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( - config, - telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), - executor, - )?; + let (client, backend, keystore_container, task_manager) = + sc_service::new_full_parts_record_import::( + config, + telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), + executor, + true, + )?; let client = Arc::new(client); let telemetry = telemetry.map(|(worker, telemetry)| { @@ -532,7 +538,7 @@ where return Ok(task_manager); } - let proposer_factory = sc_basic_authorship::ProposerFactory::new( + let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( task_manager.spawn_handle(), client.clone(), transaction_pool.clone(), @@ -651,7 +657,7 @@ where RA::RuntimeApi: RuntimeApiCollection, HF: HostFunctionsT + 'static, { - let proposer_factory = sc_basic_authorship::ProposerFactory::new( + let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( task_manager.spawn_handle(), client.clone(), transaction_pool.clone(), diff --git a/template/runtime/Cargo.toml b/template/runtime/Cargo.toml index 3301dcfd85..e9042a0bd4 100644 --- a/template/runtime/Cargo.toml +++ b/template/runtime/Cargo.toml @@ -42,7 +42,8 @@ pallet-sudo = { workspace = true } pallet-timestamp = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } - +# Cumulus +cumulus-primitives-storage-weight-reclaim = { workspace = true } # Frontier fp-account = { workspace = true, features = ["serde"] } fp-evm = { workspace = true, features = ["serde"] } @@ -96,6 +97,7 @@ std = [ "pallet-timestamp/std", "pallet-transaction-payment/std", "pallet-transaction-payment-rpc-runtime-api/std", + "cumulus-primitives-storage-weight-reclaim/std", # Frontier "fp-account/std", "fp-evm/std", diff --git a/template/runtime/src/lib.rs b/template/runtime/src/lib.rs index 27e0611c8f..7baa2ca305 100644 --- a/template/runtime/src/lib.rs +++ b/template/runtime/src/lib.rs @@ -48,7 +48,7 @@ use pallet_transaction_payment::{ConstFeeMultiplier, FungibleAdapter}; use sp_genesis_builder::PresetId; // Frontier use fp_account::EthereumSignature; -use fp_evm::weight_per_gas; +use fp_evm::{weight_per_gas, TransactionPov}; use fp_rpc::TransactionStatus; use pallet_ethereum::{Call::transact, PostLogContent, Transaction as EthereumTransaction}; use pallet_evm::{ @@ -118,6 +118,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim, ); /// Unchecked extrinsic type as expected by this runtime. @@ -805,46 +806,15 @@ impl_runtime_apis! { None }; - // Estimated encoded transaction size must be based on the heaviest transaction - // type (EIP1559Transaction) to be compatible with all transaction types. - let mut estimated_transaction_len = data.len() + - // pallet ethereum index: 1 - // transact call index: 1 - // Transaction enum variant: 1 - // chain_id 8 bytes - // nonce: 32 - // max_priority_fee_per_gas: 32 - // max_fee_per_gas: 32 - // gas_limit: 32 - // action: 21 (enum varianrt + call address) - // value: 32 - // access_list: 1 (empty vec size) - // 65 bytes signature - 258; - - if access_list.is_some() { - estimated_transaction_len += access_list.encoded_size(); - } - - - let gas_limit = if gas_limit > U256::from(u64::MAX) { - u64::MAX - } else { - gas_limit.low_u64() - }; - let without_base_extrinsic_weight = true; - - let (weight_limit, proof_size_base_cost) = - match ::GasWeightMapping::gas_to_weight( - gas_limit, - without_base_extrinsic_weight - ) { - weight_limit if weight_limit.proof_size() > 0 => { - (Some(weight_limit), Some(estimated_transaction_len as u64)) - } - _ => (None, None), - }; - + let gas_limit = if gas_limit > U256::from(u64::MAX) { + u64::MAX + } else { + gas_limit.low_u64() + }; + let weight_limit = ::GasWeightMapping::gas_to_weight(gas_limit, true); + let transaction_pov = cumulus_primitives_storage_weight_reclaim::get_proof_size().map( + |proof_size_pre_execution| { TransactionPov::new(weight_limit, proof_size_pre_execution) }, + ); ::Runner::call( from, to, @@ -857,8 +827,7 @@ impl_runtime_apis! { access_list.unwrap_or_default(), false, true, - weight_limit, - proof_size_base_cost, + transaction_pov, config.as_ref().unwrap_or(::config()), ).map_err(|err| err.error.into()) } @@ -884,46 +853,15 @@ impl_runtime_apis! { None }; - - let mut estimated_transaction_len = data.len() + - // from: 20 - // value: 32 - // gas_limit: 32 - // nonce: 32 - // 1 byte transaction action variant - // chain id 8 bytes - // 65 bytes signature - 190; - - if max_fee_per_gas.is_some() { - estimated_transaction_len += 32; - } - if max_priority_fee_per_gas.is_some() { - estimated_transaction_len += 32; - } - if access_list.is_some() { - estimated_transaction_len += access_list.encoded_size(); - } - - let gas_limit = if gas_limit > U256::from(u64::MAX) { u64::MAX } else { gas_limit.low_u64() }; - let without_base_extrinsic_weight = true; - - let (weight_limit, proof_size_base_cost) = - match ::GasWeightMapping::gas_to_weight( - gas_limit, - without_base_extrinsic_weight - ) { - weight_limit if weight_limit.proof_size() > 0 => { - (Some(weight_limit), Some(estimated_transaction_len as u64)) - } - _ => (None, None), - }; - + let weight_limit = ::GasWeightMapping::gas_to_weight(gas_limit, true); + let transaction_pov = cumulus_primitives_storage_weight_reclaim::get_proof_size().map( + |proof_size_pre_execution| { TransactionPov::new(weight_limit, proof_size_pre_execution) }, + ); ::Runner::create( from, data, @@ -935,8 +873,7 @@ impl_runtime_apis! { access_list.unwrap_or_default(), false, true, - weight_limit, - proof_size_base_cost, + transaction_pov, config.as_ref().unwrap_or(::config()), ).map_err(|err| err.error.into()) }