diff --git a/Cargo.lock b/Cargo.lock index ee3eb60b76..6e88a419dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,15 +329,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anstream" version = "0.6.15" @@ -1151,15 +1142,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "beef" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" -dependencies = [ - "serde", -] - [[package]] name = "bincode" version = "1.3.3" @@ -2563,11 +2545,7 @@ version = "0.1.0" dependencies = [ "async-trait", "sc-consensus", - "sp-blockchain", - "sp-consensus", - "sp-core", "sp-runtime", - "substrate-prometheus-endpoint", ] [[package]] @@ -2670,12 +2648,13 @@ dependencies = [ "fc-storage", "fp-rpc", "futures", - "jsonrpsee 0.23.2", + "jsonrpsee", "pallet-transaction-payment-rpc", "parity-scale-codec", "sc-client-api", "sc-network-sync", "sc-rpc", + "sc-rpc-server", "sc-service", "sc-transaction-pool", "sc-transaction-pool-api", @@ -2715,7 +2694,6 @@ dependencies = [ name = "domain-runtime-primitives" version = "0.1.0" dependencies = [ - "fixed-hash", "fp-account", "frame-support", "frame-system", @@ -2743,7 +2721,7 @@ dependencies = [ "domain-runtime-primitives", "frame-benchmarking", "futures", - "jsonrpsee 0.23.2", + "jsonrpsee", "log", "pallet-transaction-payment-rpc", "parity-scale-codec", @@ -2758,8 +2736,7 @@ dependencies = [ "sc-network-sync", "sc-network-transactions", "sc-rpc", - "sc-rpc-api", - "sc-rpc-spec-v2", + "sc-rpc-server", "sc-service", "sc-telemetry", "sc-transaction-pool", @@ -3410,7 +3387,7 @@ checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "async-trait", "fp-storage", @@ -3422,7 +3399,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "async-trait", "fp-consensus", @@ -3438,7 +3415,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "async-trait", "fc-api", @@ -3457,7 +3434,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "fc-db", "fc-storage", @@ -3478,7 +3455,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "ethereum", "ethereum-types", @@ -3492,7 +3469,7 @@ dependencies = [ "fp-storage", "futures", "hex", - "jsonrpsee 0.23.2", + "jsonrpsee", "libsecp256k1", "log", "pallet-evm", @@ -3532,11 +3509,11 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "ethereum", "ethereum-types", - "jsonrpsee 0.23.2", + "jsonrpsee", "rlp", "rustc-hex", "serde", @@ -3547,7 +3524,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "ethereum", "ethereum-types", @@ -3681,7 +3658,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "13.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", ] @@ -3708,7 +3685,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "hex", "impl-serde", @@ -3727,7 +3704,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "ethereum", "parity-scale-codec", @@ -3738,7 +3715,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "ethereum", "ethereum-types", @@ -3750,7 +3727,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "evm", "frame-support", @@ -3765,7 +3742,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "ethereum", "ethereum-types", @@ -3781,7 +3758,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "frame-support", "parity-scale-codec", @@ -3793,7 +3770,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "parity-scale-codec", "serde", @@ -3807,8 +3784,8 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-support", "frame-support-procedural", @@ -3831,8 +3808,8 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "42.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "43.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "Inflector", "array-bytes", @@ -3881,8 +3858,8 @@ dependencies = [ [[package]] name = "frame-executive" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "aquamarine", "frame-support", @@ -3911,8 +3888,8 @@ dependencies = [ [[package]] name = "frame-support" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "aquamarine", "array-bytes", @@ -3952,12 +3929,13 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "30.0.2" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "30.0.3" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", + "docify", "expander", "frame-support-procedural-tools", "itertools 0.11.0", @@ -3972,7 +3950,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "13.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.1.0", @@ -3984,7 +3962,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "12.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "proc-macro2", "quote", @@ -3993,8 +3971,8 @@ dependencies = [ [[package]] name = "frame-system" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "cfg-if", "docify", @@ -4013,8 +3991,8 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-benchmarking", "frame-support", @@ -4028,7 +4006,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "docify", "parity-scale-codec", @@ -4037,8 +4015,8 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.43.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.44.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-support", "parity-scale-codec", @@ -5248,39 +5226,29 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.23.2" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b089779ad7f80768693755a031cc14a7766aba707cbe886674e3f79e9b7e47" +checksum = "126b48a5acc3c52fbd5381a77898cb60e145123179588a29e7ac48f9c06e401b" dependencies = [ - "jsonrpsee-core 0.23.2", + "jsonrpsee-core", "jsonrpsee-proc-macros", "jsonrpsee-server", - "jsonrpsee-types 0.23.2", + "jsonrpsee-types", + "jsonrpsee-ws-client", "tokio", "tracing", ] -[[package]] -name = "jsonrpsee" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1d83ae9ed70d8e3440db663e343a82f93913104744cd543bbcdd1dbc0e35d3" -dependencies = [ - "jsonrpsee-core 0.24.2", - "jsonrpsee-types 0.24.2", - "jsonrpsee-ws-client", -] - [[package]] name = "jsonrpsee-client-transport" -version = "0.24.2" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be764c8b96cdcd2974655560a1c6542a366440d47c88114894cc20c24317815" +checksum = "bf679a8e0e083c77997f7c4bb4ca826577105906027ae462aac70ff348d02c6a" dependencies = [ "base64 0.22.1", "futures-util", "http 1.1.0", - "jsonrpsee-core 0.24.2", + "jsonrpsee-core", "pin-project", "rustls 0.23.12", "rustls-pki-types", @@ -5296,40 +5264,21 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.23.2" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79712302e737d23ca0daa178e752c9334846b08321d439fd89af9a384f8c830b" +checksum = "b0e503369a76e195b65af35058add0e6900b794a4e9a9316900ddd3a87a80477" dependencies = [ - "anyhow", "async-trait", - "beef", "bytes", + "futures-timer", "futures-util", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "jsonrpsee-types 0.23.2", + "jsonrpsee-types", "parking_lot 0.12.3", - "rand", - "rustc-hash 1.1.0", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "jsonrpsee-core" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b772fb8aa2b511eeed75f7e19d8e5fa57be7e8202249470bf26210727399c7" -dependencies = [ - "async-trait", - "futures-timer", - "futures-util", - "jsonrpsee-types 0.24.2", "pin-project", + "rand", "rustc-hash 2.0.0", "serde", "serde_json", @@ -5341,9 +5290,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.23.2" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7895f186d5921065d96e16bd795e5ca89ac8356ec423fafc6e3d7cf8ec11aee4" +checksum = "fc660a9389e2748e794a40673a4155d501f32db667757cdb80edeff0306b489b" dependencies = [ "heck 0.5.0", "proc-macro-crate 3.1.0", @@ -5354,19 +5303,18 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.23.2" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "654afab2e92e5d88ebd8a39d6074483f3f2bfdf91c5ac57fe285e7127cdd4f51" +checksum = "af6e6c9b6d975edcb443565d648b605f3e85a04ec63aa6941811a8894cc9cded" dependencies = [ - "anyhow", "futures-util", "http 1.1.0", "http-body 1.0.1", "http-body-util", "hyper 1.4.1", "hyper-util", - "jsonrpsee-core 0.23.2", - "jsonrpsee-types 0.23.2", + "jsonrpsee-core", + "jsonrpsee-types", "pin-project", "route-recognizer", "serde", @@ -5382,22 +5330,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.23.2" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c465fbe385238e861fdc4d1c85e04ada6c1fd246161d26385c1b311724d2af" -dependencies = [ - "beef", - "http 1.1.0", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "jsonrpsee-types" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98deeee954567f75632fa40666ac93a66d4f9f4ed4ca15bd6b7ed0720b53e761" +checksum = "d8fb16314327cbc94fdf7965ef7e4422509cd5597f76d137bd104eb34aeede67" dependencies = [ "http 1.1.0", "serde", @@ -5407,14 +5342,14 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.24.2" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385cf0a6103a9f64987cdf0f7c9d0b08e1d7183dd952820beffb3676e7df7787" +checksum = "39aabf5d6c6f22da8d5b808eea1fab0736059f11fb42f71f141b14f404e5046a" dependencies = [ "http 1.1.0", "jsonrpsee-client-transport", - "jsonrpsee-core 0.24.2", - "jsonrpsee-types 0.24.2", + "jsonrpsee-core", + "jsonrpsee-types", "url", ] @@ -6913,8 +6848,8 @@ dependencies = [ [[package]] name = "mmr-gadget" -version = "39.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "40.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "futures", "log", @@ -6933,9 +6868,9 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ - "jsonrpsee 0.23.2", + "jsonrpsee", "parity-scale-codec", "serde", "sp-api", @@ -7570,8 +7505,8 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "38.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "39.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "docify", "frame-benchmarking", @@ -7586,7 +7521,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "fp-evm", "frame-support", @@ -7615,8 +7550,8 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-benchmarking", "frame-support", @@ -7631,8 +7566,8 @@ dependencies = [ [[package]] name = "pallet-democracy" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-benchmarking", "frame-support", @@ -7707,7 +7642,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "ethereum", "ethereum-types", @@ -7729,7 +7664,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "environmental", "evm", @@ -7752,7 +7687,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "frame-support", "frame-system", @@ -7775,7 +7710,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "fp-evm", "num", @@ -7784,7 +7719,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "fp-evm", "tiny-keccak", @@ -7793,7 +7728,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/polkadot-evm/frontier?rev=2e219e17a526125da003e64ef22ec037917083fa#2e219e17a526125da003e64ef22ec037917083fa" +source = "git+https://github.com/autonomys/frontier?rev=f80f9e2bad338f3bf3854b256b3c4edea23e5968#f80f9e2bad338f3bf3854b256b3c4edea23e5968" dependencies = [ "fp-evm", "ripemd", @@ -7841,8 +7776,8 @@ dependencies = [ [[package]] name = "pallet-mmr" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-benchmarking", "frame-support", @@ -7858,8 +7793,8 @@ dependencies = [ [[package]] name = "pallet-preimage" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-benchmarking", "frame-support", @@ -7907,8 +7842,8 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "38.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "39.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "docify", "frame-benchmarking", @@ -7969,8 +7904,8 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "docify", "frame-benchmarking", @@ -7984,8 +7919,8 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "36.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "37.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "docify", "frame-benchmarking", @@ -8014,8 +7949,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-support", "frame-system", @@ -8029,10 +7964,10 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" -version = "40.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "41.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ - "jsonrpsee 0.23.2", + "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", @@ -8045,8 +7980,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -8077,8 +8012,8 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-benchmarking", "frame-support", @@ -9105,9 +9040,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -9775,7 +9710,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "29.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "log", "sp-core", @@ -9785,8 +9720,8 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.44.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.45.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "futures", "futures-timer", @@ -9808,7 +9743,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.42.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", "sp-api", @@ -9822,8 +9757,8 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "docify", @@ -9850,7 +9785,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "12.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", @@ -9860,8 +9795,8 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.46.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.47.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "chrono", @@ -9902,7 +9837,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "fnv", "futures", @@ -9929,7 +9864,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.44.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "hash-db", "kvdb", @@ -9953,10 +9888,9 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.43.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.44.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ - "async-lock 3.4.0", "async-trait", "futures", "log", @@ -9974,13 +9908,12 @@ dependencies = [ "sp-state-machine", "substrate-prometheus-endpoint", "thiserror", - "tokio", ] [[package]] name = "sc-consensus-aura" -version = "0.44.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.45.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "futures", @@ -10008,8 +9941,8 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.43.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.44.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "futures", @@ -10076,7 +10009,7 @@ dependencies = [ "async-oneshot", "futures", "futures-timer", - "jsonrpsee 0.23.2", + "jsonrpsee", "parking_lot 0.12.3", "sc-client-api", "sc-consensus-subspace", @@ -10123,8 +10056,8 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.40.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.40.1" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -10147,7 +10080,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.35.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "polkavm", "sc-allocator", @@ -10160,7 +10093,7 @@ dependencies = [ [[package]] name = "sc-executor-polkavm" version = "0.32.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "log", "polkavm", @@ -10171,7 +10104,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.35.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "anyhow", "cfg-if", @@ -10188,10 +10121,10 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.43.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.44.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ - "ansi_term", + "console", "futures", "futures-timer", "log", @@ -10206,7 +10139,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "33.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "parking_lot 0.12.3", @@ -10219,8 +10152,8 @@ dependencies = [ [[package]] name = "sc-mixnet" -version = "0.14.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.15.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "arrayvec", @@ -10248,8 +10181,8 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.44.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.45.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -10299,8 +10232,8 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.43.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.44.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -10317,8 +10250,8 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.44.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.45.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "ahash", "futures", @@ -10336,8 +10269,8 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.43.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.44.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -10357,8 +10290,8 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.43.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.44.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -10394,8 +10327,8 @@ dependencies = [ [[package]] name = "sc-network-transactions" -version = "0.43.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.44.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "futures", @@ -10414,7 +10347,7 @@ dependencies = [ [[package]] name = "sc-network-types" version = "0.12.1" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "bs58 0.5.1", "ed25519-dalek", @@ -10430,8 +10363,8 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "39.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "40.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "bytes", @@ -10494,7 +10427,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.18.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10502,11 +10435,11 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "39.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "40.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "futures", - "jsonrpsee 0.23.2", + "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.3", @@ -10534,10 +10467,10 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.43.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.44.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ - "jsonrpsee 0.23.2", + "jsonrpsee", "parity-scale-codec", "sc-chain-spec", "sc-mixnet", @@ -10554,9 +10487,10 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "16.0.2" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "17.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ + "dyn-clone", "forwarded-header-value", "futures", "governor", @@ -10564,8 +10498,9 @@ dependencies = [ "http-body-util", "hyper 1.4.1", "ip_network", - "jsonrpsee 0.23.2", + "jsonrpsee", "log", + "sc-rpc-api", "serde", "serde_json", "substrate-prometheus-endpoint", @@ -10576,14 +10511,14 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.44.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.45.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "futures", "futures-util", "hex", - "jsonrpsee 0.23.2", + "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.3", @@ -10608,15 +10543,15 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.45.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.46.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "directories", "exit-future", "futures", "futures-timer", - "jsonrpsee 0.23.2", + "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.3", @@ -10673,7 +10608,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.36.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "log", "parity-scale-codec", @@ -10684,7 +10619,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.22.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "clap", "fs4 0.7.0", @@ -10725,8 +10660,8 @@ version = "0.1.0" [[package]] name = "sc-sysinfo" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "38.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "derive_more 0.99.18", "futures", @@ -10746,8 +10681,8 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "24.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "25.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "chrono", "futures", @@ -10766,18 +10701,17 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "37.0.1" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ - "ansi_term", "chrono", + "console", "is-terminal", "lazy_static", "libc", "log", "parity-scale-codec", "parking_lot 0.12.3", - "regex", "rustc-hash 1.1.0", "sc-client-api", "sc-tracing-proc-macro", @@ -10797,7 +10731,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "11.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", @@ -10808,7 +10742,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "futures", @@ -10835,7 +10769,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "futures", @@ -10851,7 +10785,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "17.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-channel 1.9.0", "futures", @@ -11054,9 +10988,9 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.206" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -11072,9 +11006,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.206" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -11083,9 +11017,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.124" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -11375,7 +11309,7 @@ dependencies = [ [[package]] name = "sp-api" version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "docify", "hash-db", @@ -11397,7 +11331,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "20.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "Inflector", "blake2 0.10.6", @@ -11411,7 +11345,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "38.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", "scale-info", @@ -11423,7 +11357,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "26.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "docify", "integer-sqrt", @@ -11450,7 +11384,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "sp-api", "sp-inherents", @@ -11470,8 +11404,8 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "37.0.1" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "futures", "parity-scale-codec", @@ -11490,7 +11424,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.40.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "futures", @@ -11505,7 +11439,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.40.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "parity-scale-codec", @@ -11520,8 +11454,8 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" -version = "22.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "22.1.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "lazy_static", "parity-scale-codec", @@ -11535,13 +11469,14 @@ dependencies = [ "sp-keystore", "sp-mmr-primitives", "sp-runtime", + "sp-weights", "strum 0.26.3", ] [[package]] name = "sp-consensus-grandpa" version = "21.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "finality-grandpa", "log", @@ -11557,8 +11492,8 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.40.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.40.1" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", "scale-info", @@ -11595,7 +11530,7 @@ dependencies = [ [[package]] name = "sp-core" version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "bitflags 1.3.2", @@ -11631,7 +11566,7 @@ dependencies = [ "sp-std", "sp-storage", "ss58-registry", - "substrate-bip39 0.6.0 (git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631)", + "substrate-bip39 0.6.0 (git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42)", "thiserror", "tracing", "w3f-bls", @@ -11641,7 +11576,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "blake2b_simd", "byteorder", @@ -11654,7 +11589,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "quote", "sp-crypto-hashing", @@ -11664,7 +11599,7 @@ dependencies = [ [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -11673,7 +11608,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "proc-macro2", "quote", @@ -11796,7 +11731,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.29.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "environmental", "parity-scale-codec", @@ -11805,8 +11740,8 @@ dependencies = [ [[package]] name = "sp-genesis-builder" -version = "0.15.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "0.15.1" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", "scale-info", @@ -11818,7 +11753,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11831,7 +11766,7 @@ dependencies = [ [[package]] name = "sp-io" version = "38.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "bytes", "docify", @@ -11857,7 +11792,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "39.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "sp-core", "sp-runtime", @@ -11867,7 +11802,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.40.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -11878,7 +11813,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "thiserror", "zstd 0.12.4", @@ -11926,7 +11861,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.7.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -11936,7 +11871,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.12.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", "scale-info", @@ -11946,8 +11881,8 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" -version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "34.1.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "log", "parity-scale-codec", @@ -11973,7 +11908,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "sp-api", "sp-core", @@ -11983,7 +11918,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "backtrace", "lazy_static", @@ -11993,7 +11928,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "32.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "rustc-hash 1.1.0", "serde", @@ -12002,8 +11937,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "39.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "39.0.1" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "docify", "either", @@ -12029,7 +11964,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "28.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -12048,7 +11983,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "18.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "Inflector", "expander", @@ -12060,8 +11995,8 @@ dependencies = [ [[package]] name = "sp-session" -version = "35.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "36.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", "scale-info", @@ -12074,8 +12009,8 @@ dependencies = [ [[package]] name = "sp-staking" -version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "36.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -12088,7 +12023,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.43.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "hash-db", "log", @@ -12108,7 +12043,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "18.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "aes-gcm", "curve25519-dalek", @@ -12132,12 +12067,12 @@ dependencies = [ [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" [[package]] name = "sp-storage" version = "21.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12165,7 +12100,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "parity-scale-codec", @@ -12176,8 +12111,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "17.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "17.0.1" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", "tracing", @@ -12188,7 +12123,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "sp-api", "sp-runtime", @@ -12197,7 +12132,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "34.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "async-trait", "parity-scale-codec", @@ -12211,7 +12146,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "ahash", "hash-db", @@ -12234,7 +12169,7 @@ dependencies = [ [[package]] name = "sp-version" version = "37.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12251,9 +12186,10 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "14.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "parity-scale-codec", + "proc-macro-warning 1.0.2", "proc-macro2", "quote", "syn 2.0.74", @@ -12261,8 +12197,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "21.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "21.0.1" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -12274,7 +12210,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "31.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -12352,8 +12288,8 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-xcm" -version = "14.1.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "14.2.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "bounded-collections", @@ -12364,6 +12300,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-runtime", "sp-weights", "xcm-procedural", ] @@ -12579,7 +12516,7 @@ dependencies = [ "futures", "hex", "hwlocality", - "jsonrpsee 0.24.2", + "jsonrpsee", "mimalloc", "num_cpus", "parity-scale-codec", @@ -12793,7 +12730,6 @@ dependencies = [ "sc-consensus-slots", "sc-consensus-subspace", "sc-domains", - "sc-informant", "sc-keystore", "sc-network", "sc-network-sync", @@ -12980,7 +12916,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "futures", "hex", - "jsonrpsee 0.23.2", + "jsonrpsee", "mmr-gadget", "mmr-rpc", "pallet-transaction-payment-rpc", @@ -12988,7 +12924,6 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "prometheus-client 0.22.3", - "prost 0.12.6", "rayon", "sc-basic-authorship", "sc-chain-spec", @@ -13008,7 +12943,6 @@ dependencies = [ "sc-proof-of-time", "sc-rpc", "sc-rpc-api", - "sc-rpc-spec-v2", "sc-service", "sc-subspace-block-relay", "sc-sysinfo", @@ -13164,7 +13098,7 @@ dependencies = [ "domain-runtime-primitives", "frame-system", "futures", - "jsonrpsee 0.23.2", + "jsonrpsee", "mmr-gadget", "pallet-domains", "pallet-transaction-payment", @@ -13240,7 +13174,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.6.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -13252,17 +13186,17 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" [[package]] name = "substrate-frame-rpc-system" -version = "38.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "39.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "docify", "frame-system-rpc-runtime-api", "futures", - "jsonrpsee 0.23.2", + "jsonrpsee", "log", "parity-scale-codec", "sc-rpc-api", @@ -13277,7 +13211,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "http-body-util", "hyper 1.4.1", @@ -13291,7 +13225,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "array-bytes", "async-trait", @@ -13317,13 +13251,14 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "24.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +version = "24.0.1" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "build-helper", "cargo_metadata", "console", "filetime", + "jobserver", "parity-wasm", "polkavm-linker", "sp-maybe-compressed-blob", @@ -13863,6 +13798,7 @@ dependencies = [ "sharded-slab", "smallvec", "thread_local", + "time", "tracing", "tracing-core", "tracing-log", @@ -15034,7 +14970,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "10.1.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631#5626154d0781ac9a6ffd5a6207ed237f425ae631" +source = "git+https://github.com/subspace/polkadot-sdk?rev=5871818e1d736f1843eb9078f886290695165c42#5871818e1d736f1843eb9078f886290695165c42" dependencies = [ "Inflector", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 8a28b195f9..5ac23c7f5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,48 +92,48 @@ litep2p = { git = "https://github.com/subspace/litep2p", rev = "1ea540c6af3ed85a # Reason: We need to patch substrate dependency of frontier to our fork # TODO: Remove if/when we are using upstream substrate instead of fork [patch."https://github.com/paritytech/polkadot-sdk.git"] -frame-benchmarking = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-client-db = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus-aura = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-common = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-application-crypto = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-arithmetic = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus-aura = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-crypto-hashing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-database = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-debug-derive = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-keystore = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime-interface = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-storage = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-trie = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-weights = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -staging-xcm = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -xcm-procedural = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-client-db = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus-aura = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-common = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-application-crypto = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-arithmetic = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus-aura = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-crypto-hashing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-database = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-debug-derive = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-keystore = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime-interface = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-storage = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-trie = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-weights = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +staging-xcm = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +xcm-procedural = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } diff --git a/crates/pallet-domains/Cargo.toml b/crates/pallet-domains/Cargo.toml index 0f5731138f..9f58a57b6c 100644 --- a/crates/pallet-domains/Cargo.toml +++ b/crates/pallet-domains/Cargo.toml @@ -14,31 +14,31 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } log = { version = "0.4.22", default-features = false } -pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", default-features = false, path = "../sp-domains-fraud-proof" } -sp-io = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-io = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../sp-subspace-mmr" } -sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", features = ["serde"] } +sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", features = ["serde"] } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } [dev-dependencies] domain-pallet-executive = { version = "0.1.0", default-features = false, path = "../../domains/pallets/executive" } hex-literal = "0.4.1" -pallet-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-block-fees = { version = "0.1.0", default-features = false, path = "../../domains/pallets/block-fees" } -sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/crates/pallet-domains/src/runtime_registry.rs b/crates/pallet-domains/src/runtime_registry.rs index 3956c23d76..f1e22056b2 100644 --- a/crates/pallet-domains/src/runtime_registry.rs +++ b/crates/pallet-domains/src/runtime_registry.rs @@ -342,8 +342,7 @@ mod tests { impl_version: 1, apis: Default::default(), transaction_version: 1, - state_version: 0, - extrinsic_state_version: 0, + system_version: 0, }; let read_runtime_version = ReadRuntimeVersion(version.encode()); @@ -511,8 +510,7 @@ mod tests { impl_version: 1, apis: Default::default(), transaction_version: 1, - state_version: 0, - extrinsic_state_version: 0, + system_version: 0, }; ext.execute_with(|| { diff --git a/crates/pallet-domains/src/staking_epoch.rs b/crates/pallet-domains/src/staking_epoch.rs index 09db7bd79e..072c5a6238 100644 --- a/crates/pallet-domains/src/staking_epoch.rs +++ b/crates/pallet-domains/src/staking_epoch.rs @@ -13,8 +13,6 @@ use crate::{ bundle_storage_fund, BalanceOf, Config, DepositOnHold, ElectionVerificationParams, Event, HoldIdentifier, OperatorEpochSharePrice, Pallet, }; -#[cfg(not(feature = "std"))] -use alloc::vec; use codec::{Decode, Encode}; use frame_support::traits::fungible::{Inspect, Mutate, MutateHold}; use frame_support::traits::tokens::{ @@ -531,6 +529,8 @@ mod tests { }; use crate::tests::{new_test_ext, Test}; use crate::{BalanceOf, Config, ExecutionReceiptOf, HoldIdentifier, NominatorId}; + #[cfg(not(feature = "std"))] + use alloc::vec; use codec::Encode; use frame_support::assert_ok; use frame_support::traits::fungible::InspectHold; diff --git a/crates/pallet-domains/src/tests.rs b/crates/pallet-domains/src/tests.rs index 1210a4d50e..f3848f3927 100644 --- a/crates/pallet-domains/src/tests.rs +++ b/crates/pallet-domains/src/tests.rs @@ -326,8 +326,7 @@ pub(crate) fn new_test_ext_with_extensions() -> sp_io::TestExternalities { impl_version: 1, apis: Default::default(), transaction_version: 1, - state_version: 0, - extrinsic_state_version: 0, + system_version: 2, }; let mut ext = new_test_ext(); diff --git a/crates/pallet-history-seeding/Cargo.toml b/crates/pallet-history-seeding/Cargo.toml index 86cd70421e..e5dbeab17b 100644 --- a/crates/pallet-history-seeding/Cargo.toml +++ b/crates/pallet-history-seeding/Cargo.toml @@ -15,17 +15,17 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [dev-dependencies] -pallet-sudo = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", features = ["std"] } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-io = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-sudo = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", features = ["std"] } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-io = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/crates/pallet-rewards/Cargo.toml b/crates/pallet-rewards/Cargo.toml index c6c4824e4e..4f80389d04 100644 --- a/crates/pallet-rewards/Cargo.toml +++ b/crates/pallet-rewards/Cargo.toml @@ -19,19 +19,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } log = { version = "0.4.22", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.206", default-features = false, features = ["alloc", "derive"] } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +serde = { version = "1.0.110", default-features = false, features = ["alloc", "derive"] } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } [dev-dependencies] -pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/crates/pallet-runtime-configs/Cargo.toml b/crates/pallet-runtime-configs/Cargo.toml index 2dd7b1d2f3..a8d61c7bac 100644 --- a/crates/pallet-runtime-configs/Cargo.toml +++ b/crates/pallet-runtime-configs/Cargo.toml @@ -17,13 +17,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } [features] diff --git a/crates/pallet-subspace-mmr/Cargo.toml b/crates/pallet-subspace-mmr/Cargo.toml index 29e93816b2..4a4dfe4781 100644 --- a/crates/pallet-subspace-mmr/Cargo.toml +++ b/crates/pallet-subspace-mmr/Cargo.toml @@ -17,13 +17,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../sp-subspace-mmr" } [features] diff --git a/crates/pallet-subspace/Cargo.toml b/crates/pallet-subspace/Cargo.toml index 1b1add1057..8674896b9b 100644 --- a/crates/pallet-subspace/Cargo.toml +++ b/crates/pallet-subspace/Cargo.toml @@ -14,17 +14,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } log = { version = "0.4.22", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } schnorrkel = { version = "0.11.4", default-features = false } -serde = { version = "1.0.206", optional = true, default-features = false, features = ["alloc", "derive"] } +serde = { version = "1.0.110", optional = true, default-features = false, features = ["alloc", "derive"] } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } -sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } subspace-verification = { version = "0.1.0", path = "../subspace-verification", default-features = false } @@ -32,9 +32,9 @@ subspace-verification = { version = "0.1.0", path = "../subspace-verification", [dev-dependencies] env_logger = "0.11.5" futures = "0.3.29" -pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } rand = { version = "0.8.5", features = ["min_const_gen"] } -sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-farmer-components = { version = "0.1.0", path = "../subspace-farmer-components" } diff --git a/crates/pallet-transaction-fees/Cargo.toml b/crates/pallet-transaction-fees/Cargo.toml index 4a34bfa21d..ece8de7bd1 100644 --- a/crates/pallet-transaction-fees/Cargo.toml +++ b/crates/pallet-transaction-fees/Cargo.toml @@ -19,8 +19,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } diff --git a/crates/sc-consensus-subspace-rpc/Cargo.toml b/crates/sc-consensus-subspace-rpc/Cargo.toml index 576a586403..718482f492 100644 --- a/crates/sc-consensus-subspace-rpc/Cargo.toml +++ b/crates/sc-consensus-subspace-rpc/Cargo.toml @@ -16,21 +16,21 @@ targets = ["x86_64-unknown-linux-gnu"] async-oneshot = "0.5.9" futures = "0.3.29" futures-timer = "3.0.3" -jsonrpsee = { version = "0.23.2", features = ["server", "macros"] } +jsonrpsee = { version = "0.24.5", features = ["server", "macros"] } parking_lot = "0.12.2" schnellru = "0.2.3" -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } -sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-rpc-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-rpc-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-objects = { version = "0.1.0", path = "../sp-objects" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-erasure-coding = { version = "0.1.0", path = "../subspace-erasure-coding" } diff --git a/crates/sc-consensus-subspace-rpc/src/lib.rs b/crates/sc-consensus-subspace-rpc/src/lib.rs index 12029dcc2d..094fd4f8a4 100644 --- a/crates/sc-consensus-subspace-rpc/src/lib.rs +++ b/crates/sc-consensus-subspace-rpc/src/lib.rs @@ -24,7 +24,7 @@ use futures::{future, stream, FutureExt, StreamExt}; use jsonrpsee::core::async_trait; use jsonrpsee::proc_macros::rpc; use jsonrpsee::types::{ErrorObject, ErrorObjectOwned}; -use jsonrpsee::PendingSubscriptionSink; +use jsonrpsee::{Extensions, PendingSubscriptionSink}; use parking_lot::Mutex; use sc_client_api::{AuxStore, BlockBackend}; use sc_consensus_subspace::archiver::{ @@ -34,9 +34,9 @@ use sc_consensus_subspace::notification::SubspaceNotificationStream; use sc_consensus_subspace::slot_worker::{ NewSlotNotification, RewardSigningNotification, SubspaceSyncOracle, }; -use sc_rpc::utils::pipe_from_stream; +use sc_rpc::utils::{BoundedVecDeque, PendingSubscription}; use sc_rpc::SubscriptionTaskExecutor; -use sc_rpc_api::{DenyUnsafe, UnsafeRpcError}; +use sc_rpc_api::{check_if_safe, UnsafeRpcError}; use sc_utils::mpsc::TracingUnboundedSender; use schnellru::{ByLength, LruMap}; use sp_api::{ApiError, ProvideRuntimeApi}; @@ -116,7 +116,7 @@ pub trait SubspaceRpcApi { #[method(name = "subspace_getFarmerAppInfo")] fn get_farmer_app_info(&self) -> Result; - #[method(name = "subspace_submitSolutionResponse")] + #[method(name = "subspace_submitSolutionResponse", with_extensions)] fn submit_solution_response(&self, solution_response: SolutionResponse) -> Result<(), Error>; /// Slot info subscription @@ -124,6 +124,7 @@ pub trait SubspaceRpcApi { name = "subspace_subscribeSlotInfo" => "subspace_slot_info", unsubscribe = "subspace_unsubscribeSlotInfo", item = SlotInfo, + with_extensions, )] fn subscribe_slot_info(&self); @@ -132,10 +133,11 @@ pub trait SubspaceRpcApi { name = "subspace_subscribeRewardSigning" => "subspace_reward_signing", unsubscribe = "subspace_unsubscribeRewardSigning", item = RewardSigningInfo, + with_extensions, )] fn subscribe_reward_signing(&self); - #[method(name = "subspace_submitRewardSignature")] + #[method(name = "subspace_submitRewardSignature", with_extensions)] fn submit_reward_signature( &self, reward_signature: RewardSignatureResponse, @@ -146,6 +148,7 @@ pub trait SubspaceRpcApi { name = "subspace_subscribeArchivedSegmentHeader" => "subspace_archived_segment_header", unsubscribe = "subspace_unsubscribeArchivedSegmentHeader", item = SegmentHeader, + with_extensions, )] fn subscribe_archived_segment_header(&self); @@ -155,10 +158,10 @@ pub trait SubspaceRpcApi { segment_indexes: Vec, ) -> Result>, Error>; - #[method(name = "subspace_piece", blocking)] + #[method(name = "subspace_piece", blocking, with_extensions)] fn piece(&self, piece_index: PieceIndex) -> Result, Error>; - #[method(name = "subspace_acknowledgeArchivedSegmentHeader")] + #[method(name = "subspace_acknowledgeArchivedSegmentHeader", with_extensions)] async fn acknowledge_archived_segment_header( &self, segment_index: SegmentIndex, @@ -239,8 +242,6 @@ where pub segment_headers_store: SegmentHeadersStore, /// Subspace sync oracle pub sync_oracle: SubspaceSyncOracle, - /// Signifies whether a potentially unsafe RPC should be denied - pub deny_unsafe: DenyUnsafe, /// Kzg instance pub kzg: Kzg, /// Erasure coding instance @@ -273,7 +274,6 @@ where max_pieces_in_sector: u16, kzg: Kzg, erasure_coding: ErasureCoding, - deny_unsafe: DenyUnsafe, _block: PhantomData, } @@ -331,7 +331,6 @@ where max_pieces_in_sector, kzg: config.kzg, erasure_coding: config.erasure_coding, - deny_unsafe: config.deny_unsafe, _block: PhantomData, }) } @@ -385,8 +384,12 @@ where }) } - fn submit_solution_response(&self, solution_response: SolutionResponse) -> Result<(), Error> { - self.deny_unsafe.check_if_safe()?; + fn submit_solution_response( + &self, + ext: &Extensions, + solution_response: SolutionResponse, + ) -> Result<(), Error> { + check_if_safe(ext)?; let slot = solution_response.slot_number; let mut solution_response_senders = self.solution_response_senders.lock(); @@ -408,10 +411,10 @@ where Ok(()) } - fn subscribe_slot_info(&self, pending: PendingSubscriptionSink) { + fn subscribe_slot_info(&self, pending: PendingSubscriptionSink, ext: &Extensions) { let executor = self.subscription_executor.clone(); let solution_response_senders = self.solution_response_senders.clone(); - let allow_solutions = self.deny_unsafe.check_if_safe().is_ok(); + let allow_solutions = check_if_safe(ext).is_ok(); let handle_slot_notification = move |new_slot_notification| { let NewSlotNotification { @@ -492,12 +495,14 @@ where self.subscription_executor.spawn( "subspace-slot-info-subscription", Some("rpc"), - pipe_from_stream(pending, stream).boxed(), + PendingSubscription::from(pending) + .pipe_from_stream(stream, BoundedVecDeque::default()) + .boxed(), ); } - fn subscribe_reward_signing(&self, pending: PendingSubscriptionSink) { - if self.deny_unsafe.check_if_safe().is_err() { + fn subscribe_reward_signing(&self, pending: PendingSubscriptionSink, ext: &Extensions) { + if check_if_safe(ext).is_err() { debug!("Unsafe subscribe_reward_signing ignored"); return; } @@ -561,15 +566,18 @@ where self.subscription_executor.spawn( "subspace-block-signing-subscription", Some("rpc"), - pipe_from_stream(pending, stream).boxed(), + PendingSubscription::from(pending) + .pipe_from_stream(stream, BoundedVecDeque::default()) + .boxed(), ); } fn submit_reward_signature( &self, + ext: &Extensions, reward_signature: RewardSignatureResponse, ) -> Result<(), Error> { - self.deny_unsafe.check_if_safe()?; + check_if_safe(ext)?; let reward_signature_senders = self.reward_signature_senders.clone(); @@ -586,13 +594,17 @@ where Ok(()) } - fn subscribe_archived_segment_header(&self, pending: PendingSubscriptionSink) { + fn subscribe_archived_segment_header( + &self, + pending: PendingSubscriptionSink, + ext: &Extensions, + ) { let archived_segment_acknowledgement_senders = self.archived_segment_acknowledgement_senders.clone(); let cached_archived_segment = Arc::clone(&self.cached_archived_segment); let subscription_id = self.next_subscription_id.fetch_add(1, Ordering::Relaxed); - let allow_acknowledgements = self.deny_unsafe.check_if_safe().is_ok(); + let allow_acknowledgements = check_if_safe(ext).is_ok(); let stream = self .archived_segment_notification_stream @@ -652,7 +664,9 @@ where let archived_segment_acknowledgement_senders = self.archived_segment_acknowledgement_senders.clone(); let fut = async move { - pipe_from_stream(pending, stream).await; + PendingSubscription::from(pending) + .pipe_from_stream(stream, BoundedVecDeque::default()) + .await; let mut archived_segment_acknowledgement_senders = archived_segment_acknowledgement_senders.lock(); @@ -671,9 +685,10 @@ where async fn acknowledge_archived_segment_header( &self, + ext: &Extensions, segment_index: SegmentIndex, ) -> Result<(), Error> { - self.deny_unsafe.check_if_safe()?; + check_if_safe(ext)?; let archived_segment_acknowledgement_senders = self.archived_segment_acknowledgement_senders.clone(); @@ -710,8 +725,12 @@ where } // Note: this RPC uses the cached archived segment, which is only updated by archived segments subscriptions - fn piece(&self, requested_piece_index: PieceIndex) -> Result, Error> { - self.deny_unsafe.check_if_safe()?; + fn piece( + &self, + ext: &Extensions, + requested_piece_index: PieceIndex, + ) -> Result, Error> { + check_if_safe(ext)?; let archived_segment = { let mut cached_archived_segment = self.cached_archived_segment.lock(); @@ -843,7 +862,9 @@ where self.subscription_executor.spawn( "subspace-archived-object-mappings-subscription", Some("rpc"), - pipe_from_stream(pending, mapping_stream).boxed(), + PendingSubscription::from(pending) + .pipe_from_stream(mapping_stream, BoundedVecDeque::default()) + .boxed(), ); } @@ -904,7 +925,9 @@ where self.subscription_executor.spawn( "subspace-filtered-object-mappings-subscription", Some("rpc"), - pipe_from_stream(pending, mapping_stream).boxed(), + PendingSubscription::from(pending) + .pipe_from_stream(mapping_stream, BoundedVecDeque::default()) + .boxed(), ); } } diff --git a/crates/sc-consensus-subspace/Cargo.toml b/crates/sc-consensus-subspace/Cargo.toml index f57f42570d..ef519607a9 100644 --- a/crates/sc-consensus-subspace/Cargo.toml +++ b/crates/sc-consensus-subspace/Cargo.toml @@ -22,23 +22,23 @@ rand_chacha = "0.3.1" rayon = "1.10.0" schnellru = "0.2.3" schnorrkel = "0.11.4" -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-proof-of-time = { version = "0.1.0", path = "../sc-proof-of-time" } -sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-objects = { version = "0.1.0", path = "../sp-objects" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-erasure-coding = { version = "0.1.0", path = "../subspace-erasure-coding" } diff --git a/crates/sc-consensus-subspace/src/block_import.rs b/crates/sc-consensus-subspace/src/block_import.rs index d51d9f4c38..9a2bd306c2 100644 --- a/crates/sc-consensus-subspace/src/block_import.rs +++ b/crates/sc-consensus-subspace/src/block_import.rs @@ -567,7 +567,7 @@ where type Error = Error; async fn import_block( - &mut self, + &self, mut block: BlockImportParams, ) -> Result { let block_hash = block.post_hash(); diff --git a/crates/sc-consensus-subspace/src/slot_worker.rs b/crates/sc-consensus-subspace/src/slot_worker.rs index deb172faf5..e051f00ef0 100644 --- a/crates/sc-consensus-subspace/src/slot_worker.rs +++ b/crates/sc-consensus-subspace/src/slot_worker.rs @@ -37,7 +37,7 @@ use futures::channel::mpsc; use futures::{StreamExt, TryFutureExt}; use sc_client_api::AuxStore; use sc_consensus::block_import::{BlockImportParams, StateAction}; -use sc_consensus::{JustificationSyncLink, SharedBlockImport, StorageChanges}; +use sc_consensus::{BoxBlockImport, JustificationSyncLink, StorageChanges}; use sc_consensus_slots::{ BackoffAuthoringBlocksStrategy, SimpleSlotWorker, SlotInfo, SlotLenienceType, SlotProportion, }; @@ -176,7 +176,7 @@ where /// The underlying block-import object to supply our produced blocks to. /// This must be a `SubspaceBlockImport` or a wrapper of it, otherwise /// critical consensus logic will be omitted. - pub block_import: SharedBlockImport, + pub block_import: BoxBlockImport, /// A sync oracle pub sync_oracle: SubspaceSyncOracle, /// Hook into the sync module to control the justification sync process. @@ -215,7 +215,7 @@ where SO: SyncOracle + Send + Sync, { client: Arc, - block_import: SharedBlockImport, + block_import: BoxBlockImport, env: E, sync_oracle: SubspaceSyncOracle, justification_sync_link: L, @@ -331,7 +331,7 @@ where AS: AuxStore + Send + Sync + 'static, BlockNumber: From<::Number>, { - type BlockImport = SharedBlockImport; + type BlockImport = BoxBlockImport; type SyncOracle = SubspaceSyncOracle; type JustificationSyncLink = L; type CreateProposer = diff --git a/crates/sc-consensus-subspace/src/verifier.rs b/crates/sc-consensus-subspace/src/verifier.rs index b6b53754c5..7b66028158 100644 --- a/crates/sc-consensus-subspace/src/verifier.rs +++ b/crates/sc-consensus-subspace/src/verifier.rs @@ -44,6 +44,7 @@ use subspace_core_primitives::crypto::kzg::Kzg; use subspace_core_primitives::{BlockNumber, PublicKey}; use subspace_proof_of_space::Table; use subspace_verification::{check_reward_signature, verify_solution, VerifySolutionParams}; +use tokio::runtime::Handle; use tracing::{debug, info, trace, warn}; /// Errors encountered by the Subspace verification task. @@ -120,7 +121,7 @@ pub struct SubspaceVerifierOptions { } /// A verifier for Subspace blocks. -pub struct SubspaceVerifier +struct Inner where Block: BlockT, { @@ -137,16 +138,16 @@ where _block: PhantomData, } -impl SubspaceVerifier +impl Inner where PosTable: Table, Block: BlockT, BlockNumber: From>, - Client: AuxStore + HeaderBackend + ProvideRuntimeApi, + Client: HeaderBackend + ProvideRuntimeApi + AuxStore + 'static, Client::Api: BlockBuilderApi + SubspaceApi, { /// Create new instance - pub fn new(options: SubspaceVerifierOptions) -> Self { + fn new(options: SubspaceVerifierOptions) -> Self { let SubspaceVerifierOptions { client, chain_constants, @@ -208,7 +209,7 @@ where /// /// `pre_digest` argument is optional in case it is available to avoid doing the work of /// extracting it from the header twice. - async fn check_header( + fn check_header( &self, params: VerificationParams<'_, Block::Header>, subspace_digest_items: SubspaceDigestItems, @@ -405,20 +406,6 @@ where Ok(()) } -} - -#[async_trait::async_trait] -impl Verifier for SubspaceVerifier -where - PosTable: Table, - Block: BlockT, - BlockNumber: From>, - Client: HeaderBackend + ProvideRuntimeApi + Send + Sync + AuxStore, - Client::Api: BlockBuilderApi + SubspaceApi, -{ - fn verification_concurrency(&self) -> NonZeroUsize { - available_parallelism().unwrap_or(NonZeroUsize::new(1).expect("Not zero; qed")) - } async fn verify( &self, @@ -482,7 +469,6 @@ where full_pot_verification, &block.justifications, ) - .await .map_err(|error| error.to_string())?; let CheckedHeader { @@ -541,3 +527,51 @@ where Ok(block) } } + +/// A verifier for Subspace blocks. +pub struct SubspaceVerifier +where + Block: BlockT, +{ + inner: Arc>, +} + +impl SubspaceVerifier +where + PosTable: Table, + Block: BlockT, + BlockNumber: From>, + Client: HeaderBackend + ProvideRuntimeApi + AuxStore + 'static, + Client::Api: BlockBuilderApi + SubspaceApi, +{ + /// Create new instance + pub fn new(options: SubspaceVerifierOptions) -> Self { + Self { + inner: Arc::new(Inner::new(options)), + } + } +} + +#[async_trait::async_trait] +impl Verifier for SubspaceVerifier +where + PosTable: Table, + Block: BlockT, + BlockNumber: From>, + Client: HeaderBackend + ProvideRuntimeApi + AuxStore + 'static, + Client::Api: BlockBuilderApi + SubspaceApi, +{ + fn verification_concurrency(&self) -> NonZeroUsize { + available_parallelism().unwrap_or(NonZeroUsize::new(1).expect("Not zero; qed")) + } + + async fn verify( + &self, + block: BlockImportParams, + ) -> Result, String> { + let inner = Arc::clone(&self.inner); + tokio::task::spawn_blocking(move || Handle::current().block_on(inner.verify(block))) + .await + .map_err(|error| format!("Failed to join block verification task: {error}"))? + } +} diff --git a/crates/sc-domains/Cargo.toml b/crates/sc-domains/Cargo.toml index f2c1888c66..2537d0d09b 100644 --- a/crates/sc-domains/Cargo.toml +++ b/crates/sc-domains/Cargo.toml @@ -16,19 +16,19 @@ include = [ targets = ["x86_64-unknown-linux-gnu"] [dependencies] -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-auto-id = { version = "0.1.0", path = "../../domains/primitives/auto-id" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", default-features = false, path = "../sp-domains-fraud-proof" } -sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger-host-functions = { version = "0.1.0", path = "../../domains/primitives/messenger-host-functions" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", path = "../sp-subspace-mmr" } [features] diff --git a/crates/sc-proof-of-time/Cargo.toml b/crates/sc-proof-of-time/Cargo.toml index 1efeff7386..a3d279a98f 100644 --- a/crates/sc-proof-of-time/Cargo.toml +++ b/crates/sc-proof-of-time/Cargo.toml @@ -18,17 +18,17 @@ parity-scale-codec = { version = "3.6.12", features = ["derive"] } parking_lot = "0.12.2" rayon = "1.10.0" schnellru = "0.2.3" -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-gossip = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-gossip = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-proof-of-time = { version = "0.1.0", path = "../subspace-proof-of-time" } thread-priority = "1.1.0" diff --git a/crates/sc-subspace-block-relay/Cargo.toml b/crates/sc-subspace-block-relay/Cargo.toml index f13650620d..014fdef092 100644 --- a/crates/sc-subspace-block-relay/Cargo.toml +++ b/crates/sc-subspace-block-relay/Cargo.toml @@ -17,16 +17,16 @@ codec = { package = "parity-scale-codec", version = "3.6.12", default-features = derive_more = { version = "1.0.0", features = ["full"] } futures = "0.3.29" parking_lot = "0.12.2" -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-common = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-common = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } strum_macros = "0.26.4" subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } thiserror = "1.0.63" tracing = "0.1.40" diff --git a/crates/sc-subspace-block-relay/src/consensus/relay.rs b/crates/sc-subspace-block-relay/src/consensus/relay.rs index cb31a2c018..704c7a9a5a 100644 --- a/crates/sc-subspace-block-relay/src/consensus/relay.rs +++ b/crates/sc-subspace-block-relay/src/consensus/relay.rs @@ -31,6 +31,7 @@ use sp_api::ProvideRuntimeApi; use sp_consensus_subspace::SubspaceApi; use sp_runtime::generic::BlockId; use sp_runtime::traits::{Block as BlockT, Header, One, Zero}; +use std::fmt; use std::num::{NonZeroU32, NonZeroUsize}; use std::sync::Arc; use std::time::{Duration, Instant}; @@ -67,6 +68,19 @@ where _phantom_data: std::marker::PhantomData<(Block, Pool)>, } +impl fmt::Debug for ConsensusRelayClient +where + Block: BlockT, + Pool: TransactionPool, +{ + #[inline] + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("ConsensusRelayClient") + .field("protocol_name", &self.protocol_name) + .finish_non_exhaustive() + } +} + impl ConsensusRelayClient where Block: BlockT, @@ -223,6 +237,10 @@ where Block: BlockT, Pool: TransactionPool + 'static, { + fn protocol_name(&self) -> &ProtocolName { + &self.protocol_name + } + async fn download_blocks( &self, who: PeerId, diff --git a/crates/sp-consensus-subspace/Cargo.toml b/crates/sp-consensus-subspace/Cargo.toml index b8f263c0eb..4c534fc836 100644 --- a/crates/sp-consensus-subspace/Cargo.toml +++ b/crates/sp-consensus-subspace/Cargo.toml @@ -18,17 +18,17 @@ codec = { package = "parity-scale-codec", version = "3.6.12", default-features = log = { version = "0.4.22", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } schnorrkel = { version = "0.11.4", default-features = false } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-application-crypto = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-io = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-application-crypto = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-io = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space", default-features = false } subspace-verification = { version = "0.1.0", path = "../subspace-verification", default-features = false } diff --git a/crates/sp-domains-fraud-proof/Cargo.toml b/crates/sp-domains-fraud-proof/Cargo.toml index 97364e5961..fe9d4e5d61 100644 --- a/crates/sp-domains-fraud-proof/Cargo.toml +++ b/crates/sp-domains-fraud-proof/Cargo.toml @@ -14,27 +14,27 @@ include = [ codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } domain-block-preprocessor = { version = "0.1.0", default-features = false, path = "../../domains/client/block-preprocessor", optional = true } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } hash-db = { version = "0.16.0", default-features = false } log = { version = "0.4.22", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false, optional = true } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false, optional = true } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domain-digests = { version = "0.1.0", default-features = false, path = "../../domains/primitives/digests" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } -sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-state-machine = { optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-state-machine = { optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../sp-subspace-mmr" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-trie = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-weights = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-trie = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-weights = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } trie-db = { version = "0.29.1", default-features = false } @@ -45,21 +45,21 @@ domain-block-builder = { version = "0.1.0", path = "../../domains/client/block-b domain-block-preprocessor = { version = "0.1.0", path = "../../domains/client/block-preprocessor" } domain-test-service = { version = "0.1.0", path = "../../domains/test/service" } ethereum = "0.15.0" -fp-rpc = { version = "3.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa", features = ['default'] } -fp-self-contained = { version = "1.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa", features = ['default'] } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +fp-rpc = { version = "3.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", features = ['default'] } +fp-self-contained = { version = "1.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", features = ['default'] } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } futures = "0.3.29" libsecp256k1 = { version = "0.7.1", features = ["static-context", "hmac"] } -pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-ethereum = { git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa", features = ['default'] } -pallet-evm = { version = "6.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa", default-features = false } +pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-ethereum = { git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", features = ['default'] } +pallet-evm = { version = "6.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", default-features = false } parking_lot = "0.12.2" rand = { version = "0.8.5", features = ["min_const_gen"] } rlp = "0.5.2" -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } subspace-test-client = { version = "0.1.0", path = "../../test/subspace-test-client" } subspace-test-service = { version = "0.1.0", path = "../../test/subspace-test-service" } subspace-runtime-primitives = { version = "0.1.0", path = "../../crates/subspace-runtime-primitives" } diff --git a/crates/sp-domains/Cargo.toml b/crates/sp-domains/Cargo.toml index 4046e769f4..f5bc289186 100644 --- a/crates/sp-domains/Cargo.toml +++ b/crates/sp-domains/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] blake2 = { version = "0.10.6", default-features = false } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } hash-db = { version = "0.16.0", default-features = false } memory-db = { version = "0.32.0", default-features = false } hexlit = "0.5.5" @@ -23,17 +23,17 @@ rand = { version = "0.8.5", default-features = false } rand_chacha = { version = "0.3.1", default-features = false } rs_merkle = { version = "1.4.2", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.206", default-features = false, features = ["alloc", "derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-application-crypto = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-state-machine = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-trie = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-weights = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +serde = { version = "1.0.110", default-features = false, features = ["alloc", "derive"] } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-application-crypto = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-state-machine = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-trie = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-weights = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } trie-db = { version = "0.29.1", default-features = false } diff --git a/crates/sp-objects/Cargo.toml b/crates/sp-objects/Cargo.toml index 042e7d8d85..03dfdb4ae1 100644 --- a/crates/sp-objects/Cargo.toml +++ b/crates/sp-objects/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } diff --git a/crates/sp-subspace-mmr/Cargo.toml b/crates/sp-subspace-mmr/Cargo.toml index 63a345ae79..ba57134ca6 100644 --- a/crates/sp-subspace-mmr/Cargo.toml +++ b/crates/sp-subspace-mmr/Cargo.toml @@ -18,13 +18,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { default-features = false, path = "../subspace-core-primitives" } [features] diff --git a/crates/subspace-archiving/Cargo.toml b/crates/subspace-archiving/Cargo.toml index 1421b217be..75bbcdd8db 100644 --- a/crates/subspace-archiving/Cargo.toml +++ b/crates/subspace-archiving/Cargo.toml @@ -19,7 +19,7 @@ bench = false [dependencies] parity-scale-codec = { version = "3.6.12", default-features = false, features = ["derive"] } rayon = { version = "1.10.0", optional = true } -serde = { version = "1.0.206", optional = true, features = ["derive"] } +serde = { version = "1.0.110", optional = true, features = ["derive"] } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } subspace-erasure-coding = { version = "0.1.0", path = "../subspace-erasure-coding", default-features = false } thiserror = { version = "1.0.63", optional = true } diff --git a/crates/subspace-core-primitives/Cargo.toml b/crates/subspace-core-primitives/Cargo.toml index 36341af5f7..8eec09d892 100644 --- a/crates/subspace-core-primitives/Cargo.toml +++ b/crates/subspace-core-primitives/Cargo.toml @@ -27,7 +27,7 @@ parking_lot = { version = "0.12.2", optional = true } rayon = { version = "1.10.0", optional = true } rust-kzg-blst = { git = "https://github.com/grandinetech/rust-kzg", rev = "6c8fcc623df3d7e8c0f30951a49bfea764f90bf4", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.206", optional = true, default-features = false, features = ["alloc", "derive"] } +serde = { version = "1.0.110", optional = true, default-features = false, features = ["alloc", "derive"] } # Replacement for `parking_lot` in `no_std` environment spin = "0.9.7" static_assertions = "1.1.0" diff --git a/crates/subspace-core-primitives/src/lib.rs b/crates/subspace-core-primitives/src/lib.rs index 756750b74c..466adb4001 100644 --- a/crates/subspace-core-primitives/src/lib.rs +++ b/crates/subspace-core-primitives/src/lib.rs @@ -44,12 +44,6 @@ extern crate alloc; use crate::crypto::{blake3_hash, blake3_hash_list, blake3_hash_with_key, Scalar}; #[cfg(feature = "serde")] use ::serde::{Deserialize, Serialize}; -#[cfg(not(feature = "std"))] -use alloc::boxed::Box; -#[cfg(not(feature = "std"))] -use alloc::vec; -#[cfg(not(feature = "std"))] -use alloc::vec::Vec; use core::array::TryFromSliceError; use core::fmt; use core::num::{NonZeroU64, NonZeroU8}; diff --git a/crates/subspace-fake-runtime-api/Cargo.toml b/crates/subspace-fake-runtime-api/Cargo.toml index d094add613..cc64367a61 100644 --- a/crates/subspace-fake-runtime-api/Cargo.toml +++ b/crates/subspace-fake-runtime-api/Cargo.toml @@ -14,28 +14,28 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-mmr = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-mmr = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { default-features = false, path = "../sp-consensus-subspace" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", default-features = false, path = "../sp-domains-fraud-proof" } -sp-genesis-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-genesis-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { default-features = false, version = "0.1.0", path = "../../domains/primitives/messenger" } sp-objects = { default-features = false, path = "../sp-objects" } -sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { default-features = false, path = "../sp-subspace-mmr" } -sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } diff --git a/crates/subspace-farmer-components/Cargo.toml b/crates/subspace-farmer-components/Cargo.toml index 3f1bfef9e9..46d3a8d0a5 100644 --- a/crates/subspace-farmer-components/Cargo.toml +++ b/crates/subspace-farmer-components/Cargo.toml @@ -30,7 +30,7 @@ parking_lot = "0.12.2" rand = "0.8.5" rayon = "1.10.0" schnorrkel = "0.11.4" -serde = { version = "1.0.206", features = ["derive"] } +serde = { version = "1.0.110", features = ["derive"] } static_assertions = "1.1.0" subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } diff --git a/crates/subspace-farmer/Cargo.toml b/crates/subspace-farmer/Cargo.toml index 6a7ea44bab..0594eb5191 100644 --- a/crates/subspace-farmer/Cargo.toml +++ b/crates/subspace-farmer/Cargo.toml @@ -36,7 +36,7 @@ fs4 = "0.8.4" futures = "0.3.29" hex = { version = "0.4.3", features = ["serde"] } hwlocality = { version = "1.0.0-alpha.6", features = ["vendored"], optional = true } -jsonrpsee = { version = "0.24.2", features = ["ws-client"] } +jsonrpsee = { version = "0.24.5", features = ["ws-client"] } mimalloc = { version = "0.1.43", optional = true } num_cpus = "1.16.0" parity-scale-codec = "3.6.12" @@ -47,8 +47,8 @@ rand = "0.8.5" rayon = "1.10.0" schnellru = "0.2.3" schnorrkel = "0.11.4" -serde = { version = "1.0.206", features = ["derive"] } -serde_json = "1.0.124" +serde = { version = "1.0.110", features = ["derive"] } +serde_json = "1.0.128" static_assertions = "1.1.0" ss58-registry = "1.47.0" subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } diff --git a/crates/subspace-malicious-operator/Cargo.toml b/crates/subspace-malicious-operator/Cargo.toml index 9787e5e1a8..172f3a8d46 100644 --- a/crates/subspace-malicious-operator/Cargo.toml +++ b/crates/subspace-malicious-operator/Cargo.toml @@ -28,46 +28,46 @@ domain-eth-service = { version = "0.1.0", path = "../../domains/client/eth-servi domain-service = { version = "0.1.0", path = "../../domains/service" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } evm-domain-runtime = { version = "0.1.0", path = "../../domains/runtime/evm" } -fp-evm = { version = "3.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +fp-evm = { version = "3.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } futures = "0.3.29" hex-literal = "0.4.1" log = "0.4.22" mimalloc = "0.1.43" pallet-domains = { version = "0.1.0", default-features = false, path = "../pallet-domains" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } parity-scale-codec = "3.6.12" -pallet-sudo = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-sudo = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } sc-domains = { version = "0.1.0", path = "../sc-domains" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-storage-monitor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-storage-monitor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } sc-subspace-chain-specs = { version = "0.1.0", path = "../sc-subspace-chain-specs" } -sc-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -serde_json = "1.0.124" -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sc-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +serde_json = "1.0.128" +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../sp-domains" } sp-domain-digests = { version = "0.1.0", path = "../../domains/primitives/digests" } -sp-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-keystore = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-weights = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-keystore = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-weights = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space" } @@ -80,7 +80,7 @@ rand = "0.8.5" tracing = "0.1.40" [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +substrate-build-script-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = [] diff --git a/crates/subspace-malicious-operator/src/chain_spec.rs b/crates/subspace-malicious-operator/src/chain_spec.rs index 4539f2e7bd..1cf568ba34 100644 --- a/crates/subspace-malicious-operator/src/chain_spec.rs +++ b/crates/subspace-malicious-operator/src/chain_spec.rs @@ -160,7 +160,7 @@ pub fn dev_config() -> Result { .with_name("Subspace development") .with_id("subspace_dev") .with_chain_type(ChainType::Development) - .with_genesis_config(patch_domain_runtime_version( + .with_genesis_config( serde_json::to_value(subspace_genesis_config( // Sudo account get_account_id_from_seed("Alice"), @@ -195,7 +195,7 @@ pub fn dev_config() -> Result { }, )) .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, - )) + ) .build()) } @@ -271,42 +271,3 @@ fn subspace_genesis_config( }, } } - -// TODO: Workaround for https://github.com/paritytech/polkadot-sdk/issues/4001 -fn patch_domain_runtime_version(mut genesis_config: serde_json::Value) -> serde_json::Value { - let Some(genesis_domains) = genesis_config - .get_mut("domains") - .and_then(|domains| domains.get_mut("genesisDomains")) - .and_then(|genesis_domains| genesis_domains.as_array_mut()) - else { - return genesis_config; - }; - - for genesis_domain in genesis_domains { - let Some(runtime_version) = genesis_domain.get_mut("runtime_version") else { - continue; - }; - - if let Some(spec_name) = runtime_version.get_mut("specName") { - if let Some(spec_name_bytes) = spec_name - .as_str() - .map(|spec_name| spec_name.as_bytes().to_vec()) - { - *spec_name = serde_json::to_value(spec_name_bytes) - .expect("Bytes serialization doesn't fail; qed"); - } - } - - if let Some(impl_name) = runtime_version.get_mut("implName") { - if let Some(impl_name_bytes) = impl_name - .as_str() - .map(|impl_name| impl_name.as_bytes().to_vec()) - { - *impl_name = serde_json::to_value(impl_name_bytes) - .expect("Bytes serialization doesn't fail; qed"); - } - } - } - - genesis_config -} diff --git a/crates/subspace-malicious-operator/src/lib.rs b/crates/subspace-malicious-operator/src/lib.rs index 99dd2fad54..bd860bd3f4 100644 --- a/crates/subspace-malicious-operator/src/lib.rs +++ b/crates/subspace-malicious-operator/src/lib.rs @@ -27,7 +27,9 @@ use sc_cli::{ generate_node_name, ChainSpec, CliConfiguration, Role, RunCmd as SubstrateRunCmd, RunCmd, SubstrateCli, }; -use sc_service::config::{KeystoreConfig, NetworkConfiguration}; +use sc_service::config::{ + ExecutorConfiguration, KeystoreConfig, NetworkConfiguration, RpcConfiguration, +}; use sc_service::{BasePath, BlocksPruning, Configuration, DatabaseSource}; use sp_core::crypto::{AccountId32, Ss58Codec}; use sp_domains::DomainId; @@ -199,7 +201,7 @@ pub fn create_malicious_operator_configuration( let client_id = Cli::client_id(); let node_key = domain_cli_args .node_key_params() - .map(|x| x.node_key(&net_config_dir, role.clone(), is_dev)) + .map(|x| x.node_key(&net_config_dir, role, is_dev)) .unwrap_or_else(|| Ok(Default::default()))?; let max_runtime_instances = 8; let is_validator = role.is_authority(); @@ -229,6 +231,11 @@ pub fn create_malicious_operator_configuration( *net_config_path = base_path.path().join("network"); } + let rpc_addrs: Option> = domain_cli + .run + .rpc_addr(9945)? + .map(|addrs| addrs.into_iter().map(Into::into).collect()); + Ok(Configuration { impl_name: Cli::impl_name(), impl_version: Cli::impl_version(), @@ -253,31 +260,37 @@ pub fn create_malicious_operator_configuration( .pruning_params() .map(|x| x.blocks_pruning()) .unwrap_or_else(|| Ok(BlocksPruning::KeepFinalized))?, - wasm_method: domain_cli_args - .import_params() - .map(|x| x.wasm_method()) - .unwrap_or_default(), + executor: ExecutorConfiguration { + wasm_method: domain_cli_args + .import_params() + .map(|x| x.wasm_method()) + .unwrap_or_default(), + max_runtime_instances, + default_heap_pages: domain_cli_args.default_heap_pages()?, + runtime_cache_size, + }, wasm_runtime_overrides: domain_cli_args .import_params() .map(|x| x.wasm_runtime_overrides()) .unwrap_or_default(), - rpc_addr: domain_cli_args.rpc_addr(9945)?, - rpc_methods: domain_cli_args.rpc_methods()?, - rpc_max_connections: domain_cli_args.rpc_max_connections()?, - rpc_cors: domain_cli_args.rpc_cors(is_dev)?, - rpc_max_request_size: 15, - rpc_max_response_size: 15, - rpc_id_provider: None, - rpc_max_subs_per_conn: 1024, - rpc_port: 9945, - rpc_message_buffer_capacity: domain_cli_args.rpc_buffer_capacity_per_connection()?, - rpc_batch_config: domain_cli_args.rpc_batch_config()?, - rpc_rate_limit: domain_cli_args.rpc_rate_limit()?, - rpc_rate_limit_whitelisted_ips: vec![], - rpc_rate_limit_trust_proxy_headers: false, + rpc: RpcConfiguration { + addr: rpc_addrs, + methods: domain_cli_args.rpc_methods()?, + max_connections: domain_cli_args.rpc_max_connections()?, + cors: domain_cli_args.rpc_cors(is_dev)?, + max_request_size: 15, + max_response_size: 15, + id_provider: None, + max_subs_per_conn: 1024, + port: 9945, + message_buffer_capacity: domain_cli_args.rpc_buffer_capacity_per_connection()?, + batch_config: domain_cli_args.rpc_batch_config()?, + rate_limit: domain_cli_args.rpc_rate_limit()?, + rate_limit_whitelisted_ips: vec![], + rate_limit_trust_proxy_headers: false, + }, prometheus_config: domain_cli_args.prometheus_config(9616, &chain_spec)?, telemetry_endpoints, - default_heap_pages: domain_cli_args.default_heap_pages()?, offchain_worker: domain_cli_args .offchain_worker_params() .map(|x| x.offchain_worker(&role)) @@ -288,11 +301,8 @@ pub fn create_malicious_operator_configuration( tracing_targets: domain_cli_args.shared_params().tracing_targets(), tracing_receiver: domain_cli_args.shared_params().tracing_receiver(), chain_spec, - max_runtime_instances, announce_block: domain_cli_args.announce_block()?, role, base_path, - informant_output_format: Default::default(), - runtime_cache_size, }) } diff --git a/crates/subspace-networking/Cargo.toml b/crates/subspace-networking/Cargo.toml index 0babac8d54..00783826dd 100644 --- a/crates/subspace-networking/Cargo.toml +++ b/crates/subspace-networking/Cargo.toml @@ -37,8 +37,8 @@ pin-project = "1.1.5" prometheus-client = "0.22.3" rand = "0.8.5" schnellru = "0.2.3" -serde = { version = "1.0.206", features = ["derive"] } -serde_json = "1.0.124" +serde = { version = "1.0.110", features = ["derive"] } +serde_json = "1.0.128" subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-metrics = { version = "0.1.0", path = "../../shared/subspace-metrics" } thiserror = "1.0.63" diff --git a/crates/subspace-node/Cargo.toml b/crates/subspace-node/Cargo.toml index 7de4242b41..2d6fd39448 100644 --- a/crates/subspace-node/Cargo.toml +++ b/crates/subspace-node/Cargo.toml @@ -32,44 +32,43 @@ domain-service = { version = "0.1.0", path = "../../domains/service" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } evm-domain-runtime = { version = "0.1.0", path = "../../domains/runtime/evm" } fdlimit = "0.3.0" -fp-evm = { version = "3.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -frame-benchmarking = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +fp-evm = { version = "3.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +frame-benchmarking = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } futures = "0.3.29" hex = "0.4.3" hex-literal = "0.4.1" mimalloc = "0.1.43" parity-scale-codec = "3.6.12" prometheus-client = "0.22.3" -sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } sc-domains = { version = "0.1.0", path = "../sc-domains" } -sc-informant = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-keystore = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-keystore = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-proof-of-time = { version = "0.1.0", path = "../sc-proof-of-time" } sc-subspace-chain-specs = { version = "0.1.0", path = "../sc-subspace-chain-specs" } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-storage-monitor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -serde_json = "1.0.124" -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-storage-monitor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +serde_json = "1.0.128" +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../sp-domains" } sp-domain-digests = { version = "0.1.0", path = "../../domains/primitives/digests" } sp-domains-fraud-proof = { version = "0.1.0", path = "../sp-domains-fraud-proof" } -sp-keystore = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-keystore = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-metrics = { version = "0.1.0", path = "../../shared/subspace-metrics" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } @@ -77,7 +76,7 @@ subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-spac subspace-runtime = { version = "0.1.0", path = "../subspace-runtime" } subspace-runtime-primitives = { version = "0.1.0", path = "../subspace-runtime-primitives" } subspace-service = { version = "0.1.0", path = "../subspace-service" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } supports-color = "3.0.0" tempfile = "3.12.0" thiserror = "1.0.63" @@ -87,7 +86,7 @@ tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +substrate-build-script-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = [] diff --git a/crates/subspace-node/src/chain_spec.rs b/crates/subspace-node/src/chain_spec.rs index d6da8010c5..4d073de16c 100644 --- a/crates/subspace-node/src/chain_spec.rs +++ b/crates/subspace-node/src/chain_spec.rs @@ -87,142 +87,137 @@ pub fn gemini_3h_compiled() -> Result { .expect("Wrong root account address"); let balances = vec![(sudo_account.clone(), 1_000 * SSC)]; - patch_domain_runtime_version( - serde_json::to_value(subspace_genesis_config( - sudo_account.clone(), - balances, - GenesisParams { - enable_rewards_at: EnableRewardsAt::Manually, - allow_authoring_by: AllowAuthoringBy::RootFarmer(PublicKey::from( - hex_literal::hex!( - "8aecbcf0b404590ddddc01ebacb205a562d12fdb5c2aa6a4035c1a20f23c9515" - ), - )), - // TODO: Adjust once we bench PoT on faster hardware - // About 1s on 6.0 GHz Raptor Lake CPU (14900K) - pot_slot_iterations: NonZeroU32::new(200_032_000).expect("Not zero; qed"), - enable_domains: false, - enable_dynamic_cost_of_storage: false, - enable_balance_transfers: true, - // TODO: Proper value here - confirmation_depth_k: 100, - // TODO: Proper value here - rewards_config: RewardsConfig { - remaining_issuance: 360_000_000 * SSC, - proposer_subsidy_points: BoundedVec::try_from(vec![ - RewardPoint { - block: 0, - subsidy: 454545454545455000, - }, - RewardPoint { - block: 10512000, - subsidy: 423672207997007000, - }, - RewardPoint { - block: 26280000, - subsidy: 333635878252228000, - }, - RewardPoint { - block: 42048000, - subsidy: 262825353875519000, - }, - RewardPoint { - block: 57816000, - subsidy: 207116053874914000, - }, - RewardPoint { - block: 73584000, - subsidy: 163272262877830000, - }, - RewardPoint { - block: 94608000, - subsidy: 118963574070561000, - }, - RewardPoint { - block: 120888000, - subsidy: 80153245846642200, - }, - RewardPoint { - block: 149796000, - subsidy: 51971522998131200, - }, - RewardPoint { - block: 183960000, - subsidy: 31192714495359900, - }, - RewardPoint { - block: 220752000, - subsidy: 18033114698427300, - }, - ]) - .expect("Number of elements is below configured MaxRewardPoints; qed"), - voter_subsidy_points: BoundedVec::try_from(vec![ - RewardPoint { - block: 0, - subsidy: 454545454545455000, - }, - RewardPoint { - block: 10512000, - subsidy: 423672207997007000, - }, - RewardPoint { - block: 26280000, - subsidy: 333635878252228000, - }, - RewardPoint { - block: 42048000, - subsidy: 262825353875519000, - }, - RewardPoint { - block: 57816000, - subsidy: 207116053874914000, - }, - RewardPoint { - block: 73584000, - subsidy: 163272262877830000, - }, - RewardPoint { - block: 94608000, - subsidy: 118963574070561000, - }, - RewardPoint { - block: 120888000, - subsidy: 80153245846642200, - }, - RewardPoint { - block: 149796000, - subsidy: 51971522998131200, - }, - RewardPoint { - block: 183960000, - subsidy: 31192714495359900, - }, - RewardPoint { - block: 220752000, - subsidy: 18033114698427300, - }, - ]) - .expect("Number of elements is below configured MaxRewardPoints; qed"), - }, - }, - GenesisDomainParams { - permissioned_action_allowed_by: PermissionedActionAllowedBy::Accounts(vec![ - sudo_account.clone(), - ]), - genesis_domains: vec![ - evm_chain_spec::get_genesis_domain(SpecId::Gemini, sudo_account.clone())?, - auto_id_chain_spec::get_genesis_domain( - SpecId::Gemini, - sudo_account.clone(), - )?, - ], - }, - CouncilDemocracyConfigParams::::production_params(), + serde_json::to_value(subspace_genesis_config( + sudo_account.clone(), + balances, + GenesisParams { + enable_rewards_at: EnableRewardsAt::Manually, + allow_authoring_by: AllowAuthoringBy::RootFarmer(PublicKey::from( + hex_literal::hex!( + "8aecbcf0b404590ddddc01ebacb205a562d12fdb5c2aa6a4035c1a20f23c9515" + ), + )), + // TODO: Adjust once we bench PoT on faster hardware + // About 1s on 6.0 GHz Raptor Lake CPU (14900K) + pot_slot_iterations: NonZeroU32::new(200_032_000).expect("Not zero; qed"), + enable_domains: false, + enable_dynamic_cost_of_storage: false, + enable_balance_transfers: true, // TODO: Proper value here - sudo_account.clone(), - )?) - .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, - ) + confirmation_depth_k: 100, + // TODO: Proper value here + rewards_config: RewardsConfig { + remaining_issuance: 360_000_000 * SSC, + proposer_subsidy_points: BoundedVec::try_from(vec![ + RewardPoint { + block: 0, + subsidy: 454545454545455000, + }, + RewardPoint { + block: 10512000, + subsidy: 423672207997007000, + }, + RewardPoint { + block: 26280000, + subsidy: 333635878252228000, + }, + RewardPoint { + block: 42048000, + subsidy: 262825353875519000, + }, + RewardPoint { + block: 57816000, + subsidy: 207116053874914000, + }, + RewardPoint { + block: 73584000, + subsidy: 163272262877830000, + }, + RewardPoint { + block: 94608000, + subsidy: 118963574070561000, + }, + RewardPoint { + block: 120888000, + subsidy: 80153245846642200, + }, + RewardPoint { + block: 149796000, + subsidy: 51971522998131200, + }, + RewardPoint { + block: 183960000, + subsidy: 31192714495359900, + }, + RewardPoint { + block: 220752000, + subsidy: 18033114698427300, + }, + ]) + .expect("Number of elements is below configured MaxRewardPoints; qed"), + voter_subsidy_points: BoundedVec::try_from(vec![ + RewardPoint { + block: 0, + subsidy: 454545454545455000, + }, + RewardPoint { + block: 10512000, + subsidy: 423672207997007000, + }, + RewardPoint { + block: 26280000, + subsidy: 333635878252228000, + }, + RewardPoint { + block: 42048000, + subsidy: 262825353875519000, + }, + RewardPoint { + block: 57816000, + subsidy: 207116053874914000, + }, + RewardPoint { + block: 73584000, + subsidy: 163272262877830000, + }, + RewardPoint { + block: 94608000, + subsidy: 118963574070561000, + }, + RewardPoint { + block: 120888000, + subsidy: 80153245846642200, + }, + RewardPoint { + block: 149796000, + subsidy: 51971522998131200, + }, + RewardPoint { + block: 183960000, + subsidy: 31192714495359900, + }, + RewardPoint { + block: 220752000, + subsidy: 18033114698427300, + }, + ]) + .expect("Number of elements is below configured MaxRewardPoints; qed"), + }, + }, + GenesisDomainParams { + permissioned_action_allowed_by: PermissionedActionAllowedBy::Accounts(vec![ + sudo_account.clone(), + ]), + genesis_domains: vec![ + evm_chain_spec::get_genesis_domain(SpecId::Gemini, sudo_account.clone())?, + auto_id_chain_spec::get_genesis_domain(SpecId::Gemini, sudo_account.clone())?, + ], + }, + CouncilDemocracyConfigParams::::production_params(), + // TODO: Proper value here + sudo_account.clone(), + )?) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))? }) .build()) } @@ -262,40 +257,38 @@ pub fn devnet_config_compiled() -> Result { .expect("Wrong root account address"); let balances = vec![(sudo_account.clone(), Balance::MAX / 2)]; - patch_domain_runtime_version( - serde_json::to_value(subspace_genesis_config( - sudo_account.clone(), - balances, - GenesisParams { - enable_rewards_at: EnableRewardsAt::Manually, - allow_authoring_by: AllowAuthoringBy::FirstFarmer, - pot_slot_iterations: NonZeroU32::new(150_000_000).expect("Not zero; qed"), - enable_domains: true, - enable_dynamic_cost_of_storage: false, - enable_balance_transfers: true, - // TODO: Proper value here - confirmation_depth_k: 100, - // TODO: Proper value here - rewards_config: RewardsConfig { - remaining_issuance: 1_000_000_000 * SSC, - proposer_subsidy_points: Default::default(), - voter_subsidy_points: Default::default(), - }, - }, - GenesisDomainParams { - permissioned_action_allowed_by: PermissionedActionAllowedBy::Accounts(vec![ - sudo_account.clone(), - ]), - genesis_domains: vec![auto_id_chain_spec::get_genesis_domain( - SpecId::DevNet, - sudo_account.clone(), - )?], + serde_json::to_value(subspace_genesis_config( + sudo_account.clone(), + balances, + GenesisParams { + enable_rewards_at: EnableRewardsAt::Manually, + allow_authoring_by: AllowAuthoringBy::FirstFarmer, + pot_slot_iterations: NonZeroU32::new(150_000_000).expect("Not zero; qed"), + enable_domains: true, + enable_dynamic_cost_of_storage: false, + enable_balance_transfers: true, + // TODO: Proper value here + confirmation_depth_k: 100, + // TODO: Proper value here + rewards_config: RewardsConfig { + remaining_issuance: 1_000_000_000 * SSC, + proposer_subsidy_points: Default::default(), + voter_subsidy_points: Default::default(), }, - CouncilDemocracyConfigParams::::fast_params(), - sudo_account.clone(), - )?) - .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, - ) + }, + GenesisDomainParams { + permissioned_action_allowed_by: PermissionedActionAllowedBy::Accounts(vec![ + sudo_account.clone(), + ]), + genesis_domains: vec![auto_id_chain_spec::get_genesis_domain( + SpecId::DevNet, + sudo_account.clone(), + )?], + }, + CouncilDemocracyConfigParams::::fast_params(), + sudo_account.clone(), + )?) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))? }) .build()) } @@ -317,7 +310,7 @@ pub fn dev_config() -> Result { ); properties }) - .with_genesis_config(patch_domain_runtime_version( + .with_genesis_config( serde_json::to_value(subspace_genesis_config( // Sudo account sudo_account.clone(), @@ -355,7 +348,7 @@ pub fn dev_config() -> Result { history_seeder, )?) .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, - )) + ) .build()) } @@ -443,42 +436,3 @@ fn subspace_genesis_config( }, }) } - -// TODO: Workaround for https://github.com/paritytech/polkadot-sdk/issues/4001 -fn patch_domain_runtime_version(mut genesis_config: serde_json::Value) -> serde_json::Value { - let Some(genesis_domains) = genesis_config - .get_mut("domains") - .and_then(|domains| domains.get_mut("genesisDomains")) - .and_then(|genesis_domains| genesis_domains.as_array_mut()) - else { - return genesis_config; - }; - - for genesis_domain in genesis_domains { - let Some(runtime_version) = genesis_domain.get_mut("runtime_version") else { - continue; - }; - - if let Some(spec_name) = runtime_version.get_mut("specName") { - if let Some(spec_name_bytes) = spec_name - .as_str() - .map(|spec_name| spec_name.as_bytes().to_vec()) - { - *spec_name = serde_json::to_value(spec_name_bytes) - .expect("Bytes serialization doesn't fail; qed"); - } - } - - if let Some(impl_name) = runtime_version.get_mut("implName") { - if let Some(impl_name_bytes) = impl_name - .as_str() - .map(|impl_name| impl_name.as_bytes().to_vec()) - { - *impl_name = serde_json::to_value(impl_name_bytes) - .expect("Bytes serialization doesn't fail; qed"); - } - } - } - - genesis_config -} diff --git a/crates/subspace-node/src/commands/run.rs b/crates/subspace-node/src/commands/run.rs index d97393bfef..1b665fd796 100644 --- a/crates/subspace-node/src/commands/run.rs +++ b/crates/subspace-node/src/commands/run.rs @@ -76,7 +76,7 @@ fn raise_fd_limit() { /// Default run command for node #[tokio::main] pub async fn run(run_options: RunOptions) -> Result<(), Error> { - let enable_color = init_logger().enable_color; + init_logger(); raise_fd_limit(); let signals = Signals::capture()?; @@ -96,11 +96,11 @@ pub async fn run(run_options: RunOptions) -> Result<(), Error> { pot_external_entropy, storage_monitor, mut prometheus_configuration, - } = create_consensus_chain_configuration(consensus, enable_color, domain_options.is_some())?; + } = create_consensus_chain_configuration(consensus, domain_options.is_some())?; let maybe_domain_configuration = domain_options .map(|domain_options| { - create_domain_configuration(&subspace_configuration, dev, domain_options, enable_color) + create_domain_configuration(&subspace_configuration, dev, domain_options) }) .transpose()?; @@ -203,7 +203,7 @@ pub async fn run(run_options: RunOptions) -> Result<(), Error> { // Start cross domain message listener for Consensus chain to receive messages from domains in the network let domain_code_executor: sc_domains::RuntimeExecutor = - sc_service::new_wasm_executor(&domain_configuration.domain_config); + sc_service::new_wasm_executor(&domain_configuration.domain_config.executor); consensus_chain_node .task_manager .spawn_essential_handle() diff --git a/crates/subspace-node/src/commands/run/consensus.rs b/crates/subspace-node/src/commands/run/consensus.rs index 04b196e15b..32e7144fd4 100644 --- a/crates/subspace-node/src/commands/run/consensus.rs +++ b/crates/subspace-node/src/commands/run/consensus.rs @@ -7,7 +7,6 @@ use sc_cli::{ generate_node_name, Cors, NodeKeyParams, NodeKeyType, RpcMethods, TelemetryParams, TransactionPoolParams, RPC_DEFAULT_PORT, }; -use sc_informant::OutputFormat; use sc_network::config::{MultiaddrWithPeerId, NonReservedPeerMode, Role, SetConfig}; use sc_service::{BlocksPruning, Configuration, PruningMode}; use sc_storage_monitor::StorageMonitorParams; @@ -430,7 +429,6 @@ pub(super) struct ConsensusChainConfiguration { pub(super) fn create_consensus_chain_configuration( consensus_node_options: ConsensusChainOptions, - enable_color: bool, domains_enabled: bool, ) -> Result { let ConsensusChainOptions { @@ -618,7 +616,6 @@ pub(super) fn create_consensus_chain_configuration( }, force_authoring, chain_spec: Box::new(chain_spec), - informant_output_format: OutputFormat { enable_color }, }; let consensus_chain_config = Configuration::from(consensus_chain_config); diff --git a/crates/subspace-node/src/commands/run/domain.rs b/crates/subspace-node/src/commands/run/domain.rs index 4890b93f42..bbf875d5ab 100644 --- a/crates/subspace-node/src/commands/run/domain.rs +++ b/crates/subspace-node/src/commands/run/domain.rs @@ -19,7 +19,6 @@ use sc_cli::{ }; use sc_consensus_subspace::block_import::BlockImportingNotification; use sc_consensus_subspace::notification::SubspaceNotificationStream; -use sc_informant::OutputFormat; use sc_network::config::{MultiaddrWithPeerId, NonReservedPeerMode, SetConfig, TransportConfig}; use sc_network::NetworkPeers; use sc_proof_of_time::source::PotSlotInfo; @@ -142,7 +141,6 @@ pub(super) fn create_domain_configuration( consensus_chain_configuration: &Configuration, dev: bool, domain_options: DomainOptions, - enable_color: bool, ) -> Result { let DomainOptions { domain_id: maybe_domain_id, @@ -326,7 +324,13 @@ pub(super) fn create_domain_configuration( unreachable!("Memory transport not used in CLI; qed") } }, - force_synced: false, + // set to be force_synced always for domains since they relay on Consensus chain to derive and import domain blocks. + // If not set, each domain node will wait to be fully synced and as a result will not propagate the transactions over network. + // It would have been ideal to use `Consensus` chain sync service to respond to `is_major_sync` requests but this + // would require upstream changes and with some refactoring. This is not worth the effort at the moment since + // we are planning to enable domain's block request and state sync mechanism in the near future. + // Until such change has been made, domain's sync service needs to be in force_synced state. + force_synced: true, }, keystore, state_pruning: pruning_params.state_pruning()?, @@ -359,7 +363,6 @@ pub(super) fn create_domain_configuration( telemetry_endpoints: consensus_chain_configuration.telemetry_endpoints.clone(), force_authoring: false, chain_spec: Box::new(chain_spec), - informant_output_format: OutputFormat { enable_color }, }; Ok(DomainConfiguration { diff --git a/crates/subspace-node/src/commands/shared.rs b/crates/subspace-node/src/commands/shared.rs index 10b88c24b1..1ea4b51967 100644 --- a/crates/subspace-node/src/commands/shared.rs +++ b/crates/subspace-node/src/commands/shared.rs @@ -52,12 +52,7 @@ pub(super) fn store_key_in_keystore( .map_err(|()| Error::Application("Failed to insert key into keystore".to_string().into())) } -#[derive(Debug, Copy, Clone)] -pub(super) struct InitLoggerResult { - pub(super) enable_color: bool, -} - -pub(super) fn init_logger() -> InitLoggerResult { +pub(super) fn init_logger() { // TODO: Workaround for https://github.com/tokio-rs/tracing/issues/2214, also on // Windows terminal doesn't support the same colors as bash does let enable_color = if cfg!(windows) { @@ -74,6 +69,4 @@ pub(super) fn init_logger() -> InitLoggerResult { ), ) .init(); - - InitLoggerResult { enable_color } } diff --git a/crates/subspace-node/src/domain/cli.rs b/crates/subspace-node/src/domain/cli.rs index 767348d81c..e8990586b9 100644 --- a/crates/subspace-node/src/domain/cli.rs +++ b/crates/subspace-node/src/domain/cli.rs @@ -37,7 +37,6 @@ use sp_runtime::generic::BlockId; use sp_runtime::traits::Header; use sp_runtime::DigestItem; use std::io::Write; -use std::net::SocketAddr; use std::path::Path; use subspace_runtime::Block; use subspace_runtime_primitives::{AccountId, Balance}; @@ -224,7 +223,10 @@ impl CliConfiguration for DomainCli { self.shared_params().base_path() } - fn rpc_addr(&self, default_listen_port: u16) -> sc_cli::Result> { + fn rpc_addr( + &self, + default_listen_port: u16, + ) -> sc_cli::Result>> { self.run.rpc_addr(default_listen_port) } diff --git a/crates/subspace-node/src/main.rs b/crates/subspace-node/src/main.rs index 8f6d72cd12..3ffc0c1fa6 100644 --- a/crates/subspace-node/src/main.rs +++ b/crates/subspace-node/src/main.rs @@ -387,8 +387,9 @@ fn main() -> Result<(), Error> { )) })?; - let executor = - sc_service::new_wasm_executor::(&domain_config); + let executor = sc_service::new_wasm_executor::( + &domain_config.executor, + ); let (client, _, _, _) = sc_service::new_full_parts::< DomainBlock, diff --git a/crates/subspace-rpc-primitives/Cargo.toml b/crates/subspace-rpc-primitives/Cargo.toml index d200defbf8..0647b0d4ca 100644 --- a/crates/subspace-rpc-primitives/Cargo.toml +++ b/crates/subspace-rpc-primitives/Cargo.toml @@ -15,7 +15,7 @@ include = [ [dependencies] hex = { version = "0.4.3", features = ["serde"] } parity-scale-codec = { version = "3.6.12", features = ["derive"] } -serde = { version = "1.0.206", features = ["derive"] } +serde = { version = "1.0.110", features = ["derive"] } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-farmer-components = { version = "0.1.0", path = "../subspace-farmer-components" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } diff --git a/crates/subspace-runtime-primitives/Cargo.toml b/crates/subspace-runtime-primitives/Cargo.toml index 64c6efe9df..fd372ff166 100644 --- a/crates/subspace-runtime-primitives/Cargo.toml +++ b/crates/subspace-runtime-primitives/Cargo.toml @@ -17,14 +17,14 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } serde = { version = "1.0.203", default-features = false, features = ["alloc", "derive"] } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-io = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-io = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } [features] diff --git a/crates/subspace-runtime/Cargo.toml b/crates/subspace-runtime/Cargo.toml index e6d95b23d3..576a5ca974 100644 --- a/crates/subspace-runtime/Cargo.toml +++ b/crates/subspace-runtime/Cargo.toml @@ -18,63 +18,63 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-executive = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-collective = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-democracy = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-executive = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-collective = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-democracy = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-domains = { version = "0.1.0", default-features = false, path = "../pallet-domains" } pallet-history-seeding = { version = "0.1.0", default-features = false, path = "../pallet-history-seeding" } pallet-messenger = { version = "0.1.0", path = "../../domains/pallets/messenger", default-features = false } -pallet-mmr = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-preimage = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-mmr = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-preimage = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-rewards = { version = "0.1.0", default-features = false, path = "../pallet-rewards" } pallet-runtime-configs = { version = "0.1.0", default-features = false, path = "../pallet-runtime-configs" } -pallet-scheduler = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-scheduler = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-subspace = { version = "0.1.0", default-features = false, features = ["serde"], path = "../pallet-subspace" } pallet-subspace-mmr = { version = "0.1.0", default-features = false, path = "../pallet-subspace-mmr" } -pallet-sudo = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-sudo = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-transaction-fees = { version = "0.1.0", default-features = false, path = "../pallet-transaction-fees" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-transporter = { version = "0.1.0", path = "../../domains/pallets/transporter", default-features = false } -pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } -sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", default-features = false, path = "../sp-domains-fraud-proof" } -sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } sp-messenger = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger-host-functions" } -sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-objects = { version = "0.1.0", default-features = false, path = "../sp-objects" } -sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { default-features = false, path = "../sp-subspace-mmr" } -sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } static_assertions = "1.1.0" subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } [dev-dependencies] hex-literal = "0.4.1" -sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-runtime-primitives = { version = "0.1.0", features = ["testing"], path = "../subspace-runtime-primitives" } [features] diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index c53d3cfb9e..1b841f4479 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -29,6 +29,8 @@ mod fees; mod object_mapping; mod signed_extensions; +extern crate alloc; + // Make the WASM binary available. #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); @@ -36,6 +38,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); use crate::fees::{OnChargeTransaction, TransactionByteFee}; use crate::object_mapping::extract_block_object_mapping; pub use crate::signed_extensions::{CheckHistorySeeder, DisablePallets}; +use alloc::borrow::Cow; use codec::{Decode, Encode, MaxEncodedLen}; use core::mem; use core::num::NonZeroU64; @@ -86,9 +89,7 @@ use sp_runtime::traits::{ NumberFor, }; use sp_runtime::transaction_validity::{TransactionSource, TransactionValidity}; -use sp_runtime::{ - create_runtime_str, generic, AccountId32, ApplyExtrinsicResult, ExtrinsicInclusionMode, Perbill, -}; +use sp_runtime::{generic, AccountId32, ApplyExtrinsicResult, ExtrinsicInclusionMode, Perbill}; use sp_std::collections::btree_map::BTreeMap; use sp_std::collections::btree_set::BTreeSet; use sp_std::marker::PhantomData; @@ -121,15 +122,14 @@ const MAX_PIECES_IN_SECTOR: u16 = 1000; // https://substrate.dev/docs/en/knowledgebase/runtime/upgrades#runtime-versioning #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("subspace"), - impl_name: create_runtime_str!("subspace"), + spec_name: Cow::Borrowed("subspace"), + impl_name: Cow::Borrowed("subspace"), authoring_version: 0, spec_version: 7, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, - state_version: 0, - extrinsic_state_version: 0, + system_version: 2, }; // TODO: Many of below constants should probably be updatable but currently they are not @@ -885,6 +885,8 @@ impl pallet_mmr::Config for Runtime { type OnNewRoot = SubspaceMmr; type BlockHashProvider = BlockHashProvider; type WeightInfo = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } parameter_types! { @@ -1555,7 +1557,7 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { + ) -> Result, alloc::string::String> { use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch}; use sp_core::storage::TrackedStorageKey; diff --git a/crates/subspace-service/Cargo.toml b/crates/subspace-service/Cargo.toml index 84ff95d3de..1b3df956bd 100644 --- a/crates/subspace-service/Cargo.toml +++ b/crates/subspace-service/Cargo.toml @@ -21,67 +21,65 @@ async-channel = "1.8.0" async-trait = "0.1.83" cross-domain-message-gossip = { version = "0.1.0", path = "../../domains/client/cross-domain-message-gossip" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } futures = "0.3.29" hex = "0.4.3" -jsonrpsee = { version = "0.23.2", features = ["server"] } -mmr-gadget = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -mmr-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +jsonrpsee = { version = "0.24.5", features = ["server"] } +mmr-gadget = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +mmr-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } parity-scale-codec = "3.6.12" parking_lot = "0.12.2" prometheus-client = "0.22.3" -prost = "0.12" rayon = "1.10.0" -sc-basic-authorship = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-basic-authorship = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } sc-consensus-subspace-rpc = { version = "0.1.0", path = "../sc-consensus-subspace-rpc" } -sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-domains = { version = "0.1.0", path = "../sc-domains" } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-informant = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-light = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-transactions = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-offchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-informant = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-light = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-transactions = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-offchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-proof-of-time = { version = "0.1.0", path = "../sc-proof-of-time" } -sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-rpc-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-rpc-spec-v2 = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-sysinfo = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-rpc-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-sysinfo = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } sc-subspace-block-relay = { version = "0.1.0", path = "../sc-subspace-block-relay" } -sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } schnellru = "0.2.1" schnorrkel = "0.11.4" -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", path = "../sp-domains-fraud-proof" } -sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", path = "../../domains/primitives/messenger-host-functions" } -sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-objects = { version = "0.1.0", path = "../sp-objects" } -sp-offchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-offchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", path = "../sp-subspace-mmr" } -sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } static_assertions = "1.1.0" subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } @@ -89,15 +87,15 @@ subspace-erasure-coding = { version = "0.1.0", path = "../subspace-erasure-codin subspace-networking = { version = "0.1.0", path = "../subspace-networking" } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space" } subspace-runtime-primitives = { version = "0.1.0", path = "../subspace-runtime-primitives" } -substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } thiserror = "1.0.63" tokio = { version = "1.39.2", features = ["sync"] } tracing = "0.1.40" -sp-session = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-rpc-runtime-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-session = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-rpc-runtime-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] runtime-benchmarks = [ diff --git a/crates/subspace-service/src/config.rs b/crates/subspace-service/src/config.rs index 8c62f6cd8c..60b606ee5c 100644 --- a/crates/subspace-service/src/config.rs +++ b/crates/subspace-service/src/config.rs @@ -6,7 +6,8 @@ use sc_network::config::{ SyncMode, TransportConfig, DEFAULT_KADEMLIA_REPLICATION_FACTOR, }; use sc_service::config::{ - IpNetwork, KeystoreConfig, OffchainWorkerConfig, PrometheusConfig, RpcBatchRequestConfig, + ExecutorConfiguration, IpNetwork, KeystoreConfig, OffchainWorkerConfig, PrometheusConfig, + RpcBatchRequestConfig, RpcConfiguration, RpcEndpoint, }; use sc_service::{ BasePath, BlocksPruning, Configuration, DatabaseSource, PruningMode, RpcMethods, @@ -116,8 +117,6 @@ pub struct SubstrateConfiguration { pub force_authoring: bool, /// Chain specification pub chain_spec: Box, - /// Configuration of the output format that the informant uses. - pub informant_output_format: sc_informant::OutputFormat, } impl From for Configuration { @@ -127,6 +126,41 @@ impl From for Configuration { + configuration.network.default_peers_set.out_peers; let client_version = format!("{}/{}", configuration.impl_name, configuration.impl_version); + let rpc_batch_config = if configuration.rpc_options.disable_batch_requests { + RpcBatchRequestConfig::Disabled + } else if let Some(l) = configuration.rpc_options.max_batch_request_len { + RpcBatchRequestConfig::Limit(l) + } else { + RpcBatchRequestConfig::Unlimited + }; + let rpc_addr = configuration.rpc_options.listen_on.map(|listen_addr| { + vec![RpcEndpoint { + batch_config: rpc_batch_config, + max_connections: configuration.rpc_options.max_connections, + listen_addr, + rpc_methods: configuration.rpc_options.methods, + rate_limit: configuration.rpc_options.rate_limit, + rate_limit_trust_proxy_headers: configuration + .rpc_options + .rate_limit_trust_proxy_headers, + rate_limit_whitelisted_ips: configuration + .rpc_options + .rate_limit_whitelisted_ips + .clone(), + max_payload_in_mb: RPC_DEFAULT_MAX_REQUEST_SIZE_MB, + max_payload_out_mb: RPC_DEFAULT_MAX_RESPONSE_SIZE_MB, + max_subscriptions_per_connection: configuration + .rpc_options + .max_subscriptions_per_connection, + max_buffer_capacity_per_connection: configuration + .rpc_options + .message_buffer_capacity_per_connection, + cors: configuration.rpc_options.cors.clone(), + retry_random_port: true, + is_optional: false, + }] + }); + Self { impl_name: configuration.impl_name, impl_version: configuration.impl_version, @@ -179,33 +213,36 @@ impl From for Configuration { trie_cache_maximum_size: Some(64 * 1024 * 1024), state_pruning: Some(configuration.state_pruning), blocks_pruning: configuration.blocks_pruning, - wasm_method: Default::default(), + executor: ExecutorConfiguration { + wasm_method: Default::default(), + // Substrate's default + max_runtime_instances: 8, + default_heap_pages: None, + // Substrate's default + runtime_cache_size: 2, + }, wasm_runtime_overrides: None, - rpc_addr: configuration.rpc_options.listen_on, - rpc_methods: configuration.rpc_options.methods, - rpc_max_connections: configuration.rpc_options.max_connections, - rpc_cors: configuration.rpc_options.cors, - rpc_max_request_size: RPC_DEFAULT_MAX_REQUEST_SIZE_MB, - rpc_max_response_size: RPC_DEFAULT_MAX_RESPONSE_SIZE_MB, - rpc_id_provider: None, - rpc_max_subs_per_conn: configuration.rpc_options.max_subscriptions_per_connection, - // Doesn't matter since we have specified address above - rpc_port: 0, - rpc_message_buffer_capacity: configuration - .rpc_options - .message_buffer_capacity_per_connection, - rpc_batch_config: if configuration.rpc_options.disable_batch_requests { - RpcBatchRequestConfig::Disabled - } else if let Some(l) = configuration.rpc_options.max_batch_request_len { - RpcBatchRequestConfig::Limit(l) - } else { - RpcBatchRequestConfig::Unlimited + rpc: RpcConfiguration { + addr: rpc_addr, + methods: configuration.rpc_options.methods, + max_connections: configuration.rpc_options.max_connections, + cors: configuration.rpc_options.cors, + max_request_size: RPC_DEFAULT_MAX_REQUEST_SIZE_MB, + max_response_size: RPC_DEFAULT_MAX_RESPONSE_SIZE_MB, + id_provider: None, + max_subs_per_conn: configuration.rpc_options.max_subscriptions_per_connection, + // Doesn't matter since we have specified address above + port: 0, + message_buffer_capacity: configuration + .rpc_options + .message_buffer_capacity_per_connection, + batch_config: rpc_batch_config, + rate_limit: configuration.rpc_options.rate_limit, + rate_limit_whitelisted_ips: configuration.rpc_options.rate_limit_whitelisted_ips, + rate_limit_trust_proxy_headers: configuration + .rpc_options + .rate_limit_trust_proxy_headers, }, - rpc_rate_limit: configuration.rpc_options.rate_limit, - rpc_rate_limit_whitelisted_ips: configuration.rpc_options.rate_limit_whitelisted_ips, - rpc_rate_limit_trust_proxy_headers: configuration - .rpc_options - .rate_limit_trust_proxy_headers, prometheus_config: configuration .prometheus_listen_on .map(|prometheus_listen_on| { @@ -215,7 +252,6 @@ impl From for Configuration { ) }), telemetry_endpoints: configuration.telemetry_endpoints, - default_heap_pages: None, // Offchain worker is not used // indexing is used to store the mmr leaves from Runtime offchain_worker: OffchainWorkerConfig { @@ -229,8 +265,6 @@ impl From for Configuration { tracing_receiver: Default::default(), chain_spec: configuration.chain_spec, // Substrate's default - max_runtime_instances: 8, - // Substrate's default announce_block: true, role: if configuration.farmer { sc_service::Role::Authority @@ -238,9 +272,6 @@ impl From for Configuration { sc_service::Role::Full }, base_path: BasePath::new(configuration.base_path), - informant_output_format: configuration.informant_output_format, - // Substrate's default - runtime_cache_size: 2, } } } diff --git a/crates/subspace-service/src/lib.rs b/crates/subspace-service/src/lib.rs index 5d32b8ce68..89565a28c2 100644 --- a/crates/subspace-service/src/lib.rs +++ b/crates/subspace-service/src/lib.rs @@ -61,8 +61,8 @@ use sc_client_api::{ AuxStore, Backend, BlockBackend, BlockchainEvents, ExecutorProvider, HeaderBackend, }; use sc_consensus::{ - BasicQueue, BlockCheckParams, BlockImport, BlockImportParams, DefaultImportQueue, ImportQueue, - ImportResult, SharedBlockImport, + BasicQueue, BlockCheckParams, BlockImport, BlockImportParams, BoxBlockImport, + DefaultImportQueue, ImportQueue, ImportResult, }; use sc_consensus_slots::SlotProportion; use sc_consensus_subspace::archiver::{ @@ -78,12 +78,18 @@ use sc_consensus_subspace::verifier::{SubspaceVerifier, SubspaceVerifierOptions} use sc_consensus_subspace::SubspaceLink; use sc_domains::ExtensionsFactory as DomainsExtensionFactory; use sc_network::service::traits::NetworkService; -use sc_network::{NetworkWorker, NotificationMetrics, NotificationService}; +use sc_network::{NetworkWorker, NotificationMetrics, NotificationService, Roles}; +use sc_network_sync::block_relay_protocol::BlockRelayParams; +use sc_network_sync::engine::SyncingEngine; +use sc_network_sync::service::network::NetworkServiceProvider; use sc_proof_of_time::source::gossip::pot_gossip_peers_set_config; use sc_proof_of_time::source::{PotSlotInfo, PotSourceWorker}; use sc_proof_of_time::verifier::PotVerifier; use sc_service::error::Error as ServiceError; -use sc_service::{Configuration, NetworkStarter, SpawnTasksParams, TaskManager}; +use sc_service::{ + build_network_advanced, build_polkadot_syncing_strategy, BuildNetworkAdvancedParams, + Configuration, NetworkStarter, SpawnTasksParams, TaskManager, +}; use sc_subspace_block_relay::{ build_consensus_relay, BlockRelayConfigurationError, NetworkWrapper, }; @@ -92,6 +98,7 @@ use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_api::{ApiExt, ConstructRuntimeApi, Metadata, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder; use sp_blockchain::HeaderMetadata; +use sp_consensus::block_validation::DefaultBlockAnnounceValidator; use sp_consensus_slots::Slot; use sp_consensus_subspace::digests::extract_pre_digest; use sp_consensus_subspace::{ @@ -175,6 +182,7 @@ pub enum Error { } // Simple wrapper whose ony purpose is to convert error type +#[derive(Clone)] struct BlockImportWrapper(BI); #[async_trait::async_trait] @@ -198,7 +206,7 @@ where } async fn import_block( - &mut self, + &self, block: BlockImportParams, ) -> Result { self.0 @@ -442,7 +450,7 @@ where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, { /// Subspace block import - pub block_import: SharedBlockImport, + pub block_import: BoxBlockImport, /// Subspace link pub subspace_link: SubspaceLink, /// Segment headers store @@ -501,8 +509,8 @@ where }) .transpose()?; - let executor = sc_service::new_wasm_executor(config); - let domains_executor = sc_service::new_wasm_executor(config); + let executor = sc_service::new_wasm_executor(&config.executor); + let domains_executor = sc_service::new_wasm_executor(&config.executor); let backend = sc_service::new_db_backend(config.db_config())?; @@ -634,17 +642,16 @@ where pot_verifier: pot_verifier.clone(), }); - let block_import = SharedBlockImport::new(BlockImportWrapper(block_import)); let import_queue = BasicQueue::new( verifier, - block_import.clone(), + Box::new(BlockImportWrapper(block_import.clone())), None, &task_manager.spawn_essential_handle(), config.prometheus_registry(), ); let other = OtherPartialComponents { - block_import, + block_import: Box::new(BlockImportWrapper(block_import.clone())), subspace_link, segment_headers_store, pot_verifier, @@ -763,8 +770,7 @@ where mut telemetry, } = other; - let offchain_indexing_enabled = config.offchain_worker.indexing_enabled; - let fork_id = config.base.chain_spec.fork_id().map(String::from); + let offchain_indexing_enabled = config.base.offchain_worker.indexing_enabled; let (node, bootstrap_nodes) = match config.subspace_networking { SubspaceNetworking::Reuse { node, @@ -859,19 +865,25 @@ where } }; + let substrate_prometheus_registry = config + .base + .prometheus_config + .as_ref() + .map(|prometheus_config| prometheus_config.registry.clone()); let import_queue_service1 = import_queue.service(); let import_queue_service2 = import_queue.service(); let network_wrapper = Arc::new(NetworkWrapper::default()); - let block_relay = Some( - build_consensus_relay( - network_wrapper.clone(), - client.clone(), - transaction_pool.clone(), - config.base.prometheus_registry(), - ) - .map_err(Error::BlockRelay)?, + let block_relay = build_consensus_relay( + network_wrapper.clone(), + client.clone(), + transaction_pool.clone(), + substrate_prometheus_registry.as_ref(), + ) + .map_err(Error::BlockRelay)?; + let mut net_config = sc_network::config::FullNetworkConfiguration::new( + &config.base.network, + substrate_prometheus_registry.clone(), ); - let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.base.network); let (xdm_gossip_notification_config, xdm_gossip_notification_service) = xdm_gossip_peers_set_config(); net_config.add_notification_protocol(xdm_gossip_notification_config); @@ -887,16 +899,18 @@ where .reserved_nodes .len(); + let protocol_id = config.base.protocol_id(); + let fork_id = config.base.chain_spec.fork_id(); + if let Some(offchain_storage) = backend.offchain_storage() { // Allow both outgoing and incoming requests. - let (handler, protocol_config) = - MmrRequestHandler::new::::Hash>, _>( - &config.base.protocol_id(), - fork_id.as_deref(), - client.clone(), - num_peer_hint, - offchain_storage, - ); + let (handler, protocol_config) = MmrRequestHandler::new::, _>( + &protocol_id, + fork_id, + client.clone(), + num_peer_hint, + offchain_storage, + ); task_manager .spawn_handle() .spawn("mmr-request-handler", Some("networking"), handler.run()); @@ -906,10 +920,10 @@ where // "Last confirmed domain block execution receipt" request handler { - let (handler, protocol_config) = LastDomainBlockERRequestHandler::new::< - NetworkWorker::Hash>, - >( - fork_id.as_deref(), client.clone(), num_peer_hint + let (handler, protocol_config) = LastDomainBlockERRequestHandler::new::>( + fork_id, + client.clone(), + num_peer_hint, ); task_manager.spawn_handle().spawn( "last-domain-execution-receipt-request-handler", @@ -920,25 +934,77 @@ where net_config.add_request_response_protocol(protocol_config); } - let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = - sc_service::build_network(sc_service::BuildNetworkParams { - config: &config.base, + let network_service_provider = NetworkServiceProvider::new(); + let network_service_handle = network_service_provider.handle(); + let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = { + let spawn_handle = task_manager.spawn_handle(); + let metrics = NotificationMetrics::new(substrate_prometheus_registry.as_ref()); + + // TODO: Remove BlockRelayParams here and simplify relay initialization + let block_downloader = { + let BlockRelayParams { + mut server, + downloader, + request_response_config, + } = block_relay; + net_config.add_request_response_protocol(request_response_config); + + spawn_handle.spawn("block-request-handler", Some("networking"), async move { + server.run().await; + }); + + downloader + }; + + let syncing_strategy = build_polkadot_syncing_strategy( + protocol_id.clone(), + fork_id, + &mut net_config, + None, + block_downloader, + client.clone(), + &spawn_handle, + substrate_prometheus_registry.as_ref(), + )?; + + let (syncing_engine, sync_service, block_announce_config) = + SyncingEngine::new::>( + Roles::from(&config.base.role), + Arc::clone(&client), + substrate_prometheus_registry.as_ref(), + metrics.clone(), + &net_config, + protocol_id.clone(), + fork_id, + Box::new(DefaultBlockAnnounceValidator), + syncing_strategy, + network_service_provider.handle(), + import_queue.service(), + net_config.peer_store_handle(), + config.base.network.force_synced, + ) + .map_err(sc_service::Error::from)?; + + spawn_handle.spawn_blocking("syncing", None, syncing_engine.run()); + + build_network_advanced(BuildNetworkAdvancedParams { + role: config.base.role, + protocol_id, + fork_id, + ipfs_server: config.base.network.ipfs_server, + announce_block: config.base.announce_block, net_config, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - spawn_handle: task_manager.spawn_handle(), + client: Arc::clone(&client), + transaction_pool: Arc::clone(&transaction_pool), + spawn_handle, import_queue, - block_announce_validator_builder: None, - warp_sync_params: None, - block_relay, - metrics: NotificationMetrics::new( - config - .base - .prometheus_config - .as_ref() - .map(|cfg| &cfg.registry), - ), - })?; + sync_service, + block_announce_config, + network_service_provider, + metrics_registry: substrate_prometheus_registry.as_ref(), + metrics, + })? + }; task_manager.spawn_handle().spawn( "sync-target-follower", @@ -1012,13 +1078,13 @@ where let snap_sync_task = snap_sync( segment_headers_store.clone(), node.clone(), - fork_id.clone(), + fork_id.map(|fork_id| fork_id.to_string()), Arc::clone(&client), import_queue_service1, pause_sync.clone(), dsn_sync_piece_getter.clone(), - Arc::clone(&network_service), sync_service.clone(), + network_service_handle, subspace_link.erasure_coding().clone(), ); @@ -1054,7 +1120,7 @@ where }), ); - if let Some(registry) = config.base.prometheus_registry() { + if let Some(registry) = substrate_prometheus_registry.as_ref() { match NodeMetrics::new( client.clone(), client.every_import_notification_stream(), @@ -1142,7 +1208,7 @@ where task_manager.spawn_handle(), client.clone(), transaction_pool.clone(), - config.base.prometheus_registry(), + substrate_prometheus_registry.as_ref(), telemetry.as_ref().map(|x| x.handle()), ); @@ -1227,15 +1293,12 @@ where let reward_signing_notification_stream = reward_signing_notification_stream.clone(); let archived_segment_notification_stream = archived_segment_notification_stream.clone(); let transaction_pool = transaction_pool.clone(); - let chain_spec = config.base.chain_spec.cloned_box(); let backend = backend.clone(); - Box::new(move |deny_unsafe, subscription_executor| { + Box::new(move |subscription_executor| { let deps = rpc::FullDeps { client: client.clone(), pool: transaction_pool.clone(), - chain_spec: chain_spec.cloned_box(), - deny_unsafe, subscription_executor, new_slot_notification_stream: new_slot_notification_stream.clone(), reward_signing_notification_stream: reward_signing_notification_stream.clone(), @@ -1252,7 +1315,7 @@ where rpc::create_full(deps).map_err(Into::into) }) } else { - Box::new(|_, _| Ok(RpcModule::new(()))) + Box::new(|_| Ok(RpcModule::new(()))) }, backend: backend.clone(), system_rpc_tx, diff --git a/crates/subspace-service/src/rpc.rs b/crates/subspace-service/src/rpc.rs index b860296485..8f85891010 100644 --- a/crates/subspace-service/src/rpc.rs +++ b/crates/subspace-service/src/rpc.rs @@ -33,8 +33,6 @@ use sc_consensus_subspace::slot_worker::{ }; use sc_consensus_subspace_rpc::{SubspaceRpc, SubspaceRpcApiServer, SubspaceRpcConfig}; use sc_rpc::SubscriptionTaskExecutor; -use sc_rpc_api::DenyUnsafe; -use sc_rpc_spec_v2::chain_spec::{ChainSpec, ChainSpecApiServer}; use sc_transaction_pool_api::TransactionPool; use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; @@ -60,10 +58,6 @@ where pub client: Arc, /// Transaction pool instance. pub pool: Arc

, - /// A copy of the chain spec. - pub chain_spec: Box, - /// Whether to deny unsafe calls. - pub deny_unsafe: DenyUnsafe, /// Executor to drive the subscription manager in the Grandpa RPC handler. pub subscription_executor: SubscriptionTaskExecutor, /// A stream with notifications about new slot arrival with ability to send solution back. @@ -116,8 +110,6 @@ where let FullDeps { client, pool, - chain_spec, - deny_unsafe, subscription_executor, new_slot_notification_stream, reward_signing_notification_stream, @@ -130,12 +122,7 @@ where backend, } = deps; - let chain_name = chain_spec.name().to_string(); - let genesis_hash = client.info().genesis_hash; - let properties = chain_spec.properties(); - module.merge(ChainSpec::new(chain_name, genesis_hash, properties).into_rpc())?; - - module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; + module.merge(System::new(client.clone(), pool).into_rpc())?; module.merge(TransactionPayment::new(client.clone()).into_rpc())?; module.merge( @@ -150,7 +137,6 @@ where sync_oracle, kzg, erasure_coding, - deny_unsafe, })? .into_rpc(), )?; diff --git a/crates/subspace-service/src/sync_from_dsn.rs b/crates/subspace-service/src/sync_from_dsn.rs index bfad207855..2bf44e85b9 100644 --- a/crates/subspace-service/src/sync_from_dsn.rs +++ b/crates/subspace-service/src/sync_from_dsn.rs @@ -14,7 +14,6 @@ use sc_consensus::import_queue::ImportQueueService; use sc_consensus_subspace::archiver::SegmentHeadersStore; use sc_network::service::traits::NetworkService; use sc_network::NetworkBlock; -use sc_service::ClientExt; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_consensus_subspace::SubspaceApi; @@ -87,7 +86,7 @@ enum NotificationReason { /// Create node observer that will track node state and send notifications to worker to start sync /// from DSN. #[allow(clippy::too_many_arguments)] -pub(super) fn create_observer_and_worker( +pub(super) fn create_observer_and_worker( segment_headers_store: SegmentHeadersStore, network_service: Arc, node: Node, @@ -104,14 +103,12 @@ pub(super) fn create_observer_and_worker( ) where Block: BlockT, - Backend: sc_client_api::Backend, AS: AuxStore + Send + Sync + 'static, NB: NetworkBlock> + Send + 'static, Client: HeaderBackend + BlockBackend + BlockchainEvents + ProvideRuntimeApi - + ClientExt + Send + Sync + 'static, @@ -256,7 +253,7 @@ async fn create_substrate_network_observer( } #[allow(clippy::too_many_arguments)] -async fn create_worker( +async fn create_worker( segment_headers_store: SegmentHeadersStore, node: &Node, client: &Client, @@ -270,14 +267,12 @@ async fn create_worker( ) -> Result<(), sc_service::Error> where Block: BlockT, - Backend: sc_client_api::Backend, AS: AuxStore + Send + Sync + 'static, IQS: ImportQueueService + ?Sized, NB: NetworkBlock>, Client: HeaderBackend + BlockBackend + ProvideRuntimeApi - + ClientExt + Send + Sync + 'static, @@ -344,11 +339,6 @@ where } } - // Clear the block gap that arises from first block import with a much higher number than - // previously (resulting in a gap) - // TODO: This is a hack and better solution is needed: https://github.com/paritytech/polkadot-sdk/issues/4407 - client.clear_block_gap()?; - debug!("Finished DSN sync"); // This will notify Substrate's sync mechanism and allow regular Substrate sync to continue diff --git a/crates/subspace-service/src/sync_from_dsn/snap_sync.rs b/crates/subspace-service/src/sync_from_dsn/snap_sync.rs index 5af1f2c67b..2ff976b07c 100644 --- a/crates/subspace-service/src/sync_from_dsn/snap_sync.rs +++ b/crates/subspace-service/src/sync_from_dsn/snap_sync.rs @@ -9,9 +9,10 @@ use sc_consensus::{ StorageChanges, }; use sc_consensus_subspace::archiver::{decode_block, SegmentHeadersStore}; -use sc_network::{NetworkBlock, NetworkRequest, PeerId}; +use sc_network::{NetworkBlock, PeerId}; +use sc_network_sync::service::network::NetworkServiceHandle; use sc_network_sync::SyncingService; -use sc_service::{ClientExt, Error}; +use sc_service::Error; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_consensus::BlockOrigin; @@ -30,7 +31,7 @@ use tokio::time::sleep; use tracing::{debug, error}; #[allow(clippy::too_many_arguments)] -pub(crate) async fn snap_sync( +pub(crate) async fn snap_sync( segment_headers_store: SegmentHeadersStore, node: Node, fork_id: Option, @@ -38,26 +39,21 @@ pub(crate) async fn snap_sync( mut import_queue_service: Box>, pause_sync: Arc, piece_getter: PG, - network_request: NR, sync_service: Arc>, + network_service_handle: NetworkServiceHandle, erasure_coding: ErasureCoding, ) where - Backend: sc_client_api::Backend, Block: BlockT, AS: AuxStore, Client: HeaderBackend - + ClientExt + ProvideRuntimeApi + ProofProvider + BlockImport + Send + Sync + 'static, - // TODO: Remove when https://github.com/paritytech/polkadot-sdk/pull/5339 is in our fork - for<'a> &'a Client: BlockImport, Client::Api: SubspaceApi + ObjectsApi, PG: DsnSyncPieceGetter, - NR: NetworkRequest, { let info = client.info(); // Only attempt snap sync with genesis state @@ -73,8 +69,8 @@ pub(crate) async fn snap_sync( fork_id.as_deref(), &client, import_queue_service.as_mut(), - &network_request, &sync_service, + &network_service_handle, None, &erasure_coding, ); @@ -245,36 +241,31 @@ where #[allow(clippy::too_many_arguments)] /// Synchronize the blockchain to the target_block (approximate value based on the containing /// segment) or to the last archived block. -async fn sync( +async fn sync( segment_headers_store: &SegmentHeadersStore, node: &Node, piece_getter: &PG, fork_id: Option<&str>, client: &Arc, import_queue_service: &mut IQS, - network_request: &NR, sync_service: &SyncingService, + network_service_handle: &NetworkServiceHandle, target_block: Option, erasure_coding: &ErasureCoding, ) -> Result<(), Error> where - B: sc_client_api::Backend, PG: DsnSyncPieceGetter, AS: AuxStore, Block: BlockT, Client: HeaderBackend - + ClientExt + ProvideRuntimeApi + ProofProvider + BlockImport + Send + Sync + 'static, - // TODO: Remove when https://github.com/paritytech/polkadot-sdk/pull/5339 is in our fork - for<'a> &'a Client: BlockImport, Client::Api: SubspaceApi + ObjectsApi, IQS: ImportQueueService + ?Sized, - NR: NetworkRequest, { debug!("Starting snap sync..."); @@ -325,11 +316,17 @@ where let (header, extrinsics) = signed_block.block.deconstruct(); // Download state for the first block, so it can be imported even without doing execution - let state = download_state(&header, client, fork_id, network_request, sync_service) - .await - .map_err(|error| { - format!("Failed to download state for the first block of target segment: {error}") - })?; + let state = download_state( + &header, + client, + fork_id, + sync_service, + network_service_handle, + ) + .await + .map_err(|error| { + format!("Failed to download state for the first block of target segment: {error}") + })?; debug!("Downloaded state of the first block of the target segment"); @@ -339,9 +336,9 @@ where block.justifications = signed_block.justifications; block.state_action = StateAction::ApplyChanges(StorageChanges::Import(state)); block.finalized = true; + block.create_gap = false; block.fork_choice = Some(ForkChoiceStrategy::Custom(true)); - // TODO: Simplify when https://github.com/paritytech/polkadot-sdk/pull/5339 is in our fork - (&mut client.as_ref()) + client .import_block(block) .await .map_err(|error| format!("Failed to import first block of target segment: {error}"))?; @@ -379,11 +376,6 @@ where // TODO: Replace this hack with actual watching of block import wait_for_block_import(client.as_ref(), last_block_number.into()).await; - // Clear the block gap that arises from first block import with a much higher number than - // previously (resulting in a gap) - // TODO: This is a hack and better solution is needed: https://github.com/paritytech/polkadot-sdk/issues/4407 - client.clear_block_gap()?; - debug!(info = ?client.info(), "Snap sync finished successfully"); Ok(()) @@ -454,17 +446,16 @@ where } /// Download and return state for specified block -async fn download_state( +async fn download_state( header: &Block::Header, client: &Arc, fork_id: Option<&str>, - network_request: &NR, sync_service: &SyncingService, + network_service_handle: &NetworkServiceHandle, ) -> Result, Error> where Block: BlockT, Client: HeaderBackend + ProofProvider + Send + Sync + 'static, - NR: NetworkRequest, { let block_number = *header.number(); @@ -502,13 +493,13 @@ where tried_peers.insert(current_peer_id); - let sync_engine = SnapSyncingEngine::::new( + let sync_engine = SnapSyncingEngine::::new( client.clone(), fork_id, header.clone(), false, (current_peer_id, block_number), - network_request, + network_service_handle, ) .map_err(Error::Client)?; diff --git a/crates/subspace-service/src/sync_from_dsn/snap_sync_engine.rs b/crates/subspace-service/src/sync_from_dsn/snap_sync_engine.rs index 13fb7f81aa..aac11eeda7 100644 --- a/crates/subspace-service/src/sync_from_dsn/snap_sync_engine.rs +++ b/crates/subspace-service/src/sync_from_dsn/snap_sync_engine.rs @@ -20,42 +20,48 @@ //! to tip and keep the blockchain up to date with network updates. use futures::channel::oneshot; -use futures::{FutureExt, StreamExt}; -use prost::Message; +use futures::StreamExt; use sc_client_api::ProofProvider; use sc_consensus::IncomingBlock; -use sc_network::request_responses::IfDisconnected; use sc_network::types::ProtocolName; -use sc_network::{NetworkRequest, PeerId}; +use sc_network::{OutboundFailure, PeerId, RequestFailure}; use sc_network_sync::pending_responses::{PendingResponses, ResponseEvent}; -use sc_network_sync::schema::v1::{StateRequest, StateResponse}; +use sc_network_sync::service::network::NetworkServiceHandle; use sc_network_sync::state_request_handler::generate_protocol_name; -use sc_network_sync::strategy::state::{StateStrategy, StateStrategyAction}; -use sc_network_sync::strategy::StrategyKey; -use sc_network_sync::types::{BadPeer, OpaqueStateRequest, OpaqueStateResponse, PeerRequest}; +use sc_network_sync::strategy::state::StateStrategy; +use sc_network_sync::strategy::SyncingAction; +use sc_network_sync::types::BadPeer; use sp_blockchain::{Error as ClientError, HeaderBackend}; use sp_runtime::traits::{Block as BlockT, NumberFor}; use std::sync::Arc; -use tracing::{debug, error, trace, warn}; +use tracing::{debug, trace, warn}; + +mod rep { + use sc_network::ReputationChange as Rep; + /// Peer is on unsupported protocol version. + pub(super) const BAD_PROTOCOL: Rep = Rep::new_fatal("Unsupported protocol"); + /// Reputation change when a peer refuses a request. + pub(super) const REFUSED: Rep = Rep::new(-(1 << 10), "Request refused"); + /// Reputation change when a peer doesn't respond in time to our messages. + pub(super) const TIMEOUT: Rep = Rep::new(-(1 << 10), "Request timeout"); +} -pub struct SnapSyncingEngine<'a, Block, NR> +pub struct SnapSyncingEngine<'a, Block> where Block: BlockT, { /// Syncing strategy strategy: StateStrategy, - /// Network request handle - network_request: &'a NR, /// Pending responses - pending_responses: PendingResponses, + pending_responses: PendingResponses, /// Protocol name used to send out state requests state_request_protocol_name: ProtocolName, + network_service_handle: &'a NetworkServiceHandle, } -impl<'a, Block, NR> SnapSyncingEngine<'a, Block, NR> +impl<'a, Block> SnapSyncingEngine<'a, Block> where Block: BlockT, - NR: NetworkRequest, { pub fn new( client: Arc, @@ -63,13 +69,13 @@ where target_header: Block::Header, skip_proof: bool, current_sync_peer: (PeerId, NumberFor), - network_request: &'a NR, + network_service_handle: &'a NetworkServiceHandle, ) -> Result where Client: HeaderBackend + ProofProvider + Send + Sync + 'static, { let state_request_protocol_name = - generate_protocol_name(client.info().genesis_hash, fork_id).into(); + ProtocolName::from(generate_protocol_name(client.info().genesis_hash, fork_id)); // Initialize syncing strategy. let strategy = StateStrategy::new( @@ -83,13 +89,14 @@ where None, skip_proof, vec![current_sync_peer].into_iter(), + state_request_protocol_name.clone(), ); Ok(Self { strategy, - network_request, pending_responses: PendingResponses::new(), state_request_protocol_name, + network_service_handle, }) } @@ -99,7 +106,10 @@ where loop { // Process actions requested by a syncing strategy. - let mut actions = self.strategy.actions().peekable(); + let mut actions = self + .strategy + .actions(self.network_service_handle) + .peekable(); if actions.peek().is_none() { return Err(ClientError::Backend( "Sync state download failed: no further actions".into(), @@ -108,23 +118,40 @@ where for action in actions { match action { - StateStrategyAction::SendStateRequest { peer_id, request } => { - self.send_state_request(peer_id, StrategyKey::State, request); + SyncingAction::StartRequest { + peer_id, + key, + request, + // State sync doesn't use this + remove_obsolete: _, + } => { + self.pending_responses.insert(peer_id, key, request); + } + SyncingAction::CancelRequest { .. } => { + return Err(ClientError::Application( + "Unexpected SyncingAction::CancelRequest".into(), + )); } - StateStrategyAction::DropPeer(BadPeer(peer_id, rep)) => { - self.pending_responses.remove(peer_id, StrategyKey::State); + SyncingAction::DropPeer(BadPeer(peer_id, rep)) => { + self.pending_responses + .remove(peer_id, StateStrategy::::STRATEGY_KEY); trace!(%peer_id, "Peer dropped: {rep:?}"); } - StateStrategyAction::ImportBlocks { blocks, .. } => { + SyncingAction::ImportBlocks { blocks, .. } => { return blocks.into_iter().next().ok_or_else(|| { ClientError::Application( - "StateStrategyAction::ImportBlocks didn't contain any blocks to import" + "SyncingAction::ImportBlocks didn't contain any blocks to import" .into(), ) }); } - StateStrategyAction::Finished => { + SyncingAction::ImportJustifications { .. } => { + return Err(ClientError::Application( + "Unexpected SyncingAction::ImportJustifications".into(), + )); + } + SyncingAction::Finished => { return Err(ClientError::Backend( "Sync state finished without blocks to import".into(), )); @@ -137,84 +164,70 @@ where } } - fn send_state_request( - &mut self, - peer_id: PeerId, - key: StrategyKey, - request: OpaqueStateRequest, - ) { - let (tx, rx) = oneshot::channel(); - - self.pending_responses - .insert(peer_id, key, PeerRequest::State, rx.boxed()); - - match Self::encode_state_request(&request) { - Ok(data) => { - self.network_request.start_request( - peer_id, - self.state_request_protocol_name.clone(), - data, - None, - tx, - IfDisconnected::ImmediateError, - ); - } - Err(err) => { - warn!("Failed to encode state request {request:?}: {err:?}",); - } - } - } - - fn encode_state_request(request: &OpaqueStateRequest) -> Result, String> { - let request: &StateRequest = request.0.downcast_ref().ok_or_else(|| { - "Failed to downcast opaque state response during encoding, this is an implementation \ - bug" - .to_string() - })?; - - Ok(request.encode_to_vec()) - } - - fn decode_state_response(response: &[u8]) -> Result { - let response = StateResponse::decode(response) - .map_err(|error| format!("Failed to decode state response: {error}"))?; - - Ok(OpaqueStateResponse(Box::new(response))) - } - - fn process_response_event(&mut self, response_event: ResponseEvent) { + fn process_response_event(&mut self, response_event: ResponseEvent) { let ResponseEvent { peer_id, - request, - response, - .. + key: _, + response: response_result, } = response_event; - match response { - Ok(Ok((resp, _))) => match request { - PeerRequest::Block(req) => { - error!("Unexpected PeerRequest::Block - {:?}", req); - } - PeerRequest::State => { - let response = match Self::decode_state_response(&resp[..]) { - Ok(proto) => proto, - Err(e) => { - debug!("Failed to decode state response from peer {peer_id:?}: {e:?}.",); - return; - } - }; - - self.strategy.on_state_response(peer_id, response); - } - PeerRequest::WarpProof => { - error!("Unexpected PeerRequest::WarpProof",); - } - }, + match response_result { + Ok(Ok((response, _protocol_name))) => { + let Ok(response) = response.downcast::>() else { + warn!("Failed to downcast state response"); + debug_assert!(false); + return; + }; + + self.strategy.on_state_response(&peer_id, *response); + } Ok(Err(e)) => { debug!("Request to peer {peer_id:?} failed: {e:?}."); + + match e { + RequestFailure::Network(OutboundFailure::Timeout) => { + self.network_service_handle + .report_peer(peer_id, rep::TIMEOUT); + self.network_service_handle + .disconnect_peer(peer_id, self.state_request_protocol_name.clone()); + } + RequestFailure::Network(OutboundFailure::UnsupportedProtocols) => { + self.network_service_handle + .report_peer(peer_id, rep::BAD_PROTOCOL); + self.network_service_handle + .disconnect_peer(peer_id, self.state_request_protocol_name.clone()); + } + RequestFailure::Network(OutboundFailure::DialFailure) => { + self.network_service_handle + .disconnect_peer(peer_id, self.state_request_protocol_name.clone()); + } + RequestFailure::Refused => { + self.network_service_handle + .report_peer(peer_id, rep::REFUSED); + self.network_service_handle + .disconnect_peer(peer_id, self.state_request_protocol_name.clone()); + } + RequestFailure::Network(OutboundFailure::ConnectionClosed) + | RequestFailure::NotConnected => { + self.network_service_handle + .disconnect_peer(peer_id, self.state_request_protocol_name.clone()); + } + RequestFailure::UnknownProtocol => { + debug_assert!(false, "Block request protocol should always be known."); + } + RequestFailure::Obsolete => { + debug_assert!( + false, + "Can not receive `RequestFailure::Obsolete` after dropping the \ + response receiver.", + ); + } + } } Err(oneshot::Canceled) => { - trace!("Request to peer {peer_id:?} failed due to oneshot being canceled.",); + trace!("Request to peer {peer_id:?} failed due to oneshot being canceled."); + self.network_service_handle + .disconnect_peer(peer_id, self.state_request_protocol_name.clone()); } } } diff --git a/crates/subspace-service/src/task_spawner.rs b/crates/subspace-service/src/task_spawner.rs index da66aa31ee..06cd37869b 100644 --- a/crates/subspace-service/src/task_spawner.rs +++ b/crates/subspace-service/src/task_spawner.rs @@ -84,7 +84,11 @@ where let telemetry = telemetry .map(|telemetry| { init_telemetry( - &mut config, + config.network.node_name.clone(), + config.impl_name.clone(), + config.impl_version.clone(), + config.chain_spec.name().to_string(), + config.role.is_authority(), network.clone(), client.clone(), telemetry, @@ -126,39 +130,52 @@ where ), ); - let rpc_id_provider = config.rpc_id_provider.take(); + let rpc_id_provider = config.rpc.id_provider.take(); // jsonrpsee RPC - let gen_rpc_module = |deny_unsafe: DenyUnsafe| { + let gen_rpc_module = || { gen_rpc_module( - deny_unsafe, task_manager.spawn_handle(), client.clone(), transaction_pool.clone(), keystore.clone(), system_rpc_tx.clone(), - &config, + config.impl_name.clone(), + config.impl_version.clone(), + config.chain_spec.as_ref(), + &config.state_pruning, + config.blocks_pruning, backend.clone(), &*rpc_builder, ) }; + let in_memory_rpc = { + let mut module = gen_rpc_module()?; + module.extensions_mut().insert(DenyUnsafe::No); + module + }; let rpc = config - .rpc_addr - .map(|_| start_rpc_servers(&config, gen_rpc_module, rpc_id_provider)) + .rpc + .addr + .is_some() + .then(|| { + start_rpc_servers( + &config.rpc, + config.prometheus_registry(), + &config.tokio_handle, + gen_rpc_module, + rpc_id_provider, + ) + }) .transpose()?; - let rpc_handlers = RpcHandlers::new(Arc::new(gen_rpc_module(DenyUnsafe::No)?)); + let rpc_handlers = RpcHandlers::new(Arc::new(in_memory_rpc)); // Spawn informant task spawn_handle.spawn( "informant", None, - sc_informant::build( - client.clone(), - network, - sync_service.clone(), - config.informant_output_format, - ), + sc_informant::build(client.clone(), network, sync_service.clone()), ); task_manager.keep_alive((config.base_path, rpc)); diff --git a/domains/client/block-builder/Cargo.toml b/domains/client/block-builder/Cargo.toml index e603022aaf..4ecf44cd3e 100644 --- a/domains/client/block-builder/Cargo.toml +++ b/domains/client/block-builder/Cargo.toml @@ -14,12 +14,12 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", features = ["derive"] } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } tracing = "0.1.40" diff --git a/domains/client/block-preprocessor/Cargo.toml b/domains/client/block-preprocessor/Cargo.toml index 0e5d7582d4..37c5870d9c 100644 --- a/domains/client/block-preprocessor/Cargo.toml +++ b/domains/client/block-preprocessor/Cargo.toml @@ -15,30 +15,30 @@ include = [ async-trait = { version = "0.1.57" } codec = { package = "parity-scale-codec", version = "3.6.12", features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime" } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-executor-common = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-executor-common = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-block-fees = { version = "0.1.0", path = "../../primitives/block-fees" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } sp-domain-sudo = { version = "0.1.0", path = "../../primitives/domain-sudo" } sp-executive = { version = "0.1.0", path = "../../primitives/executive" } -sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", path = "../../primitives/messenger" } -sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { default-features = false, path = "../../../crates/sp-subspace-mmr" } -sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-weights = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-version = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-weights = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-version = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } tracing = "0.1.40" [dev-dependencies] -sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } diff --git a/domains/client/consensus-relay-chain/Cargo.toml b/domains/client/consensus-relay-chain/Cargo.toml index 7d17487e73..9b2bed6d4c 100644 --- a/domains/client/consensus-relay-chain/Cargo.toml +++ b/domains/client/consensus-relay-chain/Cargo.toml @@ -7,9 +7,5 @@ edition = "2021" [dependencies] async-trait = "0.1.83" -sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } diff --git a/domains/client/consensus-relay-chain/src/import_queue.rs b/domains/client/consensus-relay-chain/src/import_queue.rs index 0b648dd5e8..e75b9ceec9 100644 --- a/domains/client/consensus-relay-chain/src/import_queue.rs +++ b/domains/client/consensus-relay-chain/src/import_queue.rs @@ -14,14 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -use sc_consensus::import_queue::{BasicQueue, Verifier as VerifierT}; -use sc_consensus::{BlockImport, BlockImportParams, SharedBlockImport}; -use sp_blockchain::Result as ClientResult; -use sp_consensus::error::Error as ConsensusError; -use sp_core::traits::SpawnEssentialNamed; +use sc_consensus::import_queue::Verifier as VerifierT; +use sc_consensus::BlockImportParams; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; use std::marker::PhantomData; -use substrate_prometheus_endpoint::Registry; /// A verifier that just checks the inherents. pub struct Verifier { @@ -52,22 +48,3 @@ where Ok(block_params) } } - -/// Start an import queue for a Cumulus collator that does not uses any special authoring logic. -#[allow(clippy::type_complexity)] -pub fn import_queue( - block_import: I, - spawner: &impl SpawnEssentialNamed, - registry: Option<&Registry>, -) -> ClientResult> -where - I: BlockImport + Send + Sync + 'static, -{ - Ok(BasicQueue::new( - Verifier::default(), - SharedBlockImport::new(block_import), - None, - spawner, - registry, - )) -} diff --git a/domains/client/consensus-relay-chain/src/lib.rs b/domains/client/consensus-relay-chain/src/lib.rs index ab6a8f10dc..fe28f65a49 100644 --- a/domains/client/consensus-relay-chain/src/lib.rs +++ b/domains/client/consensus-relay-chain/src/lib.rs @@ -35,4 +35,4 @@ mod import_queue; -pub use import_queue::{import_queue, Verifier}; +pub use import_queue::Verifier; diff --git a/domains/client/cross-domain-message-gossip/Cargo.toml b/domains/client/cross-domain-message-gossip/Cargo.toml index ab63d5c538..2138f6a89a 100644 --- a/domains/client/cross-domain-message-gossip/Cargo.toml +++ b/domains/client/cross-domain-message-gossip/Cargo.toml @@ -13,23 +13,23 @@ include = [ [dependencies] domain-block-preprocessor = { version = "0.1.0", path = "../../client/block-preprocessor" } -fp-account = { version = "1.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } +fp-account = { version = "1.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } futures = "0.3.29" parity-scale-codec = { version = "3.6.12", features = ["derive"] } parking_lot = "0.12.2" -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-gossip = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-gossip = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } thiserror = "1.0.63" tracing = "0.1.40" diff --git a/domains/client/domain-operator/Cargo.toml b/domains/client/domain-operator/Cargo.toml index cc195883ac..3dc533f810 100644 --- a/domains/client/domain-operator/Cargo.toml +++ b/domains/client/domain-operator/Cargo.toml @@ -12,31 +12,31 @@ domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtim futures = "0.3.29" futures-timer = "3.0.3" parking_lot = "0.12.2" -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-domains = { version = "0.1.0", path = "../../../crates/sc-domains" } -sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", path = "../../../crates/sp-domains-fraud-proof" } sp-domain-digests = { version = "0.1.0", path = "../../primitives/digests" } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-keystore = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-keystore = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", path = "../../primitives/messenger" } -sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../../../crates/sp-subspace-mmr" } -sp-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-trie = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-weights = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-trie = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-weights = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } tracing = "0.1.40" @@ -49,18 +49,18 @@ cross-domain-message-gossip = { path = "../../client/cross-domain-message-gossip domain-test-service = { version = "0.1.0", path = "../../test/service" } domain-test-primitives = { version = "0.1.0", path = "../../test/primitives" } evm-domain-test-runtime = { version = "0.1.0", path = "../../test/runtime/evm" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-domains = { version = "0.1.0", path = "../../../crates/pallet-domains" } pallet-domain-sudo = { version = "0.1.0", path = "../../pallets/domain-sudo" } pallet-messenger = { version = "0.1.0", path = "../../../domains/pallets/messenger" } -pallet-sudo = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-sudo = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-transporter = { version = "0.1.0", path = "../../../domains/pallets/transporter" } -sc-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../../../crates/subspace-core-primitives" } subspace-test-runtime = { version = "0.1.0", path = "../../../test/subspace-test-runtime" } subspace-test-service = { version = "0.1.0", path = "../../../test/subspace-test-service" } diff --git a/domains/client/domain-operator/src/domain_block_processor.rs b/domains/client/domain-operator/src/domain_block_processor.rs index 47453f9f15..994d35bc66 100644 --- a/domains/client/domain-operator/src/domain_block_processor.rs +++ b/domains/client/domain-operator/src/domain_block_processor.rs @@ -8,7 +8,7 @@ use domain_block_preprocessor::inherents::get_inherent_data; use domain_block_preprocessor::PreprocessResult; use sc_client_api::{AuxStore, BlockBackend, Finalizer, ProofProvider}; use sc_consensus::{ - BlockImportParams, ForkChoiceStrategy, ImportResult, SharedBlockImport, StateAction, + BlockImportParams, BoxBlockImport, ForkChoiceStrategy, ImportResult, StateAction, StorageChanges, }; use sc_transaction_pool_api::OffchainTransactionPoolFactory; @@ -62,7 +62,7 @@ where pub(crate) consensus_client: Arc, pub(crate) backend: Arc, pub(crate) domain_confirmation_depth: NumberFor, - pub(crate) block_import: SharedBlockImport, + pub(crate) block_import: Arc>, pub(crate) import_notification_sinks: DomainImportNotificationSinks, pub(crate) consensus_network_sync_oracle: Arc, } @@ -480,11 +480,7 @@ where *block_import_params.header.parent_hash(), ); - let import_result = (*self.block_import) - .write() - .await - .import_block(block_import_params) - .await?; + let import_result = self.block_import.import_block(block_import_params).await?; match import_result { ImportResult::Imported(..) => {} diff --git a/domains/client/domain-operator/src/lib.rs b/domains/client/domain-operator/src/lib.rs index 1d1b0a245e..af221cb3f6 100644 --- a/domains/client/domain-operator/src/lib.rs +++ b/domains/client/domain-operator/src/lib.rs @@ -84,7 +84,7 @@ pub use domain_worker::OpaqueBundleFor; use futures::channel::mpsc; use futures::Stream; use sc_client_api::{AuxStore, BlockImportNotification}; -use sc_consensus::SharedBlockImport; +use sc_consensus::BoxBlockImport; use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sc_utils::mpsc::TracingUnboundedSender; use sp_blockchain::HeaderBackend; @@ -175,7 +175,7 @@ pub struct OperatorParams< pub bundle_sender: Arc>, pub operator_streams: OperatorStreams, pub domain_confirmation_depth: NumberFor, - pub block_import: SharedBlockImport, + pub block_import: Arc>, pub skip_empty_bundle_production: bool, pub skip_out_of_order_slot: bool, } diff --git a/domains/client/domain-operator/src/tests.rs b/domains/client/domain-operator/src/tests.rs index ad3a23da2f..56f8d8f629 100644 --- a/domains/client/domain-operator/src/tests.rs +++ b/domains/client/domain-operator/src/tests.rs @@ -22,7 +22,6 @@ use futures::StreamExt; use pallet_domains::OperatorConfig; use pallet_messenger::ChainAllowlistUpdate; use sc_client_api::{Backend, BlockBackend, BlockchainEvents, HeaderBackend}; -use sc_consensus::SharedBlockImport; use sc_domains::generate_mmr_proof; use sc_service::{BasePath, Role}; use sc_transaction_pool::error::Error as PoolError; @@ -337,7 +336,7 @@ async fn test_processing_empty_consensus_block() { consensus_client: ferdie.client.clone(), backend: alice.backend.clone(), domain_confirmation_depth: 256u32, - block_import: SharedBlockImport::new(alice.client.clone()), + block_import: Arc::new(Box::new(alice.client.clone())), import_notification_sinks: Default::default(), consensus_network_sync_oracle: ferdie.sync_service.clone(), }; diff --git a/domains/client/eth-service/Cargo.toml b/domains/client/eth-service/Cargo.toml index cee7b1f2d9..570115dba1 100644 --- a/domains/client/eth-service/Cargo.toml +++ b/domains/client/eth-service/Cargo.toml @@ -15,28 +15,29 @@ include = [ clap = { version = "4.5.15", features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime" } domain-service = { version = "0.1.0", path = "../../service" } -fc-consensus = { version = "2.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -fc-db = { version = "2.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa", default-features = false } -fc-mapping-sync = { version = "2.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa", default-features = false } -fc-rpc = { version = "2.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa", default-features = false, features = ['rpc-binary-search-estimate'] } -fc-rpc-core = { version = "1.1.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -fc-storage = { version = "1.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -fp-rpc = { version = "3.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa", features = ['default'] } +fc-consensus = { version = "2.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +fc-db = { version = "2.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", default-features = false } +fc-mapping-sync = { version = "2.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", default-features = false } +fc-rpc = { version = "2.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", default-features = false, features = ['rpc-binary-search-estimate'] } +fc-rpc-core = { version = "1.1.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +fc-storage = { version = "1.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +fp-rpc = { version = "3.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", features = ['default'] } futures = "0.3.29" -jsonrpsee = { version = "0.23.2", features = ["server"] } -pallet-transaction-payment-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +jsonrpsee = { version = "0.24.5", features = ["server"] } +pallet-transaction-payment-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } parity-scale-codec = "3.6.12" -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -serde = { version = "1.0.206", features = ["derive"] } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-rpc-server = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +serde = { version = "1.0.110", features = ["derive"] } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } diff --git a/domains/client/eth-service/src/provider.rs b/domains/client/eth-service/src/provider.rs index 7a17ec5d95..f689d495bf 100644 --- a/domains/client/eth-service/src/provider.rs +++ b/domains/client/eth-service/src/provider.rs @@ -14,7 +14,8 @@ use fp_rpc::{ConvertTransaction, ConvertTransactionRuntimeApi, EthereumRuntimeRP use jsonrpsee::RpcModule; use parity_scale_codec::{Decode, Encode}; use sc_client_api::{AuxStore, Backend, BlockBackend, BlockchainEvents, StorageProvider}; -use sc_rpc::{RpcSubscriptionIdProvider, SubscriptionTaskExecutor}; +use sc_rpc::SubscriptionTaskExecutor; +use sc_rpc_server::SubscriptionIdProvider; use sc_service::BasePath; use sc_transaction_pool::ChainApi; use sc_transaction_pool_api::TransactionPool; @@ -152,7 +153,7 @@ where }) } - fn rpc_id(&self) -> Option> { + fn rpc_id(&self) -> Option> { Some(Box::new(fc_rpc::EthereumSubIdProvider)) } diff --git a/domains/client/relayer/Cargo.toml b/domains/client/relayer/Cargo.toml index 21693a221e..c3ff9b9092 100644 --- a/domains/client/relayer/Cargo.toml +++ b/domains/client/relayer/Cargo.toml @@ -16,16 +16,16 @@ async-channel = "1.9.0" cross-domain-message-gossip = { path = "../../client/cross-domain-message-gossip" } futures = "0.3.29" parity-scale-codec = { version = "3.6.12", features = ["derive"] } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-state-db = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-state-db = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } sp-messenger = { version = "0.1.0", path = "../../primitives/messenger" } -sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../../../crates/sp-subspace-mmr" } tracing = "0.1.40" diff --git a/domains/pallets/auto-id/Cargo.toml b/domains/pallets/auto-id/Cargo.toml index 928d75a744..ecc76c7abe 100644 --- a/domains/pallets/auto-id/Cargo.toml +++ b/domains/pallets/auto-id/Cargo.toml @@ -14,20 +14,20 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } sp-auto-id = { version = "0.1.0", default-features = false, path = "../../primitives/auto-id" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../../crates/subspace-runtime-primitives" } [dev-dependencies] pem = "3.0.4" ring = "0.17.8" -sp-io = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-io = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } x509-parser = { version = "0.16.0" } [features] diff --git a/domains/pallets/block-fees/Cargo.toml b/domains/pallets/block-fees/Cargo.toml index c03dbfdce1..558293b4f1 100644 --- a/domains/pallets/block-fees/Cargo.toml +++ b/domains/pallets/block-fees/Cargo.toml @@ -15,14 +15,14 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime", default-features = false } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } sp-block-fees = { version = "0.1.0", path = "../../primitives/block-fees", default-features = false } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/pallets/domain-id/Cargo.toml b/domains/pallets/domain-id/Cargo.toml index 4f06938ace..dc31110ccc 100644 --- a/domains/pallets/domain-id/Cargo.toml +++ b/domains/pallets/domain-id/Cargo.toml @@ -14,15 +14,15 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [dev-dependencies] -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-io = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-io = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/pallets/domain-sudo/Cargo.toml b/domains/pallets/domain-sudo/Cargo.toml index 1b19fbe7a0..3f54399915 100644 --- a/domains/pallets/domain-sudo/Cargo.toml +++ b/domains/pallets/domain-sudo/Cargo.toml @@ -14,11 +14,11 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domain-sudo = { version = "0.1.0", path = "../../primitives/domain-sudo", default-features = false } [features] diff --git a/domains/pallets/evm_nonce_tracker/Cargo.toml b/domains/pallets/evm_nonce_tracker/Cargo.toml index 1e3dec96f8..9299b6a461 100644 --- a/domains/pallets/evm_nonce_tracker/Cargo.toml +++ b/domains/pallets/evm_nonce_tracker/Cargo.toml @@ -14,11 +14,11 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/pallets/executive/Cargo.toml b/domains/pallets/executive/Cargo.toml index b07cf1a4f1..0eb028e311 100644 --- a/domains/pallets/executive/Cargo.toml +++ b/domains/pallets/executive/Cargo.toml @@ -13,23 +13,23 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-executive = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-executive = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } log = { version = "0.4.22", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } sp-executive = { version = "0.1.0", path = "../../primitives/executive", default-features = false } -sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-std = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-std = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } [dev-dependencies] -pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-version = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-version = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/pallets/executive/src/tests.rs b/domains/pallets/executive/src/tests.rs index 6f91b8d05c..41889f267a 100644 --- a/domains/pallets/executive/src/tests.rs +++ b/domains/pallets/executive/src/tests.rs @@ -25,8 +25,7 @@ fn test_set_code() { impl_version: 1, apis: Default::default(), transaction_version: 1, - state_version: 0, - extrinsic_state_version: 0, + system_version: 2, }; let read_runtime_version = ReadRuntimeVersion(version.encode()); diff --git a/domains/pallets/messenger/Cargo.toml b/domains/pallets/messenger/Cargo.toml index 51fa7b03a4..0ede1913c0 100644 --- a/domains/pallets/messenger/Cargo.toml +++ b/domains/pallets/messenger/Cargo.toml @@ -15,24 +15,24 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } log = { version = "0.4.22", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } -sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-trie = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-trie = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../../../crates/sp-subspace-mmr" } [dev-dependencies] domain-runtime-primitives = { path = "../../primitives/runtime" } -pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-transporter = { version = "0.1.0", path = "../transporter" } -sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/pallets/transporter/Cargo.toml b/domains/pallets/transporter/Cargo.toml index 88e9e88945..09c16d5c8c 100644 --- a/domains/pallets/transporter/Cargo.toml +++ b/domains/pallets/transporter/Cargo.toml @@ -16,20 +16,20 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } domain-runtime-primitives = { path = "../../primitives/runtime", default-features = false } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [dev-dependencies] -pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-messenger = { version = "0.1.0", path = "../messenger" } -sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/primitives/auto-id/Cargo.toml b/domains/primitives/auto-id/Cargo.toml index 37de1c1f50..3d82507f60 100644 --- a/domains/primitives/auto-id/Cargo.toml +++ b/domains/primitives/auto-id/Cargo.toml @@ -16,9 +16,9 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } x509-parser = { version = "0.16.0", features = ["verify"], optional = true } diff --git a/domains/primitives/block-fees/Cargo.toml b/domains/primitives/block-fees/Cargo.toml index e7e1db14f9..d800d5bfb8 100644 --- a/domains/primitives/block-fees/Cargo.toml +++ b/domains/primitives/block-fees/Cargo.toml @@ -16,8 +16,8 @@ include = [ async-trait = { version = "0.1.83", optional = true } codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../runtime" } -sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/primitives/digests/Cargo.toml b/domains/primitives/digests/Cargo.toml index 3d3b8ebe56..587e8cc2ba 100644 --- a/domains/primitives/digests/Cargo.toml +++ b/domains/primitives/digests/Cargo.toml @@ -15,7 +15,7 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/primitives/domain-sudo/Cargo.toml b/domains/primitives/domain-sudo/Cargo.toml index 71389f13af..c584746fac 100644 --- a/domains/primitives/domain-sudo/Cargo.toml +++ b/domains/primitives/domain-sudo/Cargo.toml @@ -16,8 +16,8 @@ include = [ [dependencies] async-trait = { version = "0.1.83", optional = true } codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/primitives/executive/Cargo.toml b/domains/primitives/executive/Cargo.toml index ee54d32721..7b3c1f2538 100644 --- a/domains/primitives/executive/Cargo.toml +++ b/domains/primitives/executive/Cargo.toml @@ -16,7 +16,7 @@ include = [ [dependencies] async-trait = { version = "0.1.83", optional = true } codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/primitives/messenger-host-functions/Cargo.toml b/domains/primitives/messenger-host-functions/Cargo.toml index 4cdf1556a1..1e2322a621 100644 --- a/domains/primitives/messenger-host-functions/Cargo.toml +++ b/domains/primitives/messenger-host-functions/Cargo.toml @@ -17,15 +17,15 @@ include = [ codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } domain-block-preprocessor = { version = "0.1.0", default-features = false, path = "../../../domains/client/block-preprocessor", optional = true } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false, optional = true } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false, optional = true } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } -sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/primitives/messenger/Cargo.toml b/domains/primitives/messenger/Cargo.toml index 33a3bb2f4b..d154fe8cf2 100644 --- a/domains/primitives/messenger/Cargo.toml +++ b/domains/primitives/messenger/Cargo.toml @@ -16,18 +16,18 @@ include = [ [dependencies] async-trait = { version = "0.1.83", optional = true } codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } hash-db = { version = "0.16.0", default-features = false } log = { version = "0.4.22", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.206", default-features = false, features = ["alloc", "derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +serde = { version = "1.0.110", default-features = false, features = ["alloc", "derive"] } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } -sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-trie = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-trie = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../../../crates/sp-subspace-mmr" } [features] diff --git a/domains/primitives/runtime/Cargo.toml b/domains/primitives/runtime/Cargo.toml index 2f715ae15f..f13523b654 100644 --- a/domains/primitives/runtime/Cargo.toml +++ b/domains/primitives/runtime/Cargo.toml @@ -12,20 +12,18 @@ description = "Common primitives of subspace domain runtime" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -# TODO: This dependency is only included because of https://github.com/polkadot-evm/frontier/pull/1426/files#r1648652020 -fixed-hash = { version = "0.8.0", default-features = false, features = ["rustc-hex"] } -fp-account = { version = "1.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +fp-account = { version = "1.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } parity-scale-codec = { version = "3.6.12", default-features = false, features = ["derive"] } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.206", default-features = false, features = ["alloc", "derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +serde = { version = "1.0.110", default-features = false, features = ["alloc", "derive"] } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives", default-features = false } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } -sp-weights = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-weights = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] default = ["std"] diff --git a/domains/runtime/auto-id/Cargo.toml b/domains/runtime/auto-id/Cargo.toml index 6ef1a2a396..110eb76d58 100644 --- a/domains/runtime/auto-id/Cargo.toml +++ b/domains/runtime/auto-id/Cargo.toml @@ -20,41 +20,41 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } domain-pallet-executive = { version = "0.1.0", path = "../../pallets/executive", default-features = false } domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime", default-features = false } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-auto-id = { version = "0.1.0", path = "../../pallets/auto-id", default-features = false } -pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-block-fees = { version = "0.1.0", path = "../../pallets/block-fees", default-features = false } pallet-domain-id = { version = "0.1.0", path = "../../pallets/domain-id", default-features = false } pallet-domain-sudo = { version = "0.1.0", path = "../../pallets/domain-sudo", default-features = false } pallet-messenger = { version = "0.1.0", path = "../../pallets/messenger", default-features = false } -pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false } -pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } sp-domain-sudo = { version = "0.1.0", path = "../../primitives/domain-sudo", default-features = false } -sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../primitives/messenger-host-functions" } -sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-storage = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-storage = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../../../crates/sp-subspace-mmr" } -sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives", default-features = false } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } @@ -62,7 +62,7 @@ subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subsp subspace-runtime-primitives = { version = "0.1.0", features = ["testing"], path = "../../../crates/subspace-runtime-primitives" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } [features] default = [ diff --git a/domains/runtime/auto-id/src/lib.rs b/domains/runtime/auto-id/src/lib.rs index a897940d0d..6286db4122 100644 --- a/domains/runtime/auto-id/src/lib.rs +++ b/domains/runtime/auto-id/src/lib.rs @@ -7,9 +7,9 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -#[cfg(not(feature = "std"))] extern crate alloc; +use alloc::borrow::Cow; #[cfg(not(feature = "std"))] use alloc::format; use codec::{Decode, Encode, MaxEncodedLen}; @@ -55,10 +55,7 @@ use sp_runtime::traits::{ use sp_runtime::transaction_validity::{ InvalidTransaction, TransactionSource, TransactionValidity, TransactionValidityError, }; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, ApplyExtrinsicResult, Digest, - ExtrinsicInclusionMode, -}; +use sp_runtime::{generic, impl_opaque_keys, ApplyExtrinsicResult, Digest, ExtrinsicInclusionMode}; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use sp_std::collections::btree_set::BTreeSet; use sp_std::marker::PhantomData; @@ -118,15 +115,14 @@ impl_opaque_keys! { #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("subspace-auto-id-domain"), - impl_name: create_runtime_str!("subspace-auto-id-domain"), + spec_name: Cow::Borrowed("subspace-auto-id-domain"), + impl_name: Cow::Borrowed("subspace-auto-id-domain"), authoring_version: 0, spec_version: 1, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, - state_version: 0, - extrinsic_state_version: 1, + system_version: 2, }; parameter_types! { @@ -987,7 +983,7 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { + ) -> Result, alloc::string::String> { use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch}; use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; diff --git a/domains/runtime/evm/Cargo.toml b/domains/runtime/evm/Cargo.toml index 3b6f38d832..50f5ad7eb0 100644 --- a/domains/runtime/evm/Cargo.toml +++ b/domains/runtime/evm/Cargo.toml @@ -20,51 +20,51 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } domain-pallet-executive = { version = "0.1.0", path = "../../pallets/executive", default-features = false } domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime", default-features = false } -fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -fp-rpc = { version = "3.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -fp-self-contained = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-base-fee = { version = "1.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } +fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +fp-rpc = { version = "3.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +fp-self-contained = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-base-fee = { version = "1.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } pallet-block-fees = { version = "0.1.0", path = "../../pallets/block-fees", default-features = false } pallet-domain-id = { version = "0.1.0", path = "../../pallets/domain-id", default-features = false } pallet-domain-sudo = { version = "0.1.0", path = "../../pallets/domain-sudo", default-features = false } -pallet-ethereum = { default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } +pallet-ethereum = { default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } pallet-evm-nonce-tracker = { version = "0.1.0", path = "../../pallets/evm_nonce_tracker", default-features = false } -pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } +pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } pallet-messenger = { version = "0.1.0", path = "../../pallets/messenger", default-features = false } -pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false } -pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } sp-domain-sudo = { version = "0.1.0", path = "../../primitives/domain-sudo", default-features = false } -sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../primitives/messenger-host-functions" } -sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-storage = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-storage = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../../../crates/sp-subspace-mmr" } -sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives", default-features = false } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } @@ -72,7 +72,7 @@ subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subsp subspace-runtime-primitives = { version = "0.1.0", features = ["testing"], path = "../../../crates/subspace-runtime-primitives" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } [features] default = [ diff --git a/domains/runtime/evm/src/lib.rs b/domains/runtime/evm/src/lib.rs index ee9d0726b5..46ac13d259 100644 --- a/domains/runtime/evm/src/lib.rs +++ b/domains/runtime/evm/src/lib.rs @@ -9,9 +9,9 @@ mod precompiles; #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -#[cfg(not(feature = "std"))] extern crate alloc; +use alloc::borrow::Cow; #[cfg(not(feature = "std"))] use alloc::format; use codec::{Decode, Encode, MaxEncodedLen}; @@ -70,7 +70,7 @@ use sp_runtime::transaction_validity::{ InvalidTransaction, TransactionSource, TransactionValidity, TransactionValidityError, }; use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, ApplyExtrinsicResult, ConsensusEngineId, Digest, + generic, impl_opaque_keys, ApplyExtrinsicResult, ConsensusEngineId, Digest, ExtrinsicInclusionMode, }; pub use sp_runtime::{MultiAddress, Perbill, Permill}; @@ -245,15 +245,14 @@ impl_opaque_keys! { #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("subspace-evm-domain"), - impl_name: create_runtime_str!("subspace-evm-domain"), + spec_name: Cow::Borrowed("subspace-evm-domain"), + impl_name: Cow::Borrowed("subspace-evm-domain"), authoring_version: 0, spec_version: 2, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, - state_version: 0, - extrinsic_state_version: 1, + system_version: 2, }; parameter_types! { @@ -1578,7 +1577,7 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { + ) -> Result, alloc::string::String> { use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch}; use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; diff --git a/domains/service/Cargo.toml b/domains/service/Cargo.toml index f43fe7cde8..7741db0a10 100644 --- a/domains/service/Cargo.toml +++ b/domains/service/Cargo.toml @@ -20,57 +20,56 @@ domain-client-consensus-relay-chain = { version = "0.1.0", path = "../client/con domain-client-message-relayer = { version = "0.1.0", path = "../client/relayer" } domain-client-operator = { version = "0.1.0", path = "../client/domain-operator" } domain-runtime-primitives = { version = "0.1.0", path = "../primitives/runtime" } -frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } futures = "0.3.29" -jsonrpsee = { version = "0.23.2", features = ["server"] } +jsonrpsee = { version = "0.24.5", features = ["server"] } log = "0.4.22" -pallet-transaction-payment-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-transaction-payment-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } parity-scale-codec = "3.6.12" -sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-domains = { version = "0.1.0", path = "../../crates/sc-domains" } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-informant = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-common = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-transactions = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-rpc-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-rpc-spec-v2 = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -serde = { version = "1.0.206", features = ["derive"] } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-informant = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-common = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-transactions = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-rpc-server = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +serde = { version = "1.0.110", features = ["derive"] } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../crates/sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", path = "../../crates/sp-domains-fraud-proof" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", path = "../../domains/primitives/messenger-host-functions" } -sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-offchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-session = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-offchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-session = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", path = "../../crates/sp-subspace-mmr" } -sp-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../../crates/subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", path = "../../crates/subspace-runtime-primitives" } -substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } tokio = "1.39.2" tracing = "0.1.40" [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +substrate-build-script-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [features] runtime-benchmarks = [ diff --git a/domains/service/src/config.rs b/domains/service/src/config.rs index 6f250d4443..81b088c83d 100644 --- a/domains/service/src/config.rs +++ b/domains/service/src/config.rs @@ -3,8 +3,10 @@ use sc_network::config::{ MultiaddrWithPeerId, NetworkBackendType, NetworkConfiguration, NodeKeyConfig, SetConfig, SyncMode, TransportConfig, DEFAULT_KADEMLIA_REPLICATION_FACTOR, }; +use sc_rpc_server::RpcEndpoint; use sc_service::config::{ - IpNetwork, KeystoreConfig, OffchainWorkerConfig, PrometheusConfig, RpcBatchRequestConfig, + ExecutorConfiguration, IpNetwork, KeystoreConfig, OffchainWorkerConfig, PrometheusConfig, + RpcBatchRequestConfig, RpcConfiguration, }; use sc_service::{ BasePath, BlocksPruning, Configuration, DatabaseSource, PruningMode, RpcMethods, @@ -108,8 +110,6 @@ pub struct SubstrateConfiguration { pub force_authoring: bool, /// Chain specification pub chain_spec: Box, - /// Configuration of the output format that the informant uses. - pub informant_output_format: sc_informant::OutputFormat, } impl From for Configuration { @@ -118,6 +118,41 @@ impl From for Configuration { + configuration.network.default_peers_set.out_peers; let client_version = format!("{}/{}", configuration.impl_name, configuration.impl_version); + let rpc_batch_config = if configuration.rpc_options.disable_batch_requests { + RpcBatchRequestConfig::Disabled + } else if let Some(l) = configuration.rpc_options.max_batch_request_len { + RpcBatchRequestConfig::Limit(l) + } else { + RpcBatchRequestConfig::Unlimited + }; + let rpc_addr = configuration.rpc_options.listen_on.map(|listen_addr| { + vec![RpcEndpoint { + batch_config: rpc_batch_config, + max_connections: configuration.rpc_options.max_connections, + listen_addr, + rpc_methods: configuration.rpc_options.methods, + rate_limit: configuration.rpc_options.rate_limit, + rate_limit_trust_proxy_headers: configuration + .rpc_options + .rate_limit_trust_proxy_headers, + rate_limit_whitelisted_ips: configuration + .rpc_options + .rate_limit_whitelisted_ips + .clone(), + max_payload_in_mb: RPC_DEFAULT_MAX_REQUEST_SIZE_MB, + max_payload_out_mb: RPC_DEFAULT_MAX_RESPONSE_SIZE_MB, + max_subscriptions_per_connection: configuration + .rpc_options + .max_subscriptions_per_connection, + max_buffer_capacity_per_connection: configuration + .rpc_options + .message_buffer_capacity_per_connection, + cors: configuration.rpc_options.cors.clone(), + retry_random_port: true, + is_optional: false, + }] + }); + Self { impl_name: configuration.impl_name, impl_version: configuration.impl_version, @@ -173,33 +208,36 @@ impl From for Configuration { trie_cache_maximum_size: Some(64 * 1024 * 1024), state_pruning: configuration.state_pruning, blocks_pruning: configuration.blocks_pruning, - wasm_method: Default::default(), + executor: ExecutorConfiguration { + wasm_method: Default::default(), + // Substrate's default + max_runtime_instances: 8, + default_heap_pages: None, + // Substrate's default + runtime_cache_size: 2, + }, wasm_runtime_overrides: None, - rpc_addr: configuration.rpc_options.listen_on, - rpc_methods: configuration.rpc_options.methods, - rpc_max_connections: configuration.rpc_options.max_connections, - rpc_cors: configuration.rpc_options.cors, - rpc_max_request_size: RPC_DEFAULT_MAX_REQUEST_SIZE_MB, - rpc_max_response_size: RPC_DEFAULT_MAX_RESPONSE_SIZE_MB, - rpc_id_provider: None, - rpc_max_subs_per_conn: configuration.rpc_options.max_subscriptions_per_connection, - // Doesn't matter since we have specified address above - rpc_port: 0, - rpc_message_buffer_capacity: configuration - .rpc_options - .message_buffer_capacity_per_connection, - rpc_batch_config: if configuration.rpc_options.disable_batch_requests { - RpcBatchRequestConfig::Disabled - } else if let Some(l) = configuration.rpc_options.max_batch_request_len { - RpcBatchRequestConfig::Limit(l) - } else { - RpcBatchRequestConfig::Unlimited + rpc: RpcConfiguration { + addr: rpc_addr, + methods: configuration.rpc_options.methods, + max_connections: configuration.rpc_options.max_connections, + cors: configuration.rpc_options.cors, + max_request_size: RPC_DEFAULT_MAX_REQUEST_SIZE_MB, + max_response_size: RPC_DEFAULT_MAX_RESPONSE_SIZE_MB, + id_provider: None, + max_subs_per_conn: configuration.rpc_options.max_subscriptions_per_connection, + // Doesn't matter since we have specified address above + port: 0, + message_buffer_capacity: configuration + .rpc_options + .message_buffer_capacity_per_connection, + batch_config: rpc_batch_config, + rate_limit: configuration.rpc_options.rate_limit, + rate_limit_whitelisted_ips: configuration.rpc_options.rate_limit_whitelisted_ips, + rate_limit_trust_proxy_headers: configuration + .rpc_options + .rate_limit_trust_proxy_headers, }, - rpc_rate_limit: configuration.rpc_options.rate_limit, - rpc_rate_limit_whitelisted_ips: configuration.rpc_options.rate_limit_whitelisted_ips, - rpc_rate_limit_trust_proxy_headers: configuration - .rpc_options - .rate_limit_trust_proxy_headers, prometheus_config: configuration .prometheus_listen_on .map(|prometheus_listen_on| { @@ -209,7 +247,6 @@ impl From for Configuration { ) }), telemetry_endpoints: configuration.telemetry_endpoints, - default_heap_pages: None, // Offchain worker is not used in Subspace offchain_worker: OffchainWorkerConfig { enabled: false, @@ -222,8 +259,6 @@ impl From for Configuration { tracing_receiver: Default::default(), chain_spec: configuration.chain_spec, // Substrate's default - max_runtime_instances: 8, - // Substrate's default announce_block: true, role: if configuration.operator { sc_service::Role::Authority @@ -231,9 +266,6 @@ impl From for Configuration { sc_service::Role::Full }, base_path: BasePath::new(configuration.base_path), - informant_output_format: configuration.informant_output_format, - // Substrate's default - runtime_cache_size: 2, } } } diff --git a/domains/service/src/domain.rs b/domains/service/src/domain.rs index 55c521dc66..9d26b5779e 100644 --- a/domains/service/src/domain.rs +++ b/domains/service/src/domain.rs @@ -13,10 +13,10 @@ use sc_client_api::{ AuxStore, BlockBackend, BlockImportNotification, BlockchainEvents, ExecutorProvider, ProofProvider, UsageProvider, }; -use sc_consensus::SharedBlockImport; +use sc_consensus::{BasicQueue, BoxBlockImport}; use sc_domains::{ExtensionsFactory, RuntimeExecutor}; -use sc_network::{NetworkPeers, NotificationMetrics}; -use sc_rpc_api::DenyUnsafe; +use sc_network::service::traits::NetworkService; +use sc_network::{NetworkPeers, NetworkWorker, NotificationMetrics}; use sc_service::{ BuildNetworkParams, Configuration as ServiceConfiguration, NetworkStarter, PartialComponents, SpawnTasksParams, TFullBackend, TaskManager, @@ -99,7 +99,7 @@ where /// Code executor. pub code_executor: Arc, /// Network service. - pub network_service: Arc::Hash>>, + pub network_service: Arc, /// Sync service. pub sync_service: Arc>, /// RPCHandlers to make RPC queries. @@ -135,7 +135,7 @@ fn new_partial( Option, Option, Arc, - SharedBlockImport, + BoxBlockImport, ), >, sc_service::Error, @@ -170,7 +170,7 @@ where }) .transpose()?; - let executor = sc_service::new_wasm_executor(config); + let executor = sc_service::new_wasm_executor(&config.executor); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts( config, @@ -216,25 +216,28 @@ where client.usage_info().chain.finalized_hash, )); - let block_import = SharedBlockImport::new(BlockImportProvider::block_import( - block_import_provider, - client.clone(), - )); - let import_queue = domain_client_consensus_relay_chain::import_queue( - block_import.clone(), + let import_queue = BasicQueue::new( + domain_client_consensus_relay_chain::Verifier::default(), + Box::new(block_import_provider.block_import(client.clone())), + None, &task_manager.spawn_essential_handle(), config.prometheus_registry(), - )?; + ); let params = PartialComponents { backend, - client, + client: client.clone(), import_queue, keystore_container, task_manager, transaction_pool, select_chain: (), - other: (telemetry, telemetry_worker_handle, executor, block_import), + other: ( + telemetry, + telemetry_worker_handle, + executor, + Box::new(block_import_provider.block_import(client)) as Box<_>, + ), }; Ok(params) @@ -366,43 +369,41 @@ where let transaction_pool = params.transaction_pool.clone(); let mut task_manager = params.task_manager; - let net_config = sc_network::config::FullNetworkConfiguration::new(&domain_config.network); + let net_config = sc_network::config::FullNetworkConfiguration::<_, _, NetworkWorker<_, _>>::new( + &domain_config.network, + domain_config + .prometheus_config + .as_ref() + .map(|cfg| cfg.registry.clone()), + ); - let ( - network_service, - system_rpc_tx, - tx_handler_controller, - network_starter, - sync_service, - _block_downloader, - ) = crate::build_network(BuildNetworkParams { - config: &domain_config, - net_config, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - spawn_handle: task_manager.spawn_handle(), - import_queue: params.import_queue, - // TODO: we might want to re-enable this some day. - block_announce_validator_builder: None, - warp_sync_params: None, - block_relay: None, - metrics: NotificationMetrics::new( - domain_config - .prometheus_config - .as_ref() - .map(|cfg| &cfg.registry), - ), - })?; + let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = + sc_service::build_network(BuildNetworkParams { + config: &domain_config, + net_config, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + spawn_handle: task_manager.spawn_handle(), + import_queue: params.import_queue, + // TODO: we might want to re-enable this some day. + block_announce_validator_builder: None, + warp_sync_config: None, + block_relay: None, + metrics: NotificationMetrics::new( + domain_config + .prometheus_config + .as_ref() + .map(|cfg| &cfg.registry), + ), + })?; let is_authority = domain_config.role.is_authority(); - domain_config.rpc_id_provider = provider.rpc_id(); + domain_config.rpc.id_provider = provider.rpc_id(); let rpc_builder = { let deps = crate::rpc::FullDeps { client: client.clone(), pool: transaction_pool.clone(), graph: transaction_pool.pool().clone(), - chain_spec: domain_config.chain_spec.cloned_box(), - deny_unsafe: DenyUnsafe::Yes, network: network_service.clone(), sync: sync_service.clone(), is_authority, @@ -424,7 +425,7 @@ where let spawn_essential = task_manager.spawn_essential_handle(); let rpc_deps = provider.deps(deps)?; - Box::new(move |_, subscription_task_executor| { + Box::new(move |subscription_task_executor| { let spawn_essential = spawn_essential.clone(); provider .rpc_builder( @@ -479,7 +480,7 @@ where bundle_sender: Arc::new(bundle_sender), operator_streams, domain_confirmation_depth, - block_import, + block_import: Arc::new(block_import), skip_empty_bundle_production, skip_out_of_order_slot, }, diff --git a/domains/service/src/lib.rs b/domains/service/src/lib.rs index bb5038c91a..4b90ff7324 100644 --- a/domains/service/src/lib.rs +++ b/domains/service/src/lib.rs @@ -6,349 +6,10 @@ pub mod providers; pub mod rpc; pub use self::domain::{new_full, DomainOperator, DomainParams, FullPool, NewFull}; -use futures::channel::oneshot; -use futures::{FutureExt, StreamExt}; -use sc_client_api::{BlockBackend, BlockchainEvents, HeaderBackend, ProofProvider}; -use sc_consensus::ImportQueue; use sc_domains::RuntimeExecutor; -use sc_network::config::Roles; -use sc_network::{NetworkService, NetworkWorker}; -use sc_network_sync::block_relay_protocol::BlockDownloader; -use sc_network_sync::block_request_handler::BlockRequestHandler; -use sc_network_sync::engine::SyncingEngine; -use sc_network_sync::service::network::NetworkServiceProvider; -use sc_network_sync::state_request_handler::StateRequestHandler; -use sc_network_sync::SyncingService; -use sc_service::config::SyncMode; -use sc_service::{ - build_system_rpc_future, BuildNetworkParams, NetworkStarter, TFullClient, - TransactionPoolAdapter, -}; -use sc_transaction_pool_api::MaintainedTransactionPool; -use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedSender}; -use sp_api::ProvideRuntimeApi; -use sp_blockchain::HeaderMetadata; -use sp_consensus::block_validation::{Chain, DefaultBlockAnnounceValidator}; -use sp_runtime::traits::{Block as BlockT, BlockIdTo, Zero}; -use std::sync::Arc; +use sc_service::TFullClient; /// Domain full client. pub type FullClient = TFullClient; pub type FullBackend = sc_service::TFullBackend; - -/// Build the network service, the network status sinks and an RPC sender. -/// -/// Port from `sc_service::build_network` mostly the same with block sync disabled. -// TODO: Struct for returned value -#[allow(clippy::type_complexity)] -pub fn build_network( - params: BuildNetworkParams, TExPool, TImpQu, TCl>, -) -> Result< - ( - Arc>, - TracingUnboundedSender>, - sc_network_transactions::TransactionsHandlerController, - NetworkStarter, - Arc>, - Arc>, - ), - sc_service::Error, -> -where - TBl: BlockT, - TCl: ProvideRuntimeApi - + HeaderMetadata - + Chain - + BlockBackend - + BlockIdTo - + ProofProvider - + HeaderBackend - + BlockchainEvents - + 'static, - TExPool: MaintainedTransactionPool + 'static, - TImpQu: ImportQueue + 'static, -{ - let BuildNetworkParams { - config, - mut net_config, - client, - transaction_pool, - spawn_handle, - import_queue, - block_announce_validator_builder: _, - warp_sync_params: _, - block_relay, - metrics, - } = params; - - if client.requires_full_sync() { - match config.network.sync_mode { - SyncMode::LightState { .. } => { - return Err("Fast sync doesn't work for archive nodes".into()); - } - SyncMode::Warp => return Err("Warp sync doesn't work for archive nodes".into()), - SyncMode::Full => {} - } - } - - let protocol_id = config.protocol_id(); - let genesis_hash = client - .hash(Zero::zero()) - .ok() - .flatten() - .expect("Genesis block exists; qed"); - - let (chain_sync_network_provider, chain_sync_network_handle) = NetworkServiceProvider::new(); - let (mut block_server, block_downloader, block_request_protocol_config) = match block_relay { - Some(params) => ( - params.server, - params.downloader, - params.request_response_config, - ), - None => { - // Custom protocol was not specified, use the default block handler. - let params = BlockRequestHandler::new::>( - chain_sync_network_handle.clone(), - &protocol_id, - config.chain_spec.fork_id(), - client.clone(), - config.network.default_peers_set.in_peers as usize - + config.network.default_peers_set.out_peers as usize, - ); - ( - params.server, - params.downloader, - params.request_response_config, - ) - } - }; - spawn_handle.spawn("block-request-handler", Some("networking"), async move { - block_server.run().await; - }); - - // crate transactions protocol and add it to the list of supported protocols of `network_params` - let peer_store_handle = net_config.peer_store_handle(); - let (transactions_handler_proto, transactions_config) = - sc_network_transactions::TransactionsHandlerPrototype::new::< - _, - _, - NetworkWorker, - >( - protocol_id.clone(), - genesis_hash, - config.chain_spec.fork_id(), - metrics.clone(), - Arc::clone(&peer_store_handle), - ); - net_config.add_notification_protocol(transactions_config); - - // Start task for `PeerStore` - let peer_store = net_config.take_peer_store(); - spawn_handle.spawn("peer-store", Some("networking"), peer_store.run()); - - let state_request_protocol_config = { - // Allow both outgoing and incoming requests. - let (handler, protocol_config) = StateRequestHandler::new::>( - &protocol_id, - config.chain_spec.fork_id(), - client.clone(), - config.network.default_peers_set_num_full as usize, - ); - spawn_handle.spawn("state-request-handler", Some("networking"), handler.run()); - protocol_config - }; - - net_config.add_request_response_protocol(block_request_protocol_config); - net_config.add_request_response_protocol(state_request_protocol_config.clone()); - - let (engine, sync_service, block_announce_config) = SyncingEngine::new( - Roles::from(&config.role), - client.clone(), - config - .prometheus_config - .as_ref() - .map(|config| config.registry.clone()) - .as_ref(), - metrics.clone(), - &net_config, - protocol_id.clone(), - &config.chain_spec.fork_id().map(ToOwned::to_owned), - Box::new(DefaultBlockAnnounceValidator), - None, - chain_sync_network_handle, - import_queue.service(), - block_downloader.clone(), - state_request_protocol_config.name.clone(), - None, - peer_store_handle, - // set to be force_synced always for domains since they relay on Consensus chain to derive and import domain blocks. - // If not set, each domain node will wait to be fully synced and as a result will not propagate the transactions over network. - // It would have been ideal to use `Consensus` chain sync service to respond to `is_major_sync` requests but this - // would require upstream changes and with some refactoring. This is not worth the effort at the moment since - // we are planning to enable domain's block request and state sync mechanism in the near future. - // Until such change has been made, domain's sync service needs to be in force_synced state. - true, - )?; - let sync_service_import_queue = sync_service.clone(); - let sync_service = Arc::new(sync_service); - - let network_params = sc_network::config::Params:: { - role: config.role.clone(), - executor: { - let spawn_handle = Clone::clone(&spawn_handle); - Box::new(move |fut| { - spawn_handle.spawn("libp2p-node", Some("networking"), fut); - }) - }, - network_config: net_config, - genesis_hash, - protocol_id, - fork_id: config.chain_spec.fork_id().map(ToOwned::to_owned), - metrics_registry: config - .prometheus_config - .as_ref() - .map(|config| config.registry.clone()), - block_announce_config, - bitswap_config: None, - notification_metrics: metrics, - }; - - let has_bootnodes = !network_params - .network_config - .network_config - .boot_nodes - .is_empty(); - let network_mut = sc_network::NetworkWorker::new(network_params)?; - let network = network_mut.service().clone(); - - let (tx_handler, tx_handler_controller) = transactions_handler_proto.build( - network.clone(), - sync_service.clone(), - Arc::new(TransactionPoolAdapter::new( - transaction_pool, - client.clone(), - )), - config - .prometheus_config - .as_ref() - .map(|config| &config.registry), - )?; - - spawn_handle.spawn( - "network-transactions-handler", - Some("networking"), - tx_handler.run(), - ); - spawn_handle.spawn_blocking( - "chain-sync-network-service-provider", - Some("networking"), - chain_sync_network_provider.run(network.clone()), - ); - spawn_handle.spawn( - "import-queue", - None, - import_queue.run(Box::new(sync_service_import_queue)), - ); - spawn_handle.spawn_blocking("syncing", None, engine.run()); - - let (system_rpc_tx, system_rpc_rx) = tracing_unbounded("mpsc_system_rpc", 10_000); - spawn_handle.spawn( - "system-rpc-handler", - Some("networking"), - build_system_rpc_future::<_, _, TBl::Hash>( - config.role.clone(), - network_mut.service().clone(), - sync_service.clone(), - client.clone(), - system_rpc_rx, - has_bootnodes, - ), - ); - - let future = build_network_future(network_mut, client, sync_service.clone()); - - // TODO: Normally, one is supposed to pass a list of notifications protocols supported by the - // node through the `NetworkConfiguration` struct. But because this function doesn't know in - // advance which components, such as GrandPa or Polkadot, will be plugged on top of the - // service, it is unfortunately not possible to do so without some deep refactoring. To bypass - // this problem, the `NetworkService` provides a `register_notifications_protocol` method that - // can be called even after the network has been initialized. However, we want to avoid the - // situation where `register_notifications_protocol` is called *after* the network actually - // connects to other peers. For this reason, we delay the process of the network future until - // the user calls `NetworkStarter::start_network`. - // - // This entire hack should eventually be removed in favour of passing the list of protocols - // through the configuration. - // - // See also https://github.com/paritytech/substrate/issues/6827 - let (network_start_tx, network_start_rx) = oneshot::channel(); - - // The network worker is responsible for gathering all network messages and processing - // them. This is quite a heavy task, and at the time of the writing of this comment it - // frequently happens that this future takes several seconds or in some situations - // even more than a minute until it has processed its entire queue. This is clearly an - // issue, and ideally we would like to fix the network future to take as little time as - // possible, but we also take the extra harm-prevention measure to execute the networking - // future using `spawn_blocking`. - spawn_handle.spawn_blocking("network-worker", Some("networking"), async move { - if network_start_rx.await.is_err() { - log::warn!( - "The NetworkStart returned as part of `build_network` has been silently dropped" - ); - // This `return` might seem unnecessary, but we don't want to make it look like - // everything is working as normal even though the user is clearly misusing the API. - return; - } - - future.await - }); - - Ok(( - network, - system_rpc_tx, - tx_handler_controller, - NetworkStarter::new(network_start_tx), - sync_service, - block_downloader, - )) -} - -/// Builds a future that continuously polls the network. -async fn build_network_future< - B: BlockT, - C: BlockchainEvents - + HeaderBackend - + BlockBackend - + HeaderMetadata - + ProofProvider - + Send - + Sync - + 'static, - H: sc_network_common::ExHashT, ->( - network: NetworkWorker, - client: Arc, - sync_service: Arc>, -) { - // Stream of finalized blocks reported by the client. - let mut finality_notification_stream = client.finality_notification_stream().fuse(); - - let network_run = network.run().fuse(); - futures::pin_mut!(network_run); - - loop { - futures::select! { - // List of blocks that the client has finalized. - notification = finality_notification_stream.select_next_some() => { - sync_service.on_block_finalized(notification.hash, notification.header); - } - - // Drive the network. Shut down the network future if `NetworkWorker` has terminated. - _ = network_run => { - tracing::debug!("`NetworkWorker` has terminated, shutting down the network future."); - return - } - } - } -} diff --git a/domains/service/src/providers.rs b/domains/service/src/providers.rs index 0e21928f54..7333460c8c 100644 --- a/domains/service/src/providers.rs +++ b/domains/service/src/providers.rs @@ -5,7 +5,8 @@ use jsonrpsee::RpcModule; use parity_scale_codec::{Decode, Encode}; use sc_client_api::{AuxStore, Backend, BlockBackend, StorageProvider}; use sc_consensus::BlockImport; -use sc_rpc::{RpcSubscriptionIdProvider, SubscriptionTaskExecutor}; +use sc_rpc::SubscriptionTaskExecutor; +use sc_rpc_server::SubscriptionIdProvider; use sc_transaction_pool::ChainApi; use sc_transaction_pool_api::TransactionPool; use serde::de::DeserializeOwned; @@ -62,7 +63,7 @@ where full_deps: FullDeps, ) -> Result; - fn rpc_id(&self) -> Option>; + fn rpc_id(&self) -> Option>; fn rpc_builder( &self, @@ -105,7 +106,7 @@ where Ok(full_deps) } - fn rpc_id(&self) -> Option> { + fn rpc_id(&self) -> Option> { None } diff --git a/domains/service/src/rpc.rs b/domains/service/src/rpc.rs index e1d80295db..55fd340578 100644 --- a/domains/service/src/rpc.rs +++ b/domains/service/src/rpc.rs @@ -10,10 +10,8 @@ use domain_runtime_primitives::{Balance, Nonce}; use jsonrpsee::RpcModule; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use sc_client_api::{AuxStore, BlockBackend}; -use sc_network::NetworkService; +use sc_network::service::traits::NetworkService; use sc_network_sync::SyncingService; -use sc_rpc::DenyUnsafe; -use sc_rpc_spec_v2::chain_spec::{ChainSpec, ChainSpecApiServer}; use sc_service::{DatabaseSource, SpawnTaskHandle}; use sc_transaction_pool::{ChainApi, Pool}; use sc_transaction_pool_api::TransactionPool; @@ -38,12 +36,8 @@ pub struct FullDeps { pub pool: Arc, /// Graph pool instance. pub graph: Arc>, - /// A copy of the chain spec. - pub chain_spec: Box, - /// Whether to deny unsafe calls - pub deny_unsafe: DenyUnsafe, /// Network service - pub network: Arc>, + pub network: Arc, /// Chain syncing service pub sync: Arc>, /// Is node running as authority. @@ -67,8 +61,6 @@ impl Clone backend: self.backend.clone(), pool: self.pool.clone(), graph: self.graph.clone(), - chain_spec: self.chain_spec.cloned_box(), - deny_unsafe: self.deny_unsafe, network: self.network.clone(), sync: self.sync.clone(), is_authority: self.is_authority, @@ -102,20 +94,9 @@ where AccountId: DeserializeOwned + Encode + Debug + Decode + Display + Clone + Sync + Send + 'static, { let mut module = RpcModule::new(()); - let FullDeps { - client, - pool, - chain_spec, - deny_unsafe, - .. - } = deps; + let FullDeps { client, pool, .. } = deps; - let chain_name = chain_spec.name().to_string(); - let genesis_hash = client.info().genesis_hash; - let properties = chain_spec.properties(); - module.merge(ChainSpec::new(chain_name, genesis_hash, properties).into_rpc())?; - - module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; + module.merge(System::new(client.clone(), pool).into_rpc())?; module.merge(TransactionPayment::new(client).into_rpc())?; Ok(module) diff --git a/domains/test/primitives/Cargo.toml b/domains/test/primitives/Cargo.toml index d272c1c45f..56923d4674 100644 --- a/domains/test/primitives/Cargo.toml +++ b/domains/test/primitives/Cargo.toml @@ -13,7 +13,7 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } diff --git a/domains/test/runtime/auto-id/Cargo.toml b/domains/test/runtime/auto-id/Cargo.toml index e897004794..30f7721119 100644 --- a/domains/test/runtime/auto-id/Cargo.toml +++ b/domains/test/runtime/auto-id/Cargo.toml @@ -21,40 +21,40 @@ codec = { package = "parity-scale-codec", version = "3.6.12", default-features = domain-pallet-executive = { version = "0.1.0", path = "../../../pallets/executive", default-features = false } domain-runtime-primitives = { version = "0.1.0", path = "../../../primitives/runtime", default-features = false } domain-test-primitives = { version = "0.1.0", path = "../../primitives", default-features = false } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-benchmarking = { default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-auto-id = { version = "0.1.0", path = "../../../pallets/auto-id", default-features = false } -pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-block-fees = { version = "0.1.0", path = "../../../pallets/block-fees", default-features = false } pallet-domain-id = { version = "0.1.0", path = "../../../pallets/domain-id", default-features = false } pallet-domain-sudo = { version = "0.1.0", path = "../../../pallets/domain-sudo", default-features = false } pallet-messenger = { version = "0.1.0", path = "../../../pallets/messenger", default-features = false } -pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-transporter = { version = "0.1.0", path = "../../../pallets/transporter", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../../../crates/sp-domains", default-features = false } sp-domain-sudo = { version = "0.1.0", path = "../../../primitives/domain-sudo", default-features = false } -sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../../primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../../primitives/messenger-host-functions" } -sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-storage = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-storage = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../../../../crates/sp-subspace-mmr" } -sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../../../../crates/subspace-core-primitives", default-features = false } subspace-runtime-primitives = { version = "0.1.0", path = "../../../../crates/subspace-runtime-primitives", default-features = false } @@ -62,7 +62,7 @@ subspace-runtime-primitives = { version = "0.1.0", path = "../../../../crates/su subspace-runtime-primitives = { version = "0.1.0", features = ["testing"], path = "../../../../crates/subspace-runtime-primitives" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } [features] default = [ diff --git a/domains/test/runtime/auto-id/src/lib.rs b/domains/test/runtime/auto-id/src/lib.rs index 7fd42e70db..e05100947b 100644 --- a/domains/test/runtime/auto-id/src/lib.rs +++ b/domains/test/runtime/auto-id/src/lib.rs @@ -7,9 +7,9 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -#[cfg(not(feature = "std"))] extern crate alloc; +use alloc::borrow::Cow; #[cfg(not(feature = "std"))] use alloc::format; use codec::{Decode, Encode, MaxEncodedLen}; @@ -55,10 +55,7 @@ use sp_runtime::traits::{ use sp_runtime::transaction_validity::{ InvalidTransaction, TransactionSource, TransactionValidity, TransactionValidityError, }; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, ApplyExtrinsicResult, Digest, - ExtrinsicInclusionMode, -}; +use sp_runtime::{generic, impl_opaque_keys, ApplyExtrinsicResult, Digest, ExtrinsicInclusionMode}; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use sp_std::collections::btree_set::BTreeSet; use sp_std::marker::PhantomData; @@ -118,15 +115,14 @@ impl_opaque_keys! { #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("subspace-auto-id-domain"), - impl_name: create_runtime_str!("subspace-auto-id-domain"), + spec_name: Cow::Borrowed("subspace-auto-id-domain"), + impl_name: Cow::Borrowed("subspace-auto-id-domain"), authoring_version: 0, spec_version: 1, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, - state_version: 0, - extrinsic_state_version: 1, + system_version: 2, }; parameter_types! { @@ -992,7 +988,7 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { + ) -> Result, alloc::string::String> { use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch}; use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; diff --git a/domains/test/runtime/evm/Cargo.toml b/domains/test/runtime/evm/Cargo.toml index 52bd81c3a3..73ef7f91e8 100644 --- a/domains/test/runtime/evm/Cargo.toml +++ b/domains/test/runtime/evm/Cargo.toml @@ -21,52 +21,52 @@ codec = { package = "parity-scale-codec", version = "3.6.12", default-features = domain-pallet-executive = { version = "0.1.0", path = "../../../pallets/executive", default-features = false } domain-test-primitives = { version = "0.1.0", path = "../../primitives", default-features = false } domain-runtime-primitives = { version = "0.1.0", path = "../../../primitives/runtime", default-features = false } -fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -fp-rpc = { version = "3.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -fp-self-contained = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-base-fee = { version = "1.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } +fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +fp-rpc = { version = "3.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +fp-self-contained = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-base-fee = { version = "1.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } pallet-block-fees = { version = "0.1.0", path = "../../../pallets/block-fees", default-features = false } pallet-domain-id = { version = "0.1.0", path = "../../../pallets/domain-id", default-features = false } pallet-domain-sudo = { version = "0.1.0", path = "../../../pallets/domain-sudo", default-features = false } -pallet-ethereum = { default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } +pallet-ethereum = { default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } pallet-evm-nonce-tracker = { version = "0.1.0", path = "../../../pallets/evm_nonce_tracker", default-features = false } -pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } +pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } pallet-messenger = { version = "0.1.0", path = "../../../pallets/messenger", default-features = false } -pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-transporter = { version = "0.1.0", path = "../../../pallets/transporter", default-features = false } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../../../crates/sp-domains", default-features = false } sp-domain-sudo = { version = "0.1.0", path = "../../../primitives/domain-sudo", default-features = false } -sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../../primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../../primitives/messenger-host-functions" } -sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../../../../crates/sp-subspace-mmr" } -sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", path = "../../../../crates/subspace-core-primitives", default-features = false } subspace-runtime-primitives = { version = "0.1.0", path = "../../../../crates/subspace-runtime-primitives", default-features = false } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } [features] default = [ diff --git a/domains/test/runtime/evm/src/lib.rs b/domains/test/runtime/evm/src/lib.rs index 232a9d1714..6ed15bb6d9 100644 --- a/domains/test/runtime/evm/src/lib.rs +++ b/domains/test/runtime/evm/src/lib.rs @@ -9,9 +9,9 @@ mod precompiles; #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -#[cfg(not(feature = "std"))] extern crate alloc; +use alloc::borrow::Cow; #[cfg(not(feature = "std"))] use alloc::format; use codec::{Decode, Encode, MaxEncodedLen}; @@ -70,7 +70,7 @@ use sp_runtime::transaction_validity::{ InvalidTransaction, TransactionSource, TransactionValidity, TransactionValidityError, }; use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, ApplyExtrinsicResult, ConsensusEngineId, Digest, + generic, impl_opaque_keys, ApplyExtrinsicResult, ConsensusEngineId, Digest, ExtrinsicInclusionMode, }; pub use sp_runtime::{MultiAddress, Perbill, Permill}; @@ -244,15 +244,14 @@ impl_opaque_keys! { #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("subspace-evm-domain"), - impl_name: create_runtime_str!("subspace-evm-domain"), + spec_name: Cow::Borrowed("subspace-evm-domain"), + impl_name: Cow::Borrowed("subspace-evm-domain"), authoring_version: 0, spec_version: 1, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, - state_version: 0, - extrinsic_state_version: 1, + system_version: 2, }; parameter_types! { diff --git a/domains/test/service/Cargo.toml b/domains/test/service/Cargo.toml index a303359500..11d90d77b5 100644 --- a/domains/test/service/Cargo.toml +++ b/domains/test/service/Cargo.toml @@ -19,39 +19,39 @@ domain-service = { version = "0.1.0", path = "../../service" } domain-test-primitives = { version = "0.1.0", path = "../primitives" } domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime", default-features = false } evm-domain-test-runtime = { version = "0.1.0", path = "../runtime/evm" } -fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } -fp-rpc = { version = "3.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa", features = ['default'] } -frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } +fp-rpc = { version = "3.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", features = ['default'] } +frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } rand = "0.8.5" -pallet-transaction-payment = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-transaction-payment = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-domains = { version = "0.1.0", path = "../../../crates/sc-domains" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -serde = { version = "1.0.206", features = ["derive"] } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-arithmetic = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +serde = { version = "1.0.110", features = ["derive"] } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-arithmetic = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", path = "../../../crates/sp-consensus-subspace" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } -sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", path = "../../../domains/primitives/messenger" } -sp-offchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-session = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-offchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-session = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } subspace-test-client = { version = "0.1.0", path = "../../../test/subspace-test-client" } subspace-test-service = { version = "0.1.0", path = "../../../test/subspace-test-service" } -substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -substrate-test-client = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +substrate-test-client = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } tokio = { version = "1.39.2", features = ["macros"] } tracing = "0.1.40" diff --git a/domains/test/service/src/domain.rs b/domains/test/service/src/domain.rs index 515ea3695b..3b27a55ac3 100644 --- a/domains/test/service/src/domain.rs +++ b/domains/test/service/src/domain.rs @@ -18,7 +18,8 @@ use frame_system::pallet_prelude::BlockNumberFor; use pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi; use sc_client_api::HeaderBackend; use sc_domains::RuntimeExecutor; -use sc_network::{NetworkService, NetworkStateInfo}; +use sc_network::service::traits::NetworkService; +use sc_network::NetworkStateInfo; use sc_network_sync::SyncingService; use sc_service::config::MultiaddrWithPeerId; use sc_service::{BasePath, Role, RpcHandlers, TFullBackend, TaskManager}; @@ -86,7 +87,7 @@ where /// Code executor. pub code_executor: Arc, /// Network service. - pub network_service: Arc>, + pub network_service: Arc, /// Sync service. pub sync_service: Arc>, /// The `MultiaddrWithPeerId` to this node. This is useful if you want to pass it as "boot node" @@ -153,7 +154,7 @@ where key_seed, domain_nodes, domain_nodes_exclusive, - role.clone(), + role, BasePath::new(base_path.path().join(format!("domain-{domain_id:?}"))), Box::new(chain_spec) as Box<_>, ) diff --git a/domains/test/service/src/lib.rs b/domains/test/service/src/lib.rs index b17b64c2da..749f45e826 100644 --- a/domains/test/service/src/lib.rs +++ b/domains/test/service/src/lib.rs @@ -29,9 +29,9 @@ pub use keyring::Keyring as EcdsaKeyring; use sc_network::config::{NonReservedPeerMode, TransportConfig}; use sc_network::multiaddr; use sc_service::config::{ - DatabaseSource, KeystoreConfig, MultiaddrWithPeerId, NetworkConfiguration, - OffchainWorkerConfig, PruningMode, RpcBatchRequestConfig, WasmExecutionMethod, - WasmtimeInstantiationStrategy, + DatabaseSource, ExecutorConfiguration, KeystoreConfig, MultiaddrWithPeerId, + NetworkConfiguration, OffchainWorkerConfig, PruningMode, RpcBatchRequestConfig, + RpcConfiguration, WasmExecutionMethod, WasmtimeInstantiationStrategy, }; use sc_service::{ BasePath, BlocksPruning, ChainSpec, Configuration as ServiceConfiguration, @@ -121,26 +121,32 @@ pub fn node_config( state_pruning: Some(PruningMode::ArchiveAll), blocks_pruning: BlocksPruning::KeepAll, chain_spec, - wasm_method: WasmExecutionMethod::Compiled { - instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite, + executor: ExecutorConfiguration { + wasm_method: WasmExecutionMethod::Compiled { + instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite, + }, + max_runtime_instances: 8, + default_heap_pages: None, + runtime_cache_size: 2, + }, + rpc: RpcConfiguration { + addr: None, + max_request_size: 0, + max_response_size: 0, + id_provider: None, + max_subs_per_conn: 0, + port: 0, + message_buffer_capacity: 0, + batch_config: RpcBatchRequestConfig::Disabled, + max_connections: 0, + cors: None, + methods: Default::default(), + rate_limit: None, + rate_limit_whitelisted_ips: vec![], + rate_limit_trust_proxy_headers: false, }, - rpc_addr: None, - rpc_max_request_size: 0, - rpc_max_response_size: 0, - rpc_id_provider: None, - rpc_max_subs_per_conn: 0, - rpc_port: 0, - rpc_message_buffer_capacity: 0, - rpc_batch_config: RpcBatchRequestConfig::Disabled, - rpc_max_connections: 0, - rpc_cors: None, - rpc_methods: Default::default(), - rpc_rate_limit: None, - rpc_rate_limit_whitelisted_ips: vec![], - rpc_rate_limit_trust_proxy_headers: false, prometheus_config: None, telemetry_endpoints: None, - default_heap_pages: None, offchain_worker: OffchainWorkerConfig { enabled: true, indexing_enabled: false, @@ -150,13 +156,10 @@ pub fn node_config( dev_key_seed: Some(key_seed), tracing_targets: None, tracing_receiver: Default::default(), - max_runtime_instances: 8, announce_block: true, data_path: base_path.path().into(), base_path, - informant_output_format: Default::default(), wasm_runtime_overrides: None, - runtime_cache_size: 2, }) } diff --git a/test/subspace-test-client/Cargo.toml b/test/subspace-test-client/Cargo.toml index 91ffcdd574..733fdd1cf2 100644 --- a/test/subspace-test-client/Cargo.toml +++ b/test/subspace-test-client/Cargo.toml @@ -19,19 +19,19 @@ auto-id-domain-test-runtime = { version = "0.1.0", path = "../../domains/test/ru codec = { package = "parity-scale-codec", version = "3.6.12", features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } evm-domain-test-runtime = { version = "0.1.0", path = "../../domains/test/runtime/evm" } -fp-evm = { version = "3.0.0-dev", git = "https://github.com/polkadot-evm/frontier", rev = "2e219e17a526125da003e64ef22ec037917083fa" } +fp-evm = { version = "3.0.0-dev", git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" } futures = "0.3.29" schnorrkel = "0.11.4" -sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-consensus-subspace = { version = "0.1.0", path = "../../crates/sc-consensus-subspace" } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -serde_json = "1.0.124" -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +serde_json = "1.0.128" +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", path = "../../crates/sp-consensus-subspace" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../crates/sp-domains" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-archiving = { path = "../../crates/subspace-archiving" } subspace-core-primitives = { path = "../../crates/subspace-core-primitives" } subspace-erasure-coding = { path = "../../crates/subspace-erasure-coding" } @@ -41,8 +41,3 @@ subspace-runtime-primitives = { path = "../../crates/subspace-runtime-primitives subspace-service = { path = "../../crates/subspace-service" } subspace-test-runtime = { version = "0.1.0", path = "../subspace-test-runtime" } zeroize = "1.8.1" - -[features] -do-not-enforce-cost-of-storage = [ - "subspace-test-runtime/do-not-enforce-cost-of-storage", -] diff --git a/test/subspace-test-client/src/chain_spec.rs b/test/subspace-test-client/src/chain_spec.rs index 88310eca96..8694e1a984 100644 --- a/test/subspace-test-client/src/chain_spec.rs +++ b/test/subspace-test-client/src/chain_spec.rs @@ -35,7 +35,7 @@ pub fn subspace_local_testnet_config() -> Result { .with_name("Local Testnet") .with_id("local_testnet") .with_chain_type(ChainType::Local) - .with_genesis_config(patch_domain_runtime_version( + .with_genesis_config( serde_json::to_value(create_genesis_config( // Sudo account get_account_id_from_seed("Alice"), @@ -57,7 +57,7 @@ pub fn subspace_local_testnet_config() -> Result { ], )?) .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, - )) + ) .with_protocol_id("subspace-test") .build()) } @@ -101,42 +101,3 @@ fn create_genesis_config( runtime_configs: Default::default(), }) } - -// TODO: Workaround for https://github.com/paritytech/polkadot-sdk/issues/4001 -fn patch_domain_runtime_version(mut genesis_config: serde_json::Value) -> serde_json::Value { - let Some(genesis_domains) = genesis_config - .get_mut("domains") - .and_then(|domains| domains.get_mut("genesisDomains")) - .and_then(|genesis_domains| genesis_domains.as_array_mut()) - else { - return genesis_config; - }; - - for genesis_domain in genesis_domains { - let Some(runtime_version) = genesis_domain.get_mut("runtime_version") else { - continue; - }; - - if let Some(spec_name) = runtime_version.get_mut("specName") { - if let Some(spec_name_bytes) = spec_name - .as_str() - .map(|spec_name| spec_name.as_bytes().to_vec()) - { - *spec_name = serde_json::to_value(spec_name_bytes) - .expect("Bytes serialization doesn't fail; qed"); - } - } - - if let Some(impl_name) = runtime_version.get_mut("implName") { - if let Some(impl_name_bytes) = impl_name - .as_str() - .map(|impl_name| impl_name.as_bytes().to_vec()) - { - *impl_name = serde_json::to_value(impl_name_bytes) - .expect("Bytes serialization doesn't fail; qed"); - } - } - } - - genesis_config -} diff --git a/test/subspace-test-primitives/Cargo.toml b/test/subspace-test-primitives/Cargo.toml index 99432e0225..9520d5beeb 100644 --- a/test/subspace-test-primitives/Cargo.toml +++ b/test/subspace-test-primitives/Cargo.toml @@ -13,11 +13,11 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } sp-domains = { version = "0.1.0", path = "../../crates/sp-domains", default-features = false } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", default-features = false, path = "../../crates/sp-subspace-mmr" } subspace-runtime-primitives = { version = "0.1.0", path = "../../crates/subspace-runtime-primitives", default-features = false } diff --git a/test/subspace-test-runtime/Cargo.toml b/test/subspace-test-runtime/Cargo.toml index bbe84d8ee2..445e8c3cb8 100644 --- a/test/subspace-test-runtime/Cargo.toml +++ b/test/subspace-test-runtime/Cargo.toml @@ -18,56 +18,56 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } -frame-executive = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-executive = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-domains = { version = "0.1.0", default-features = false, path = "../../crates/pallet-domains" } pallet-history-seeding = { version = "0.1.0", default-features = false, path = "../../crates/pallet-history-seeding" } pallet-messenger = { version = "0.1.0", path = "../../domains/pallets/messenger", default-features = false } -pallet-mmr = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-mmr = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-rewards = { version = "0.1.0", default-features = false, path = "../../crates/pallet-rewards" } pallet-runtime-configs = { version = "0.1.0", default-features = false, path = "../../crates/pallet-runtime-configs" } pallet-subspace = { version = "0.1.0", default-features = false, features = ["serde"], path = "../../crates/pallet-subspace" } pallet-subspace-mmr = { version = "0.1.0", default-features = false, path = "../../crates/pallet-subspace-mmr" } -pallet-sudo = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-sudo = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-timestamp = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-transaction-fees = { version = "0.1.0", default-features = false, path = "../../crates/pallet-transaction-fees" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } pallet-transporter = { version = "0.1.0", path = "../../domains/pallets/transporter", default-features = false } -pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } -sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../../crates/sp-consensus-subspace" } -sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", default-features = false, path = "../../crates/sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", default-features = false, path = "../../crates/sp-domains-fraud-proof" } -sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } sp-messenger = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger-host-functions" } -sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-objects = { version = "0.1.0", default-features = false, path = "../../crates/sp-objects" } -sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-offchain = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-session = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { default-features = false, path = "../../crates/sp-subspace-mmr" } -sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-transaction-pool = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-version = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } static_assertions = "1.1.0" subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../../crates/subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../crates/subspace-runtime-primitives" } subspace-test-primitives = { version = "0.1.0", default-features = false, path = "../subspace-test-primitives" } # Used for the node template's RPCs -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", optional = true } +substrate-wasm-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", optional = true } [features] default = ["std"] @@ -119,4 +119,18 @@ std = [ "subspace-runtime-primitives/std", "substrate-wasm-builder", ] -do-not-enforce-cost-of-storage = [] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-domains/runtime-benchmarks", + "pallet-mmr/runtime-benchmarks", + "pallet-messenger/runtime-benchmarks", + "pallet-rewards/runtime-benchmarks", + "pallet-runtime-configs/runtime-benchmarks", + "pallet-subspace/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-transporter/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] diff --git a/test/subspace-test-runtime/src/lib.rs b/test/subspace-test-runtime/src/lib.rs index 782d6400e0..b19d6f4ed1 100644 --- a/test/subspace-test-runtime/src/lib.rs +++ b/test/subspace-test-runtime/src/lib.rs @@ -24,10 +24,13 @@ reason = "https://github.com/rust-lang/rust-analyzer/issues/16514" )] +extern crate alloc; + // Make the WASM binary available. #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +use alloc::borrow::Cow; use codec::{Compact, CompactLen, Decode, Encode, MaxEncodedLen}; use core::mem; use core::num::NonZeroU64; @@ -79,9 +82,7 @@ use sp_runtime::traits::{ use sp_runtime::transaction_validity::{ InvalidTransaction, TransactionSource, TransactionValidity, TransactionValidityError, }; -use sp_runtime::{ - create_runtime_str, generic, AccountId32, ApplyExtrinsicResult, ExtrinsicInclusionMode, Perbill, -}; +use sp_runtime::{generic, AccountId32, ApplyExtrinsicResult, ExtrinsicInclusionMode, Perbill}; use sp_std::collections::btree_map::BTreeMap; use sp_std::collections::btree_set::BTreeSet; use sp_std::marker::PhantomData; @@ -111,8 +112,8 @@ const MAX_PIECES_IN_SECTOR: u16 = 32; // https://substrate.dev/docs/en/knowledgebase/runtime/upgrades#runtime-versioning #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("subspace"), - impl_name: create_runtime_str!("subspace"), + spec_name: Cow::Borrowed("subspace"), + impl_name: Cow::Borrowed("subspace"), authoring_version: 1, // The version of the runtime specification. A full node will not attempt to use its native // runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, @@ -123,8 +124,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, - state_version: 1, - extrinsic_state_version: 0, + system_version: 2, }; /// The smallest unit of the token is called Shannon. @@ -810,6 +810,8 @@ impl pallet_mmr::Config for Runtime { type OnNewRoot = SubspaceMmr; type BlockHashProvider = BlockHashProvider; type WeightInfo = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } parameter_types! { diff --git a/test/subspace-test-service/Cargo.toml b/test/subspace-test-service/Cargo.toml index e1b371f49f..7404f9223b 100644 --- a/test/subspace-test-service/Cargo.toml +++ b/test/subspace-test-service/Cargo.toml @@ -20,58 +20,53 @@ cross-domain-message-gossip = { version = "0.1.0", path = "../../domains/client/ codec = { package = "parity-scale-codec", version = "3.6.12", features = ["derive"] } domain-client-message-relayer = { version = "0.1.0", path = "../../domains/client/relayer" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } -frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } futures = "0.3.29" -jsonrpsee = { version = "0.23.2", features = ["server"] } -pallet-transaction-payment = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -mmr-gadget = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +jsonrpsee = { version = "0.24.5", features = ["server"] } +pallet-transaction-payment = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +mmr-gadget = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } rand = "0.8.5" pallet-domains = { version = "0.1.0", path = "../../crates/pallet-domains" } parking_lot = "0.12.2" -sc-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sc-domains = { version = "0.1.0", path = "../../crates/sc-domains" } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42", default-features = false } +sc-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-consensus-subspace = { version = "0.1.0", path = "../../crates/sp-consensus-subspace" } -sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-domains = { version = "0.1.0", path = "../../crates/sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", path = "../../crates/sp-domains-fraud-proof" } -sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-externalities = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", path = "../../domains/primitives/messenger-host-functions" } -sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-mmr-primitives = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } sp-subspace-mmr = { version = "0.1.0", path = "../../crates/sp-subspace-mmr" } -sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../../crates/subspace-core-primitives" } subspace-runtime-primitives = { path = "../../crates/subspace-runtime-primitives" } subspace-service = { path = "../../crates/subspace-service" } subspace-test-client = { path = "../subspace-test-client" } subspace-test-primitives = { version = "0.1.0", path = "../subspace-test-primitives" } subspace-test-runtime = { version = "0.1.0", path = "../subspace-test-runtime" } -substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } -substrate-test-client = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } +substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } +substrate-test-client = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } tokio = "1.39.2" tracing = "0.1.40" [dev-dependencies] -sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631" } - -[features] -do-not-enforce-cost-of-storage = [ - "subspace-test-runtime/do-not-enforce-cost-of-storage", -] +sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" } diff --git a/test/subspace-test-service/src/lib.rs b/test/subspace-test-service/src/lib.rs index c1d86baace..e2a531452c 100644 --- a/test/subspace-test-service/src/lib.rs +++ b/test/subspace-test-service/src/lib.rs @@ -33,16 +33,15 @@ use sc_client_api::{Backend as BackendT, BlockBackend, ExecutorProvider, Finaliz use sc_consensus::block_import::{ BlockCheckParams, BlockImportParams, ForkChoiceStrategy, ImportResult, }; -use sc_consensus::{ - BasicQueue, BlockImport, SharedBlockImport, StateAction, Verifier as VerifierT, -}; +use sc_consensus::{BasicQueue, BlockImport, StateAction, Verifier as VerifierT}; use sc_domains::ExtensionsFactory as DomainsExtensionFactory; use sc_network::config::{NetworkConfiguration, TransportConfig}; use sc_network::service::traits::NetworkService; use sc_network::{multiaddr, NetworkWorker, NotificationMetrics, NotificationService}; use sc_service::config::{ - DatabaseSource, KeystoreConfig, MultiaddrWithPeerId, OffchainWorkerConfig, - RpcBatchRequestConfig, WasmExecutionMethod, WasmtimeInstantiationStrategy, + DatabaseSource, ExecutorConfiguration, KeystoreConfig, MultiaddrWithPeerId, + OffchainWorkerConfig, RpcBatchRequestConfig, RpcConfiguration, WasmExecutionMethod, + WasmtimeInstantiationStrategy, }; use sc_service::{ BasePath, BlocksPruning, Configuration, NetworkStarter, Role, SpawnTasksParams, TaskManager, @@ -159,27 +158,33 @@ pub fn node_config( state_pruning: Default::default(), blocks_pruning: BlocksPruning::KeepAll, chain_spec: Box::new(spec), - wasm_method: WasmExecutionMethod::Compiled { - instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite, + executor: ExecutorConfiguration { + wasm_method: WasmExecutionMethod::Compiled { + instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite, + }, + max_runtime_instances: 8, + default_heap_pages: None, + runtime_cache_size: 2, }, wasm_runtime_overrides: Default::default(), - rpc_addr: None, - rpc_max_request_size: 0, - rpc_max_response_size: 0, - rpc_id_provider: None, - rpc_max_subs_per_conn: 0, - rpc_port: 0, - rpc_message_buffer_capacity: 0, - rpc_batch_config: RpcBatchRequestConfig::Disabled, - rpc_max_connections: 0, - rpc_cors: None, - rpc_methods: Default::default(), - rpc_rate_limit: None, - rpc_rate_limit_whitelisted_ips: vec![], - rpc_rate_limit_trust_proxy_headers: false, + rpc: RpcConfiguration { + addr: None, + max_request_size: 0, + max_response_size: 0, + id_provider: None, + max_subs_per_conn: 0, + port: 0, + message_buffer_capacity: 0, + batch_config: RpcBatchRequestConfig::Disabled, + max_connections: 0, + cors: None, + methods: Default::default(), + rate_limit: None, + rate_limit_whitelisted_ips: vec![], + rate_limit_trust_proxy_headers: false, + }, prometheus_config: None, telemetry_endpoints: None, - default_heap_pages: None, offchain_worker: OffchainWorkerConfig { enabled: false, indexing_enabled: true, @@ -189,12 +194,9 @@ pub fn node_config( dev_key_seed: Some(key_seed), tracing_targets: None, tracing_receiver: Default::default(), - max_runtime_instances: 8, announce_block: true, data_path: base_path.path().into(), base_path, - informant_output_format: Default::default(), - runtime_cache_size: 2, } } @@ -407,13 +409,13 @@ impl MockConsensusNode { ); let _enter = span.enter(); - let executor = sc_service::new_wasm_executor(&config); + let executor = sc_service::new_wasm_executor(&config.executor); let (client, backend, keystore_container, mut task_manager) = sc_service::new_full_parts::(&config, None, executor.clone()) .expect("Fail to new full parts"); - let domain_executor = Arc::new(sc_service::new_wasm_executor(&config)); + let domain_executor = Arc::new(sc_service::new_wasm_executor(&config.executor)); let client = Arc::new(client); let mock_pot_verifier = Arc::new(MockPotVerfier::default()); let chain_constants = client @@ -447,10 +449,11 @@ impl MockConsensusNode { let block_import = MockBlockImport::<_, _>::new(client.clone()); - let mut net_config = - sc_network::config::FullNetworkConfiguration::<_, _, NetworkWorker<_, _>>::new( - &config.network, - ); + let mut net_config = sc_network::config::FullNetworkConfiguration::< + _, + _, + NetworkWorker<_, _>, + >::new(&config.network, None); let (xdm_gossip_notification_config, xdm_gossip_notification_service) = xdm_gossip_peers_set_config(); net_config.add_notification_protocol(xdm_gossip_notification_config); @@ -467,7 +470,7 @@ impl MockConsensusNode { &task_manager.spawn_essential_handle(), ), block_announce_validator_builder: None, - warp_sync_params: None, + warp_sync_config: None, block_relay: None, metrics: NotificationMetrics::new(None), }) @@ -479,7 +482,7 @@ impl MockConsensusNode { keystore: keystore_container.keystore(), task_manager: &mut task_manager, transaction_pool: transaction_pool.clone(), - rpc_builder: Box::new(|_, _| Ok(RpcModule::new(()))), + rpc_builder: Box::new(|_| Ok(RpcModule::new(()))), backend: backend.clone(), system_rpc_tx, config, @@ -1108,7 +1111,7 @@ where { BasicQueue::new( MockVerifier::default(), - SharedBlockImport::new(block_import), + Box::new(block_import), None, spawner, None, @@ -1191,7 +1194,7 @@ where type Error = ConsensusError; async fn import_block( - &mut self, + &self, mut block: BlockImportParams, ) -> Result { let block_number = *block.header.number();