From 7fdbd88b74d30bbda60c16a30459a83104ed9420 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 16 Jun 2023 13:50:53 +0300 Subject: [PATCH] Upgrade Substrate (with `core-evm-relay` removed) --- Cargo.lock | 2173 +++++++++-------- Cargo.toml | 58 +- crates/pallet-domains/Cargo.toml | 18 +- crates/pallet-feeds/Cargo.toml | 14 +- .../Cargo.toml | 20 +- crates/pallet-object-store/Cargo.toml | 14 +- crates/pallet-offences-subspace/Cargo.toml | 14 +- crates/pallet-rewards/Cargo.toml | 8 +- crates/pallet-runtime-configs/Cargo.toml | 8 +- crates/pallet-runtime-configs/src/lib.rs | 2 - crates/pallet-settlement/Cargo.toml | 12 +- crates/pallet-subspace/Cargo.toml | 24 +- crates/pallet-subspace/src/lib.rs | 1 - crates/pallet-subspace/src/mock.rs | 2 +- crates/pallet-transaction-fees/Cargo.toml | 6 +- crates/sc-consensus-fraud-proof/Cargo.toml | 8 +- crates/sc-consensus-subspace-rpc/Cargo.toml | 16 +- crates/sc-consensus-subspace/Cargo.toml | 34 +- crates/sc-consensus-subspace/src/lib.rs | 9 +- crates/sc-subspace-block-relay/Cargo.toml | 15 +- .../sc-subspace-block-relay/src/consensus.rs | 6 +- crates/sc-subspace-chain-specs/Cargo.toml | 10 +- crates/sp-consensus-subspace/Cargo.toml | 24 +- crates/sp-consensus-subspace/src/lib.rs | 5 +- crates/sp-domains/Cargo.toml | 28 +- crates/sp-domains/src/bundle_election.rs | 80 +- crates/sp-domains/src/fraud_proof.rs | 4 +- crates/sp-domains/src/lib.rs | 45 +- crates/sp-lightclient/Cargo.toml | 12 +- crates/sp-objects/Cargo.toml | 4 +- crates/sp-settlement/Cargo.toml | 8 +- crates/subspace-core-primitives/Cargo.toml | 2 +- crates/subspace-farmer-components/Cargo.toml | 2 +- crates/subspace-farmer/Cargo.toml | 2 +- crates/subspace-fraud-proof/Cargo.toml | 28 +- .../src/invalid_state_transition_proof.rs | 31 +- crates/subspace-fraud-proof/src/tests.rs | 15 +- crates/subspace-networking/Cargo.toml | 2 +- crates/subspace-node/Cargo.toml | 40 +- crates/subspace-node/README.md | 4 +- crates/subspace-node/src/bin/subspace-node.rs | 100 +- crates/subspace-node/src/core_domain.rs | 1 - crates/subspace-node/src/core_domain/cli.rs | 28 +- .../core_domain/core_eth_relay_chain_spec.rs | 228 -- .../src/system_domain/chain_spec.rs | 56 - crates/subspace-node/src/system_domain/cli.rs | 22 +- crates/subspace-runtime-primitives/Cargo.toml | 13 +- crates/subspace-runtime-primitives/src/lib.rs | 8 +- crates/subspace-runtime/Cargo.toml | 52 +- crates/subspace-runtime/src/lib.rs | 9 +- crates/subspace-service/Cargo.toml | 73 +- crates/subspace-service/src/lib.rs | 18 +- crates/subspace-transaction-pool/Cargo.toml | 20 +- crates/subspace-transaction-pool/src/lib.rs | 15 +- crates/subspace-verification/Cargo.toml | 6 +- crates/subspace-wasm-tools/Cargo.toml | 2 +- domains/client/block-builder/Cargo.toml | 18 +- domains/client/block-preprocessor/Cargo.toml | 20 +- .../client/consensus-relay-chain/Cargo.toml | 14 +- .../cross-domain-message-gossip/Cargo.toml | 14 +- domains/client/domain-executor/Cargo.toml | 53 +- domains/client/domain-executor/README.md | 2 +- .../src/bundle_election_solver.rs | 22 +- .../domain-executor/src/core_executor.rs | 6 +- .../client/domain-executor/src/fraud_proof.rs | 12 +- domains/client/domain-executor/src/lib.rs | 2 - .../domain-executor/src/system_executor.rs | 6 +- domains/client/domain-executor/src/tests.rs | 369 ++- domains/client/eth-service/Cargo.toml | 41 +- domains/client/eth-service/src/provider.rs | 22 +- domains/client/eth-service/src/rpc.rs | 22 +- domains/client/eth-service/src/service.rs | 20 +- domains/client/executor-gossip/Cargo.toml | 12 +- domains/client/executor-gossip/src/lib.rs | 3 +- domains/client/relayer/Cargo.toml | 20 +- domains/pallets/domain-registry/Cargo.toml | 20 +- domains/pallets/domain-registry/src/lib.rs | 16 +- domains/pallets/domain-registry/src/tests.rs | 2 +- domains/pallets/executive/Cargo.toml | 26 +- domains/pallets/executive/src/lib.rs | 6 - domains/pallets/executor-registry/Cargo.toml | 22 +- domains/pallets/executor-registry/src/lib.rs | 5 +- .../pallets/executor-registry/src/tests.rs | 2 +- domains/pallets/messenger/Cargo.toml | 20 +- domains/pallets/messenger/src/lib.rs | 13 +- domains/pallets/messenger/src/mock.rs | 2 +- domains/pallets/transporter/Cargo.toml | 18 +- domains/pallets/transporter/src/mock.rs | 2 +- domains/primitives/digests/Cargo.toml | 6 +- .../primitives/executor-registry/Cargo.toml | 2 +- .../primitives/executor-registry/src/lib.rs | 2 - domains/primitives/messenger/Cargo.toml | 14 +- domains/primitives/messenger/src/messages.rs | 4 +- domains/primitives/runtime/Cargo.toml | 10 +- domains/primitives/system-runtime/Cargo.toml | 8 +- domains/runtime/core-eth-relay/Cargo.toml | 111 - domains/runtime/core-eth-relay/build.rs | 13 - .../core-eth-relay/src/feed_processor.rs | 156 -- domains/runtime/core-eth-relay/src/lib.rs | 19 - domains/runtime/core-eth-relay/src/runtime.rs | 740 ------ domains/runtime/core-evm/Cargo.toml | 68 +- domains/runtime/core-evm/src/precompiles.rs | 11 +- domains/runtime/core-evm/src/runtime.rs | 25 +- domains/runtime/core-payments/Cargo.toml | 44 +- domains/runtime/core-payments/src/runtime.rs | 3 +- domains/runtime/system/Cargo.toml | 44 +- domains/runtime/system/build.rs | 7 - domains/runtime/system/src/runtime.rs | 6 +- domains/service/Cargo.toml | 68 +- domains/service/src/core_domain.rs | 23 +- domains/service/src/lib.rs | 49 +- domains/service/src/system_domain.rs | 29 +- domains/test/primitives/Cargo.toml | 2 +- .../test/runtime/core-eth-relay/Cargo.toml | 112 - domains/test/runtime/core-eth-relay/build.rs | 13 - .../core-eth-relay/src/feed_processor.rs | 156 -- .../test/runtime/core-eth-relay/src/lib.rs | 19 - .../runtime/core-eth-relay/src/runtime.rs | 737 ------ domains/test/runtime/core-payments/Cargo.toml | 46 +- .../test/runtime/core-payments/src/runtime.rs | 3 +- domains/test/runtime/system/Cargo.toml | 44 +- domains/test/runtime/system/build.rs | 7 - domains/test/runtime/system/src/runtime.rs | 3 +- domains/test/service/Cargo.toml | 65 +- domains/test/service/src/chain_spec.rs | 30 - domains/test/service/src/core_domain.rs | 44 - domains/test/service/src/lib.rs | 21 +- orml/vesting/Cargo.toml | 31 +- orml/vesting/src/default_weight.rs | 10 +- orml/vesting/src/lib.rs | 729 +++--- orml/vesting/src/mock.rs | 8 +- orml/vesting/src/tests.rs | 6 +- orml/vesting/src/weights.rs | 2 +- test/subspace-test-client/Cargo.toml | 14 +- test/subspace-test-runtime/Cargo.toml | 48 +- test/subspace-test-runtime/src/lib.rs | 9 +- test/subspace-test-service/Cargo.toml | 46 +- test/subspace-test-service/src/lib.rs | 29 +- 138 files changed, 2714 insertions(+), 5273 deletions(-) delete mode 100644 crates/subspace-node/src/core_domain/core_eth_relay_chain_spec.rs delete mode 100644 domains/runtime/core-eth-relay/Cargo.toml delete mode 100644 domains/runtime/core-eth-relay/build.rs delete mode 100644 domains/runtime/core-eth-relay/src/feed_processor.rs delete mode 100644 domains/runtime/core-eth-relay/src/lib.rs delete mode 100644 domains/runtime/core-eth-relay/src/runtime.rs delete mode 100644 domains/test/runtime/core-eth-relay/Cargo.toml delete mode 100644 domains/test/runtime/core-eth-relay/build.rs delete mode 100644 domains/test/runtime/core-eth-relay/src/feed_processor.rs delete mode 100644 domains/test/runtime/core-eth-relay/src/lib.rs delete mode 100644 domains/test/runtime/core-eth-relay/src/runtime.rs diff --git a/Cargo.lock b/Cargo.lock index 212f364b4b..ca99c588e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -193,22 +193,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "addr2line" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" -dependencies = [ - "gimli 0.26.2", -] - [[package]] name = "addr2line" version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.27.2", + "gimli", ] [[package]] @@ -376,9 +367,10 @@ dependencies = [ ] [[package]] -name = "amcl" -version = "0.3.0" -source = "git+https://github.com/Snowfork/milagro_bls#bc2b5b5e8d48b7e2e1bfaa56dc2d93e13cb32095" +name = "allocator-api2" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56fc6cf8dc8c4158eed8649f9b8b0ea1518eb62b544fe9490d66fa0b349eafe9" [[package]] name = "android_system_properties" @@ -480,6 +472,12 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" +[[package]] +name = "array-bytes" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd" + [[package]] name = "arrayref" version = "0.3.7" @@ -565,12 +563,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "asn1_der" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" - [[package]] name = "async-channel" version = "1.8.0" @@ -628,7 +620,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] @@ -644,6 +636,15 @@ dependencies = [ "pin-project-lite 0.2.9", ] +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + [[package]] name = "atomic-polyfill" version = "1.0.2" @@ -708,12 +709,12 @@ version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "addr2line 0.19.0", + "addr2line", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.30.3", + "object", "rustc-demangle", ] @@ -771,7 +772,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "hash-db 0.16.0", "log", @@ -941,9 +942,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a071c348a5ef6da1d3a87166b408170b46002382b1dda83992b5c2208cefb370" +checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" dependencies = [ "log", "parity-scale-codec", @@ -1111,9 +1112,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.10.3" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +checksum = "e70d3ad08698a0568b0562f22710fe6bfc1f4a61a367c77d0398c562eadd453a" dependencies = [ "smallvec", ] @@ -1273,9 +1274,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.2.2" +version = "4.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b802d85aaf3a1cdb02b224ba472ebdea62014fccfcb269b95a4d76443b5ee5a" +checksum = "80672091db20273a15cf9fdd4e47ed43b5091ec9841bf4c6145c9dfbbcae09ed" dependencies = [ "clap_builder", "clap_derive", @@ -1284,27 +1285,27 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.2.2" +version = "4.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14a1a858f532119338887a4b8e1af9c60de8249cd7bafd68036a489e261e37b6" +checksum = "c1458a1df40e1e2afebb7ab60ce55c1fa8f431146205aa5f4887e0b111c27636" dependencies = [ "anstream", "anstyle", "bitflags", - "clap_lex 0.4.1", + "clap_lex 0.5.0", "strsim", ] [[package]] name = "clap_derive" -version = "4.2.0" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" +checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] @@ -1318,9 +1319,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" [[package]] name = "codespan-reporting" @@ -1340,9 +1341,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "6.1.4" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e7b787b0dc42e8111badfdbe4c3059158ccb2db8780352fa1b01e8ccf45cc4d" +checksum = "9ab77dbd8adecaf3f0db40581631b995f312a8a5ae3aa9993188bb8f23d83a5b" dependencies = [ "strum", "strum_macros", @@ -1387,95 +1388,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "core-eth-relay-domain-test-runtime" -version = "0.1.0" -dependencies = [ - "domain-pallet-executive", - "domain-runtime-primitives", - "domain-test-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "hex-literal", - "log", - "pallet-balances", - "pallet-domain-registry", - "pallet-executor-registry", - "pallet-feeds", - "pallet-messenger", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-transporter", - "parity-scale-codec", - "scale-info", - "snowbridge-beacon-primitives", - "snowbridge-ethereum-beacon-client", - "sp-api", - "sp-block-builder", - "sp-core", - "sp-domains", - "sp-inherents", - "sp-io", - "sp-messenger", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-transaction-pool", - "sp-version", - "subspace-runtime-primitives", - "subspace-wasm-tools", - "substrate-wasm-builder", -] - -[[package]] -name = "core-eth-relay-runtime" -version = "0.1.0" -dependencies = [ - "domain-pallet-executive", - "domain-runtime-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "hex-literal", - "log", - "pallet-balances", - "pallet-feeds", - "pallet-messenger", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-transporter", - "parity-scale-codec", - "scale-info", - "snowbridge-beacon-primitives", - "snowbridge-ethereum-beacon-client", - "sp-api", - "sp-block-builder", - "sp-core", - "sp-domains", - "sp-inherents", - "sp-io", - "sp-messenger", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-transaction-pool", - "sp-version", - "subspace-runtime-primitives", - "subspace-wasm-tools", - "substrate-wasm-builder", -] - [[package]] name = "core-evm-runtime" version = "0.1.0" @@ -1654,28 +1566,27 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.93.1" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7379abaacee0f14abf3204a7606118f0465785252169d186337bcb75030815a" +checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.93.1" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9489fa336927df749631f1008007ced2871068544f40a202ce6d93fbf2366a7b" +checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" dependencies = [ - "arrayvec 0.7.2", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", - "hashbrown 0.12.3", + "gimli", + "hashbrown 0.13.2", "log", "regalloc2", "smallvec", @@ -1684,33 +1595,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.93.1" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05bbb67da91ec721ed57cef2f7c5ef7728e1cd9bde9ffd3ef8601022e73e3239" +checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.93.1" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418ecb2f36032f6665dc1a5e2060a143dbab41d83b784882e97710e890a7a16d" +checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" [[package]] name = "cranelift-entity" -version = "0.93.1" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cf583f7b093f291005f9fb1323e2c37f6ee4c7909e39ce016b2e8360d461705" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.93.1" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b66bf9e916f57fbbd0f7703ec6286f4624866bf45000111627c70d272c8dda1" +checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" dependencies = [ "cranelift-codegen", "log", @@ -1720,15 +1631,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.93.1" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649782a39ce99798dd6b4029e2bb318a2fbeaade1b4fa25330763c10c65bc358" +checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" [[package]] name = "cranelift-native" -version = "0.93.1" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "937e021e089c51f9749d09e7ad1c4f255c2f8686cb8c3df63a34b3ec9921bc41" +checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" dependencies = [ "cranelift-codegen", "libc", @@ -1737,9 +1648,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.93.1" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d850cf6775477747c9dfda9ae23355dd70512ffebc70cf82b85a5b111ae668b5" +checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -2016,7 +1927,7 @@ dependencies = [ "cfg-if", "fiat-crypto", "packed_simd_2", - "platforms 3.0.2", + "platforms", "subtle", "zeroize", ] @@ -2045,7 +1956,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] @@ -2062,7 +1973,7 @@ checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] @@ -2402,7 +2313,6 @@ dependencies = [ name = "domain-client-executor" version = "0.1.0" dependencies = [ - "core-eth-relay-domain-test-runtime", "core-payments-domain-runtime", "core-payments-domain-test-runtime", "crossbeam", @@ -2511,7 +2421,7 @@ dependencies = [ name = "domain-eth-service" version = "0.1.0" dependencies = [ - "clap 4.2.2", + "clap 4.3.4", "domain-runtime-primitives", "domain-service", "fc-consensus", @@ -2526,6 +2436,7 @@ dependencies = [ "pallet-transaction-payment-rpc", "sc-client-api", "sc-executor", + "sc-network-sync", "sc-rpc", "sc-service", "sc-transaction-pool", @@ -2578,7 +2489,7 @@ name = "domain-service" version = "0.1.0" dependencies = [ "async-trait", - "clap 4.2.2", + "clap 4.3.4", "cross-domain-message-gossip", "domain-block-preprocessor", "domain-client-consensus-relay-chain", @@ -2652,7 +2563,6 @@ name = "domain-test-service" version = "0.1.0" dependencies = [ "async-trait", - "core-eth-relay-domain-test-runtime", "core-payments-domain-test-runtime", "domain-client-consensus-relay-chain", "domain-client-executor", @@ -2707,16 +2617,16 @@ dependencies = [ ] [[package]] -name = "downcast" -version = "0.11.0" +name = "dotenvy" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] -name = "downcast-rs" -version = "1.2.0" +name = "downcast" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dtoa" @@ -2818,6 +2728,9 @@ name = "either" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +dependencies = [ + "serde", +] [[package]] name = "elliptic-curve" @@ -2932,15 +2845,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ethabi-decode" -version = "1.3.3" -source = "git+https://github.com/snowfork/ethabi-decode.git?rev=6f63405bb33ef4365a1c62b72d499fa0f448118e#6f63405bb33ef4365a1c62b72d499fa0f448118e" -dependencies = [ - "ethereum-types", - "tiny-keccak 1.5.0", -] - [[package]] name = "ethbloom" version = "0.13.0" @@ -2953,7 +2857,7 @@ dependencies = [ "impl-rlp", "impl-serde", "scale-info", - "tiny-keccak 2.0.2", + "tiny-keccak", ] [[package]] @@ -3009,9 +2913,9 @@ dependencies = [ [[package]] name = "evm" -version = "0.37.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4448c65b71e8e2b9718232d84d09045eeaaccb2320494e6bd6dbf7e58fec8ff" +checksum = "a49a4e11987c51220aa89dbe1a5cc877f5079fa6864c0a5b4533331db44e9365" dependencies = [ "auto_impl", "environmental", @@ -3030,9 +2934,9 @@ dependencies = [ [[package]] name = "evm-core" -version = "0.37.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c51bec0eb68a891c2575c758eaaa1d61373fc51f7caaf216b1fb5c3fea3b5d" +checksum = "4f1f13264b044cb66f0602180f0bc781c29accb41ff560669a3ec15858d5b606" dependencies = [ "parity-scale-codec", "primitive-types", @@ -3042,9 +2946,9 @@ dependencies = [ [[package]] name = "evm-gasometer" -version = "0.37.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8b93c59c54fc26522d842f0e0d3f8e8be331c776df18ff3e540b53c2f64d509" +checksum = "8d43eadc395bd1a52990787ca1495c26b0248165444912be075c28909a853b8c" dependencies = [ "environmental", "evm-core", @@ -3054,9 +2958,9 @@ dependencies = [ [[package]] name = "evm-runtime" -version = "0.37.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79b9459ce64f1a28688397c4013764ce53cd57bb84efc16b5187fa9b05b13ad" +checksum = "2aa5b32f59ec582a5651978004e5c784920291263b7dcb6de418047438e37f4f" dependencies = [ "auto_impl", "environmental", @@ -3076,15 +2980,15 @@ dependencies = [ [[package]] name = "expander" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" +checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ "blake2", "fs-err", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -3111,7 +3015,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "async-trait", "fp-consensus", @@ -3127,25 +3031,36 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ + "async-trait", + "ethereum", + "fc-storage", + "fp-consensus", + "fp-rpc", "fp-storage", + "futures", "log", "parity-db", "parity-scale-codec", "parking_lot 0.12.1", + "sc-client-api", "sc-client-db", "smallvec", + "sp-api", "sp-blockchain", "sp-core", "sp-database", "sp-runtime", + "sp-storage", + "sqlx", + "tokio", ] [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "fc-db", "fc-storage", @@ -3154,21 +3069,27 @@ dependencies = [ "futures", "futures-timer", "log", + "parking_lot 0.12.1", "sc-client-api", + "sc-utils", "sp-api", "sp-blockchain", + "sp-consensus", + "sp-core", "sp-runtime", + "tokio", ] [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "ethereum", "ethereum-types", "evm", "fc-db", + "fc-mapping-sync", "fc-rpc-core", "fc-storage", "fp-ethereum", @@ -3194,6 +3115,7 @@ dependencies = [ "sc-service", "sc-transaction-pool", "sc-transaction-pool-api", + "sc-utils", "sp-api", "sp-block-builder", "sp-blockchain", @@ -3210,7 +3132,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "ethereum", "ethereum-types", @@ -3223,7 +3145,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "ethereum", "ethereum-types", @@ -3349,16 +3271,43 @@ dependencies = [ "num-traits", ] +[[package]] +name = "flume" +version = "0.10.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +dependencies = [ + "futures-core", + "futures-sink", + "pin-project", + "spin 0.9.8", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "parity-scale-codec", ] @@ -3375,7 +3324,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "hex", "impl-serde", @@ -3393,7 +3342,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "ethereum", "parity-scale-codec", @@ -3405,7 +3354,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "ethereum", "ethereum-types", @@ -3419,7 +3368,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "evm", "frame-support", @@ -3434,7 +3383,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "ethereum", "ethereum-types", @@ -3451,7 +3400,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "frame-support", "parity-scale-codec", @@ -3463,7 +3412,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "parity-scale-codec", "serde", @@ -3478,7 +3427,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-support", "frame-support-procedural", @@ -3503,12 +3452,12 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "Inflector", - "array-bytes", + "array-bytes 4.2.0", "chrono", - "clap 4.2.2", + "clap 4.3.4", "comfy-table", "frame-benchmarking", "frame-support", @@ -3550,10 +3499,11 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-support", "frame-system", + "frame-try-runtime", "parity-scale-codec", "scale-info", "sp-core", @@ -3578,7 +3528,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "bitflags", "environmental", @@ -3587,6 +3537,7 @@ dependencies = [ "impl-trait-for-tuples", "k256", "log", + "macro_magic", "once_cell", "parity-scale-codec", "paste", @@ -3597,6 +3548,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", + "sp-debug-derive", "sp-inherents", "sp-io", "sp-runtime", @@ -3611,45 +3563,48 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "frame-support-procedural-tools", "itertools", + "macro_magic", + "proc-macro-warning", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ + "cfg-if", "frame-support", "log", "parity-scale-codec", @@ -3666,7 +3621,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-benchmarking", "frame-support", @@ -3681,10 +3636,22 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" +dependencies = [ + "parity-scale-codec", + "sp-api", +] + +[[package]] +name = "frame-try-runtime" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ + "frame-support", "parity-scale-codec", "sp-api", + "sp-runtime", + "sp-std", ] [[package]] @@ -3763,6 +3730,17 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot 0.12.1", +] + [[package]] name = "futures-io" version = "0.3.28" @@ -3792,7 +3770,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] @@ -3938,21 +3916,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" - [[package]] name = "glob" version = "0.3.1" @@ -4117,11 +4089,33 @@ dependencies = [ "ahash 0.8.3", ] +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +dependencies = [ + "ahash 0.8.3", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" +dependencies = [ + "hashbrown 0.14.0", +] + [[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +dependencies = [ + "unicode-segmentation", +] [[package]] name = "hermit-abi" @@ -4310,10 +4304,25 @@ dependencies = [ "rustls 0.20.8", "rustls-native-certs", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "webpki-roots 0.22.6", ] +[[package]] +name = "hyper-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" +dependencies = [ + "http", + "hyper", + "log", + "rustls 0.21.2", + "rustls-native-certs", + "tokio", + "tokio-rustls 0.24.1", +] + [[package]] name = "iana-time-zone" version = "0.1.56" @@ -4632,7 +4641,7 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tokio-util", "tracing", "webpki-roots 0.22.6", @@ -4675,7 +4684,7 @@ checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" dependencies = [ "async-trait", "hyper", - "hyper-rustls", + "hyper-rustls 0.23.2", "jsonrpsee-core", "jsonrpsee-types", "rustc-hash", @@ -4832,44 +4841,38 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" -[[package]] -name = "libm" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" - [[package]] name = "libp2p" -version = "0.50.1" +version = "0.51.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" +checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" dependencies = [ "bytes", "futures", "futures-timer", "getrandom 0.2.9", "instant", - "libp2p-core 0.38.0", - "libp2p-dns 0.38.0", - "libp2p-identify 0.41.1", - "libp2p-kad 0.42.1", - "libp2p-mdns 0.42.0", - "libp2p-metrics 0.11.0", - "libp2p-mplex", - "libp2p-noise 0.41.0", - "libp2p-ping 0.41.0", - "libp2p-quic 0.7.0-alpha", - "libp2p-request-response 0.23.0", - "libp2p-swarm 0.41.1", - "libp2p-tcp 0.38.0", + "libp2p-allow-block-list 0.1.1", + "libp2p-connection-limits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-dns 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identify 0.42.2", + "libp2p-identity 0.1.2", + "libp2p-kad 0.43.3", + "libp2p-mdns 0.43.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-metrics 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-noise 0.42.2", + "libp2p-ping 0.42.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-quic 0.7.0-alpha.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-request-response 0.24.1", + "libp2p-swarm 0.42.2", + "libp2p-tcp 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-wasm-ext", - "libp2p-webrtc 0.4.0-alpha", - "libp2p-websocket 0.40.0", - "libp2p-yamux 0.42.0", - "multiaddr 0.16.0", - "parking_lot 0.12.1", + "libp2p-webrtc 0.4.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-websocket 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-yamux 0.43.1", + "multiaddr", "pin-project", - "smallvec", ] [[package]] @@ -4882,26 +4885,26 @@ dependencies = [ "futures-timer", "getrandom 0.2.9", "instant", - "libp2p-allow-block-list", - "libp2p-connection-limits", + "libp2p-allow-block-list 0.1.0", + "libp2p-connection-limits 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-dns 0.39.0", + "libp2p-dns 0.39.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "libp2p-gossipsub", "libp2p-identify 0.42.1", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "libp2p-kad 0.43.2", - "libp2p-mdns 0.43.1", - "libp2p-metrics 0.12.0", + "libp2p-mdns 0.43.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-metrics 0.12.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "libp2p-noise 0.42.1", - "libp2p-ping 0.42.0", - "libp2p-quic 0.7.0-alpha.3", + "libp2p-ping 0.42.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-quic 0.7.0-alpha.3 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "libp2p-request-response 0.24.0", "libp2p-swarm 0.42.1", - "libp2p-tcp 0.39.0", - "libp2p-webrtc 0.4.0-alpha.4", - "libp2p-websocket 0.41.0", + "libp2p-tcp 0.39.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-webrtc 0.4.0-alpha.4 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-websocket 0.41.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "libp2p-yamux 0.43.0", - "multiaddr 0.17.1", + "multiaddr", "pin-project", ] @@ -4911,54 +4914,44 @@ version = "0.1.0" source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" dependencies = [ "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "libp2p-swarm 0.42.1", "void", ] [[package]] -name = "libp2p-connection-limits" -version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" +name = "libp2p-allow-block-list" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" dependencies = [ - "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-swarm 0.42.1", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", + "libp2p-swarm 0.42.2", "void", ] [[package]] -name = "libp2p-core" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" +name = "libp2p-connection-limits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "log", - "multiaddr 0.16.0", - "multihash 0.16.3", - "multistream-select 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell", - "parking_lot 0.12.1", - "pin-project", - "prost", - "prost-build", - "rand 0.8.5", - "rw-stream-sink 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sec1 0.3.0", - "sha2 0.10.6", - "smallvec", - "thiserror", - "unsigned-varint", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", + "libp2p-swarm 0.42.2", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.1.0" +source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" +dependencies = [ + "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", + "libp2p-swarm 0.42.1", "void", - "zeroize", ] [[package]] @@ -4972,9 +4965,9 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-identity 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", "log", - "multiaddr 0.17.1", + "multiaddr", "multihash 0.17.0", "multistream-select 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell", @@ -4999,9 +4992,9 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "log", - "multiaddr 0.17.1", + "multiaddr", "multihash 0.17.0", "multistream-select 0.12.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "once_cell", @@ -5019,12 +5012,12 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", "log", "parking_lot 0.12.1", "smallvec", @@ -5038,7 +5031,7 @@ source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa dependencies = [ "futures", "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "log", "parking_lot 0.12.1", "smallvec", @@ -5059,12 +5052,12 @@ dependencies = [ "hex_fmt", "instant", "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "libp2p-swarm 0.42.1", "log", - "prometheus-client 0.19.0", + "prometheus-client", "quick-protobuf", - "quick-protobuf-codec", + "quick-protobuf-codec 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "rand 0.8.5", "regex", "serde", @@ -5077,20 +5070,20 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.41.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" +version = "0.42.1" +source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" dependencies = [ "asynchronous-codec", + "either", "futures", "futures-timer", - "libp2p-core 0.38.0", - "libp2p-swarm 0.41.1", + "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", + "libp2p-swarm 0.42.1", "log", - "lru 0.8.1", - "prost", - "prost-build", - "prost-codec", + "lru 0.10.0", + "quick-protobuf", + "quick-protobuf-codec 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "smallvec", "thiserror", "void", @@ -5098,20 +5091,21 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.42.1" -source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", "either", "futures", "futures-timer", - "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-swarm 0.42.1", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", + "libp2p-swarm 0.42.2", "log", "lru 0.10.0", "quick-protobuf", - "quick-protobuf-codec", + "quick-protobuf-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec", "thiserror", "void", @@ -5120,34 +5114,34 @@ dependencies = [ [[package]] name = "libp2p-identity" version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a8ea433ae0cea7e3315354305237b9897afe45278b2118a7a57ca744e70fd27" +source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" dependencies = [ "bs58", "ed25519-dalek", "log", - "multiaddr 0.17.1", + "multiaddr", "multihash 0.17.0", - "prost", "quick-protobuf", "rand 0.8.5", + "serde", + "sha2 0.10.6", "thiserror", "zeroize", ] [[package]] name = "libp2p-identity" -version = "0.1.1" -source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2d584751cecb2aabaa56106be6be91338a60a0f4e420cf2af639204f596fc1" dependencies = [ "bs58", "ed25519-dalek", "log", - "multiaddr 0.17.1", + "multiaddr", "multihash 0.17.0", "quick-protobuf", "rand 0.8.5", - "serde", "sha2 0.10.6", "thiserror", "zeroize", @@ -5155,9 +5149,8 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" +version = "0.43.2" +source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", @@ -5167,12 +5160,13 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", - "libp2p-swarm 0.41.1", + "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", + "libp2p-swarm 0.42.1", "log", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", + "serde", "sha2 0.10.6", "smallvec", "thiserror", @@ -5183,8 +5177,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.43.2" -source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" +version = "0.43.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", @@ -5194,13 +5189,12 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-swarm 0.42.1", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", + "libp2p-swarm 0.42.2", "log", "quick-protobuf", "rand 0.8.5", - "serde", "sha2 0.10.6", "smallvec", "thiserror", @@ -5211,15 +5205,16 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", "futures", "if-watch", - "libp2p-core 0.38.0", - "libp2p-swarm 0.41.1", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", + "libp2p-swarm 0.42.2", "log", "rand 0.8.5", "smallvec", @@ -5238,7 +5233,7 @@ dependencies = [ "futures", "if-watch", "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "libp2p-swarm 0.42.1", "log", "rand 0.8.5", @@ -5251,16 +5246,16 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55" +checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" dependencies = [ - "libp2p-core 0.38.0", - "libp2p-identify 0.41.1", - "libp2p-kad 0.42.1", - "libp2p-ping 0.41.0", - "libp2p-swarm 0.41.1", - "prometheus-client 0.18.1", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identify 0.42.2", + "libp2p-kad 0.43.3", + "libp2p-ping 0.42.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-swarm 0.42.2", + "prometheus-client", ] [[package]] @@ -5271,45 +5266,26 @@ dependencies = [ "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "libp2p-gossipsub", "libp2p-identify 0.42.1", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "libp2p-kad 0.43.2", - "libp2p-ping 0.42.0", + "libp2p-ping 0.42.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "libp2p-swarm 0.42.1", - "prometheus-client 0.19.0", -] - -[[package]] -name = "libp2p-mplex" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core 0.38.0", - "log", - "nohash-hasher", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec", - "unsigned-varint", + "prometheus-client", ] [[package]] name = "libp2p-noise" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a978cb57efe82e892ec6f348a536bfbd9fee677adbe5689d7a93ad3a9bffbf2e" +version = "0.42.1" +source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "libp2p-core 0.38.0", + "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "log", "once_cell", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", "sha2 0.10.6", "snow", @@ -5321,14 +5297,15 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.42.1" -source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", "log", "once_cell", "quick-protobuf", @@ -5343,15 +5320,16 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "929fcace45a112536e22b3dcfd4db538723ef9c3cb79f672b98be2cc8e25f37f" +checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ + "either", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", - "libp2p-swarm 0.41.1", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-swarm 0.42.2", "log", "rand 0.8.5", "void", @@ -5367,7 +5345,7 @@ dependencies = [ "futures-timer", "instant", "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "libp2p-swarm 0.42.1", "log", "rand 0.8.5", @@ -5376,15 +5354,16 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.7.0-alpha" +version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", "libp2p-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log", "parking_lot 0.12.1", @@ -5405,7 +5384,7 @@ dependencies = [ "futures-timer", "if-watch", "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "libp2p-tls 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "log", "parking_lot 0.12.1", @@ -5418,72 +5397,69 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" +version = "0.24.0" +source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" dependencies = [ "async-trait", - "bytes", "futures", "instant", - "libp2p-core 0.38.0", - "libp2p-swarm 0.41.1", - "log", + "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", + "libp2p-swarm 0.42.1", "rand 0.8.5", "smallvec", - "unsigned-varint", ] [[package]] name = "libp2p-request-response" -version = "0.24.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", "futures", "instant", - "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-swarm 0.42.1", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", + "libp2p-swarm 0.42.2", "rand 0.8.5", "smallvec", ] [[package]] name = "libp2p-swarm" -version = "0.41.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a35472fe3276b3855c00f1c032ea8413615e030256429ad5349cdf67c6e1a0" +version = "0.42.1" +source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" dependencies = [ "either", "fnv", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", - "libp2p-swarm-derive 0.31.0", + "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", + "libp2p-swarm-derive 0.32.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "log", - "pin-project", "rand 0.8.5", "smallvec", - "thiserror", "tokio", "void", ] [[package]] name = "libp2p-swarm" -version = "0.42.1" -source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ "either", "fnv", "futures", "futures-timer", "instant", - "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-swarm-derive 0.32.0", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", + "libp2p-swarm-derive 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "log", "rand 0.8.5", "smallvec", @@ -5493,9 +5469,9 @@ dependencies = [ [[package]] name = "libp2p-swarm-derive" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" +checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ "heck", "quote", @@ -5509,20 +5485,20 @@ source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa dependencies = [ "heck", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] name = "libp2p-tcp" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ "futures", "futures-timer", "if-watch", "libc", - "libp2p-core 0.38.0", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", "log", "socket2", "tokio", @@ -5538,7 +5514,7 @@ dependencies = [ "if-watch", "libc", "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "log", "socket2", "tokio", @@ -5553,7 +5529,7 @@ dependencies = [ "futures", "futures-rustls", "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-identity 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", "rcgen 0.10.0", "ring", "rustls 0.20.8", @@ -5571,7 +5547,7 @@ dependencies = [ "futures", "futures-rustls", "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "rcgen 0.10.0", "ring", "rustls 0.20.8", @@ -5583,13 +5559,13 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb1a35299860e0d4b3c02a3e74e3b293ad35ae0cee8a056363b0c862d082069" +checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ "futures", "js-sys", - "libp2p-core 0.38.0", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -5597,9 +5573,9 @@ dependencies = [ [[package]] name = "libp2p-webrtc" -version = "0.4.0-alpha" +version = "0.4.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" +checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" dependencies = [ "async-trait", "asynchronous-codec", @@ -5608,13 +5584,13 @@ dependencies = [ "futures-timer", "hex", "if-watch", - "libp2p-core 0.38.0", - "libp2p-noise 0.41.0", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identity 0.1.2", + "libp2p-noise 0.42.2", "log", - "multihash 0.16.3", - "prost", - "prost-build", - "prost-codec", + "multihash 0.17.0", + "quick-protobuf", + "quick-protobuf-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.8.5", "rcgen 0.9.3", "serde", @@ -5639,12 +5615,12 @@ dependencies = [ "hex", "if-watch", "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "libp2p-noise 0.42.1", "log", "multihash 0.17.0", "quick-protobuf", - "quick-protobuf-codec", + "quick-protobuf-codec 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "rand 0.8.5", "rcgen 0.9.3", "serde", @@ -5659,14 +5635,14 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.40.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d705506030d5c0aaf2882437c70dab437605f21c5f9811978f694e6917a3b54" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ "either", "futures", "futures-rustls", - "libp2p-core 0.38.0", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", "log", "parking_lot 0.12.1", "quicksink", @@ -5685,7 +5661,7 @@ dependencies = [ "futures", "futures-rustls", "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", - "libp2p-identity 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-identity 0.1.1", "log", "parking_lot 0.12.1", "quicksink", @@ -5697,25 +5673,24 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29" +version = "0.43.0" +source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "log", - "parking_lot 0.12.1", "thiserror", "yamux", ] [[package]] name = "libp2p-yamux" -version = "0.43.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d#3c5940aeadb9ed8527b6f7aa158797359085293d" +version = "0.43.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ "futures", - "libp2p-core 0.39.1 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", + "libp2p-core 0.39.1 (registry+https://github.com/rust-lang/crates.io-index)", "log", "thiserror", "yamux", @@ -5769,6 +5744,17 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "libsqlite3-sys" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + [[package]] name = "libz-sys" version = "1.1.8" @@ -5924,6 +5910,53 @@ dependencies = [ "libc", ] +[[package]] +name = "macro_magic" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a2d6d7fe4741b5621cf7c8048e472933877c7ea870cbf1420da55ea9f3bb08c" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "macro_magic_core" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3005604258419767cacc5989c2dd75263f8b33773dd680734f598eb88baf5370" +dependencies = [ + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de6267819c9042df1a9e62ca279e5a34254ad5dfdcb13ff988f560d75576e8b4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "macro_magic_macros" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc7176ac15ab2ed7f335e2398f729b9562dae0c233705bc1e1e3acd8452d403d" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.18", +] + [[package]] name = "match_cfg" version = "0.1.0" @@ -6023,12 +6056,6 @@ dependencies = [ "hash-db 0.16.0", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -6041,18 +6068,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "milagro_bls" -version = "1.5.0" -source = "git+https://github.com/Snowfork/milagro_bls#bc2b5b5e8d48b7e2e1bfaa56dc2d93e13cb32095" -dependencies = [ - "amcl", - "hex", - "lazy_static", - "rand 0.8.5", - "zeroize", -] - [[package]] name = "mime" version = "0.3.17" @@ -6113,24 +6128,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "multiaddr" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aebdb21e90f81d13ed01dc84123320838e53963c2ca94b60b305d3fa64f31e" -dependencies = [ - "arrayref", - "byteorder", - "data-encoding", - "multibase", - "multihash 0.16.3", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint", - "url", -] - [[package]] name = "multiaddr" version = "0.17.1" @@ -6276,6 +6273,24 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "netlink-packet-core" version = "0.4.2" @@ -6484,35 +6499,23 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.11" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.11" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "object" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" -dependencies = [ - "crc32fast", - "hashbrown 0.12.3", - "indexmap", - "memchr", + "syn 2.0.18", ] [[package]] @@ -6521,6 +6524,9 @@ version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ + "crc32fast", + "hashbrown 0.13.2", + "indexmap", "memchr", ] @@ -6570,12 +6576,50 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "openssl" +version = "0.10.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69b3f656a17a6cbc115b5c7a40c616947d213ba182135b014d6051b73ab6f019" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-sys" +version = "0.9.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "orml-vesting" version = "0.4.1-dev" @@ -6633,13 +6677,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" dependencies = [ "cfg-if", - "libm 0.1.4", + "libm", ] [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-support", "frame-system", @@ -6653,7 +6697,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6666,7 +6710,7 @@ dependencies = [ "scale-info", "sp-application-crypto", "sp-consensus-babe", - "sp-consensus-vrf", + "sp-core", "sp-io", "sp-runtime", "sp-session", @@ -6677,7 +6721,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6692,7 +6736,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "fp-evm", "frame-support", @@ -6706,7 +6750,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-support", "frame-system", @@ -6725,9 +6769,9 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "binary-merkle-tree", "frame-support", "frame-system", @@ -6792,7 +6836,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "ethereum", "ethereum-types", @@ -6815,7 +6859,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "environmental", "evm", @@ -6825,6 +6869,7 @@ dependencies = [ "frame-support", "frame-system", "hex", + "hex-literal", "impl-trait-for-tuples", "log", "parity-scale-codec", @@ -6839,7 +6884,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "frame-support", "frame-system", @@ -6850,7 +6895,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "fp-evm", "num", @@ -6859,16 +6904,16 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "fp-evm", - "tiny-keccak 2.0.2", + "tiny-keccak", ] [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier/?rev=e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b#e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" +source = "git+https://github.com/subspace/frontier?rev=c13d670b25b5506c1c5243f352941dc46c82ffe4#c13d670b25b5506c1c5243f352941dc46c82ffe4" dependencies = [ "fp-evm", "ripemd", @@ -6959,7 +7004,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-benchmarking", "frame-support", @@ -7020,6 +7065,21 @@ dependencies = [ "subspace-runtime-primitives", ] +[[package]] +name = "pallet-root-testing" +version = "1.0.0-dev" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-runtime-configs" version = "0.1.0" @@ -7034,7 +7094,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-support", "frame-system", @@ -7104,8 +7164,9 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -7118,7 +7179,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-benchmarking", "frame-support", @@ -7147,7 +7208,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-support", "frame-system", @@ -7163,7 +7224,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7179,7 +7240,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7210,7 +7271,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-benchmarking", "frame-support", @@ -7223,17 +7284,11 @@ dependencies = [ "sp-std", ] -[[package]] -name = "parity-bytes" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" - [[package]] name = "parity-db" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00bfb81cf5c90a222db2fb7b3a7cbf8cc7f38dfb6647aca4d98edf8281f56ed5" +checksum = "4890dcb9556136a4ec2b0c51fa4a08c8b733b829506af8fff2e853f3a065985b" dependencies = [ "blake2", "crc32fast", @@ -7342,6 +7397,12 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "partial_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" + [[package]] name = "paste" version = "1.0.12" @@ -7420,7 +7481,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] @@ -7508,12 +7569,6 @@ version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" -[[package]] -name = "platforms" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" - [[package]] name = "platforms" version = "3.0.2" @@ -7666,7 +7721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ "thiserror", - "toml", + "toml 0.5.11", ] [[package]] @@ -7693,11 +7748,22 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-warning" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70550716265d1ec349c41f70dd4f964b4fd88394efe4405f0c1da679c4799a07" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] @@ -7716,18 +7782,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "prometheus-client" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" -dependencies = [ - "dtoa", - "itoa", - "parking_lot 0.12.1", - "prometheus-client-derive-text-encode", -] - [[package]] name = "prometheus-client" version = "0.19.0" @@ -7751,17 +7805,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "prometheus-client-derive-text-encode" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "prost" version = "0.11.9" @@ -7794,19 +7837,6 @@ dependencies = [ "which", ] -[[package]] -name = "prost-codec" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0" -dependencies = [ - "asynchronous-codec", - "bytes", - "prost", - "thiserror", - "unsigned-varint", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -7853,6 +7883,19 @@ dependencies = [ "byteorder", ] +[[package]] +name = "quick-protobuf-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +dependencies = [ + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint", +] + [[package]] name = "quick-protobuf-codec" version = "0.1.0" @@ -7896,9 +7939,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] @@ -8088,14 +8131,14 @@ checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] name = "regalloc2" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" dependencies = [ "fxhash", "log", @@ -8129,18 +8172,6 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" -[[package]] -name = "region" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" -dependencies = [ - "bitflags", - "libc", - "mach", - "winapi", -] - [[package]] name = "resolv-conf" version = "0.7.0" @@ -8391,6 +8422,18 @@ dependencies = [ "webpki 0.22.0", ] +[[package]] +name = "rustls" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e32ca28af694bc1bbf399c33a516dbdf1c90090b8ab23c2bc24f834aa2247f5f" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct 0.7.0", +] + [[package]] name = "rustls-native-certs" version = "0.6.2" @@ -8476,7 +8519,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "log", "sp-core", @@ -8487,7 +8530,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "futures", "futures-timer", @@ -8510,7 +8553,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8525,7 +8568,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -8544,25 +8587,25 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "chrono", - "clap 4.2.2", + "clap 4.3.4", "fdlimit", "futures", - "libp2p 0.50.1", + "libp2p-identity 0.1.2", "log", "names", "parity-scale-codec", @@ -8595,7 +8638,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "fnv", "futures", @@ -8614,6 +8657,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-state-machine", + "sp-statement-store", "sp-storage", "substrate-prometheus-endpoint", ] @@ -8621,7 +8665,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -8646,12 +8690,12 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p 0.50.1", + "libp2p-identity 0.1.2", "log", "mockall", "parking_lot 0.12.1", @@ -8686,7 +8730,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", "futures", @@ -8778,13 +8822,12 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "lru 0.8.1", + "lru 0.10.0", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", - "sc-executor-wasmi", "sc-executor-wasmtime", "sp-api", "sp-core", @@ -8796,39 +8839,24 @@ dependencies = [ "sp-version", "sp-wasm-interface", "tracing", - "wasmi", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", "sp-wasm-interface", "thiserror", "wasm-instrument", - "wasmi", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" -dependencies = [ - "log", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "anyhow", "cfg-if", @@ -8846,7 +8874,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "ansi_term", "futures", @@ -8862,10 +8890,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", - "async-trait", + "array-bytes 4.2.0", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -8877,9 +8904,9 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "async-channel", "async-trait", "asynchronous-codec", @@ -8889,24 +8916,25 @@ dependencies = [ "futures", "futures-timer", "ip_network", - "libp2p 0.50.1", + "libp2p 0.51.3 (registry+https://github.com/rust-lang/crates.io-index)", "linked_hash_set", "log", - "lru 0.8.1", + "lru 0.10.0", "mockall", "parity-scale-codec", "parking_lot 0.12.1", + "partial_sort", "pin-project", "rand 0.8.5", "sc-block-builder", "sc-client-api", "sc-consensus", "sc-network-common", - "sc-peerset", "sc-utils", "serde", "serde_json", "smallvec", + "snow", "sp-arithmetic", "sp-blockchain", "sp-consensus", @@ -8915,17 +8943,19 @@ dependencies = [ "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", + "wasm-timer", "zeroize", ] [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ + "async-channel", "cid", "futures", - "libp2p 0.50.1", + "libp2p-identity 0.1.2", "log", "prost", "prost-build", @@ -8941,19 +8971,18 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "async-trait", "bitflags", "bytes", "futures", "futures-timer", - "libp2p 0.50.1", + "libp2p-identity 0.1.2", "parity-scale-codec", "prost-build", "sc-consensus", - "sc-peerset", "sc-utils", "serde", "smallvec", @@ -8969,17 +8998,16 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "ahash 0.8.3", "futures", "futures-timer", - "libp2p 0.50.1", + "libp2p 0.51.3 (registry+https://github.com/rust-lang/crates.io-index)", "log", - "lru 0.8.1", + "lru 0.10.0", "sc-network", "sc-network-common", - "sc-peerset", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -8988,11 +9016,12 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", + "async-channel", "futures", - "libp2p 0.50.1", + "libp2p-identity 0.1.2", "log", "parity-scale-codec", "prost", @@ -9000,7 +9029,6 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", - "sc-peerset", "sp-blockchain", "sp-core", "sp-runtime", @@ -9010,16 +9038,17 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", + "async-channel", "async-trait", "fork-tree", "futures", "futures-timer", - "libp2p 0.50.1", + "libp2p 0.51.3 (registry+https://github.com/rust-lang/crates.io-index)", "log", - "lru 0.8.1", + "lru 0.10.0", "mockall", "parity-scale-codec", "prost", @@ -9028,7 +9057,6 @@ dependencies = [ "sc-consensus", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", "smallvec", "sp-arithmetic", @@ -9044,17 +9072,15 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "futures", - "libp2p 0.50.1", + "libp2p 0.51.3 (registry+https://github.com/rust-lang/crates.io-index)", "log", "parity-scale-codec", - "pin-project", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", "sp-consensus", "sp-runtime", @@ -9064,16 +9090,16 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "bytes", "fnv", "futures", "futures-timer", "hyper", - "hyper-rustls", - "libp2p 0.50.1", + "hyper-rustls 0.24.0", + "libp2p 0.51.3 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus", "once_cell", "parity-scale-codec", @@ -9082,7 +9108,6 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", "sp-api", "sp-core", @@ -9092,23 +9117,10 @@ dependencies = [ "tracing", ] -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" -dependencies = [ - "futures", - "libp2p 0.50.1", - "log", - "sc-utils", - "serde_json", - "wasm-timer", -] - [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9117,7 +9129,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "futures", "jsonrpsee", @@ -9140,6 +9152,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", + "sp-statement-store", "sp-version", "tokio", ] @@ -9147,7 +9160,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9166,7 +9179,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "http", "jsonrpsee", @@ -9181,9 +9194,9 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "futures", "futures-util", "hex", @@ -9207,7 +9220,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", "directories", @@ -9273,7 +9286,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "log", "parity-scale-codec", @@ -9284,9 +9297,9 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "clap 4.2.2", + "clap 4.3.4", "fs4", "futures", "log", @@ -9301,6 +9314,7 @@ dependencies = [ name = "sc-subspace-block-relay" version = "0.1.0" dependencies = [ + "async-channel", "async-trait", "futures", "lru 0.10.0", @@ -9332,7 +9346,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "futures", "libc", @@ -9351,11 +9365,11 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "chrono", "futures", - "libp2p 0.50.1", + "libp2p 0.51.3 (registry+https://github.com/rust-lang/crates.io-index)", "log", "parking_lot 0.12.1", "pin-project", @@ -9370,7 +9384,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "ansi_term", "atty", @@ -9401,25 +9415,24 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", "futures", "futures-timer", "linked-hash-map", "log", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -9439,7 +9452,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", "futures", @@ -9447,6 +9460,7 @@ dependencies = [ "parity-scale-codec", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -9454,7 +9468,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-channel", "futures", @@ -9468,9 +9482,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.5.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cfdffd972d76b22f3d7f81c8be34b2296afd3a25e0a547bd9abe340a4dbbe97" +checksum = "b569c32c806ec3abdf3b5869fb8bf1e0d275a7c1c9b0b05603d9464632649edf" dependencies = [ "bitvec", "cfg-if", @@ -9482,9 +9496,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fa974aea2d63dd18a4ec3a49d59af9f34178c73a4f56d2f18205628d00681e" +checksum = "53012eae69e5aa5c14671942a5dd47de59d4cdcff8532a6dd0e081faf1119482" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9684,9 +9698,9 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.160" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" dependencies = [ "serde_derive", ] @@ -9711,13 +9725,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] @@ -9731,6 +9745,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -9924,89 +9947,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "snowbridge-beacon-primitives" -version = "0.0.1" -source = "git+https://github.com/Snowfork/snowbridge?rev=cac98d860b8f24a9c3a3eabb5bcbee8dc2880960#cac98d860b8f24a9c3a3eabb5bcbee8dc2880960" -dependencies = [ - "frame-support", - "frame-system", - "hex", - "parity-scale-codec", - "rlp", - "scale-info", - "serde", - "snowbridge-ethereum", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "snowbridge-core" -version = "0.1.1" -source = "git+https://github.com/Snowfork/snowbridge?rev=cac98d860b8f24a9c3a3eabb5bcbee8dc2880960#cac98d860b8f24a9c3a3eabb5bcbee8dc2880960" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "snowbridge-ethereum", - "sp-core", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "snowbridge-ethereum" -version = "0.1.0" -source = "git+https://github.com/Snowfork/snowbridge?rev=cac98d860b8f24a9c3a3eabb5bcbee8dc2880960#cac98d860b8f24a9c3a3eabb5bcbee8dc2880960" -dependencies = [ - "ethabi-decode", - "ethbloom", - "ethereum-types", - "hex-literal", - "parity-bytes", - "parity-scale-codec", - "rlp", - "rustc-hex", - "scale-info", - "serde", - "serde-big-array", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "snowbridge-ethereum-beacon-client" -version = "0.0.1" -source = "git+https://github.com/Snowfork/snowbridge?rev=cac98d860b8f24a9c3a3eabb5bcbee8dc2880960#cac98d860b8f24a9c3a3eabb5bcbee8dc2880960" -dependencies = [ - "byte-slice-cast", - "frame-benchmarking", - "frame-support", - "frame-system", - "hex-literal", - "milagro_bls", - "parity-scale-codec", - "rlp", - "scale-info", - "serde", - "snowbridge-beacon-primitives", - "snowbridge-core", - "snowbridge-ethereum", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "ssz-rs", - "ssz-rs-derive", -] - [[package]] name = "socket2" version = "0.4.9" @@ -10037,13 +9977,15 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "hash-db 0.16.0", "log", "parity-scale-codec", + "scale-info", "sp-api-proc-macro", "sp-core", + "sp-metadata-ir", "sp-runtime", "sp-state-machine", "sp-std", @@ -10055,7 +9997,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "Inflector", "blake2", @@ -10063,13 +10005,13 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "23.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "parity-scale-codec", "scale-info", @@ -10081,8 +10023,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "16.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "integer-sqrt", "num-traits", @@ -10096,7 +10038,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "parity-scale-codec", "sp-api", @@ -10108,11 +10050,11 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "futures", "log", - "lru 0.8.1", + "lru 0.10.0", "parity-scale-codec", "parking_lot 0.12.1", "sp-api", @@ -10126,7 +10068,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", "futures", @@ -10141,7 +10083,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", "parity-scale-codec", @@ -10159,10 +10101,9 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", - "merlin", "parity-scale-codec", "scale-info", "serde", @@ -10170,7 +10111,6 @@ dependencies = [ "sp-application-crypto", "sp-consensus", "sp-consensus-slots", - "sp-consensus-vrf", "sp-core", "sp-inherents", "sp-keystore", @@ -10182,7 +10122,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "lazy_static", "parity-scale-codec", @@ -10201,7 +10141,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "finality-grandpa", "log", @@ -10219,7 +10159,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "parity-scale-codec", "scale-info", @@ -10256,25 +10196,12 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sp-consensus-vrf" -version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" -dependencies = [ - "parity-scale-codec", - "scale-info", - "schnorrkel", - "sp-core", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "21.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "bitflags", "blake2", "bounded-collections", @@ -10291,6 +10218,7 @@ dependencies = [ "merlin", "parity-scale-codec", "parking_lot 0.12.1", + "paste", "primitive-types", "rand 0.8.5", "regex", @@ -10314,8 +10242,8 @@ dependencies = [ [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "9.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "blake2b_simd", "byteorder", @@ -10328,19 +10256,19 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "9.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10348,12 +10276,12 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "8.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -10372,11 +10300,9 @@ name = "sp-domains" version = "0.1.0" dependencies = [ "blake2", - "merlin", "parity-scale-codec", "rs_merkle", "scale-info", - "schnorrkel", "serde", "sp-api", "sp-application-crypto", @@ -10404,8 +10330,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "0.19.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "environmental", "parity-scale-codec", @@ -10416,7 +10342,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10430,8 +10356,8 @@ dependencies = [ [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "23.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "bytes", "ed25519", @@ -10456,8 +10382,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "7.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "24.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "lazy_static", "sp-core", @@ -10467,14 +10393,12 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "0.27.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "futures", - "merlin", "parity-scale-codec", "parking_lot 0.12.1", - "schnorrkel", "serde", "sp-core", "sp-externalities", @@ -10508,10 +10432,10 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "thiserror", - "zstd 0.11.2+zstd.1.5.2", + "zstd 0.12.3+zstd.1.5.2", ] [[package]] @@ -10530,10 +10454,21 @@ dependencies = [ "sp-trie", ] +[[package]] +name = "sp-metadata-ir" +version = "0.1.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std", +] + [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10561,7 +10496,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "sp-api", "sp-core", @@ -10570,8 +10505,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "8.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "backtrace", "lazy_static", @@ -10581,7 +10516,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "rustc-hash", "serde", @@ -10590,8 +10525,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "24.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "either", "hash256-std-hasher", @@ -10612,8 +10547,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "17.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10630,20 +10565,20 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "11.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "parity-scale-codec", "scale-info", @@ -10669,10 +10604,11 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "parity-scale-codec", "scale-info", + "serde", "sp-core", "sp-runtime", "sp-std", @@ -10680,8 +10616,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "0.28.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "hash-db 0.16.0", "log", @@ -10698,15 +10634,33 @@ dependencies = [ "tracing", ] +[[package]] +name = "sp-statement-store" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "thiserror", +] + [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "8.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "13.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10719,7 +10673,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", "futures-timer", @@ -10733,8 +10687,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "10.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "parity-scale-codec", "sp-std", @@ -10746,7 +10700,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "sp-api", "sp-runtime", @@ -10755,7 +10709,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "async-trait", "log", @@ -10770,8 +10724,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "22.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "ahash 0.8.3", "hash-db 0.16.0", @@ -10793,8 +10747,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "22.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10810,33 +10764,32 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "8.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "14.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", "sp-std", - "wasmi", "wasmtime", ] [[package]] name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +version = "20.0.0" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "parity-scale-codec", "scale-info", @@ -10884,40 +10837,140 @@ dependencies = [ ] [[package]] -name = "ss58-registry" -version = "1.39.0" +name = "sqlformat" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecf0bd63593ef78eca595a7fc25e9a443ca46fe69fd472f8f09f5245cdcd769d" +checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" dependencies = [ - "Inflector", - "num-format", + "itertools", + "nom", + "unicode_categories", +] + +[[package]] +name = "sqlx" +version = "0.7.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afd8985c8822235a9ebeedf0bff971462470162759663d3184593c807ab6e898" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.7.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c12403de02d88e6808de30eb2153c6997d39cc9511a446b510d5944a3ea6727" +dependencies = [ + "ahash 0.7.6", + "atoi", + "bitflags", + "byteorder", + "bytes", + "crc", + "crossbeam-queue", + "dotenvy", + "either", + "event-listener", + "futures-channel", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashlink", + "hex", + "indexmap", + "log", + "memchr", + "native-tls", + "once_cell", + "paste", + "percent-encoding", + "serde", + "sha2 0.10.6", + "smallvec", + "sqlformat", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "url", +] + +[[package]] +name = "sqlx-macros" +version = "0.7.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2be74801a0852ace9d86bc8cc8ac36241e7dc712fea26b8f32bd80ce29c98a10" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 1.0.109", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.7.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ce71dd8afc7ad2aeff001bb6affa7128c9087bbdcab07fa97a7952e8ee3d1da" +dependencies = [ + "dotenvy", + "either", + "heck", + "hex", + "once_cell", "proc-macro2", "quote", "serde", "serde_json", - "unicode-xid", + "sha2 0.10.6", + "sqlx-core", + "sqlx-sqlite", + "syn 1.0.109", + "tempfile", + "tokio", + "url", ] [[package]] -name = "ssz-rs" -version = "0.8.0" -source = "git+https://github.com/ralexstokes/ssz-rs?rev=d18af912abacbf84219be37ab3b42a9abcf10d2a#d18af912abacbf84219be37ab3b42a9abcf10d2a" +name = "sqlx-sqlite" +version = "0.7.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f446c04b2d2d06b49b905e33c877b282e0f70b1b60a22513eacee8bf56d8afbe" dependencies = [ - "bitvec", - "num-bigint", - "sha2 0.9.9", - "ssz-rs-derive", - "thiserror", + "atoi", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "sqlx-core", + "tracing", + "url", ] [[package]] -name = "ssz-rs-derive" -version = "0.8.0" -source = "git+https://github.com/ralexstokes/ssz-rs?rev=d18af912abacbf84219be37ab3b42a9abcf10d2a#d18af912abacbf84219be37ab3b42a9abcf10d2a" +name = "ss58-registry" +version = "1.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecf0bd63593ef78eca595a7fc25e9a443ca46fe69fd472f8f09f5245cdcd769d" dependencies = [ + "Inflector", + "num-format", "proc-macro2", "quote", - "syn 1.0.109", + "serde", + "serde_json", + "unicode-xid", ] [[package]] @@ -11084,7 +11137,7 @@ dependencies = [ "base58", "blake2", "bytesize", - "clap 4.2.2", + "clap 4.3.4", "derive_more", "dirs", "event-listener-primitives", @@ -11206,20 +11259,20 @@ dependencies = [ "bytes", "bytesize", "chrono", - "clap 4.2.2", + "clap 4.3.4", "derive_more", "either", "event-listener-primitives", "futures", "hex", - "libp2p 0.51.3", + "libp2p 0.51.3 (git+https://github.com/libp2p/rust-libp2p?rev=3c5940aeadb9ed8527b6f7aa158797359085293d)", "lru 0.10.0", "nohash-hasher", "parity-db", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "prometheus-client 0.19.0", + "prometheus-client", "rand 0.8.5", "serde", "serde_json", @@ -11238,8 +11291,7 @@ name = "subspace-node" version = "0.1.0" dependencies = [ "bytesize", - "clap 4.2.2", - "core-eth-relay-runtime", + "clap 4.3.4", "core-evm-runtime", "core-payments-domain-runtime", "cross-domain-message-gossip", @@ -11386,6 +11438,7 @@ name = "subspace-service" version = "0.1.0" dependencies = [ "async-trait", + "cross-domain-message-gossip", "derive_more", "domain-block-preprocessor", "domain-runtime-primitives", @@ -11512,6 +11565,7 @@ dependencies = [ "scale-info", "sp-api", "sp-block-builder", + "sp-consensus-slots", "sp-consensus-subspace", "sp-core", "sp-domains", @@ -11647,15 +11701,15 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "platforms 2.0.0", + "platforms", ] [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11674,7 +11728,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "hyper", "log", @@ -11686,9 +11740,9 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "async-trait", "futures", "parity-scale-codec", @@ -11712,16 +11766,20 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ - "cfg-if", + "array-bytes 6.1.0", + "frame-executive", "frame-support", "frame-system", "frame-system-rpc-runtime-api", "log", "memory-db", "pallet-babe", + "pallet-balances", "pallet-beefy-mmr", + "pallet-root-testing", + "pallet-sudo", "pallet-timestamp", "parity-scale-codec", "sc-service", @@ -11735,6 +11793,7 @@ dependencies = [ "sp-consensus-beefy", "sp-consensus-grandpa", "sp-core", + "sp-debug-derive", "sp-externalities", "sp-inherents", "sp-io", @@ -11755,7 +11814,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "futures", "parity-scale-codec", @@ -11775,7 +11834,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11785,27 +11844,28 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/subspace/substrate?rev=88bb945975301f9b29bad96dc4590c33f1029eae#88bb945975301f9b29bad96dc4590c33f1029eae" +source = "git+https://github.com/subspace/substrate?rev=28e33f78a3aa8ac4c6753108bc0471273ff6bf6f#28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", + "parity-wasm", "sp-maybe-compressed-blob", "strum", "tempfile", - "toml", + "toml 0.7.4", "walkdir", "wasm-opt", ] @@ -11838,9 +11898,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", @@ -12044,7 +12104,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] @@ -12129,15 +12189,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "tiny-keccak" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" -dependencies = [ - "crunchy", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -12174,9 +12225,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.27.0" +version = "1.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" +checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" dependencies = [ "autocfg", "bytes", @@ -12188,18 +12239,18 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] @@ -12213,6 +12264,16 @@ dependencies = [ "webpki 0.22.0", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.2", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.12" @@ -12249,6 +12310,40 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -12262,9 +12357,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.5" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" dependencies = [ "bitflags", "bytes", @@ -12572,6 +12667,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + [[package]] name = "unicode-width" version = "0.1.10" @@ -12584,6 +12685,12 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + [[package]] name = "universal-hash" version = "0.4.1" @@ -12802,9 +12909,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" +checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" dependencies = [ "anyhow", "libc", @@ -12818,9 +12925,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4" +checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" dependencies = [ "anyhow", "cxx", @@ -12830,15 +12937,14 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7" +checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" dependencies = [ "anyhow", "cc", "cxx", "cxx-build", - "regex", ] [[package]] @@ -12856,45 +12962,11 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wasmi" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" -dependencies = [ - "parity-wasm", - "wasmi-validation", - "wasmi_core", -] - -[[package]] -name = "wasmi-validation" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] - -[[package]] -name = "wasmi_core" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" -dependencies = [ - "downcast-rs", - "libm 0.2.6", - "memory_units", - "num-rational", - "num-traits", - "region", -] - [[package]] name = "wasmparser" -version = "0.100.0" +version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ "indexmap", "url", @@ -12902,9 +12974,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "6.0.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e89f9819523447330ffd70367ef4a18d8c832e24e8150fe054d1d912841632" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ "anyhow", "bincode", @@ -12912,7 +12984,7 @@ dependencies = [ "indexmap", "libc", "log", - "object 0.29.0", + "object", "once_cell", "paste", "psm", @@ -12925,26 +12997,26 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-asm-macros" -version = "6.0.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd3a5e46c198032da934469f3a6e48649d1f9142438e4fd4617b68a35644b8a" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "6.0.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b389ae9b678b9c3851091a4804f4182d688d27aff7abc9aa37fa7be37d8ecffa" +checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.13.1", + "base64 0.21.0", "bincode", "directories-next", "file-per-thread-logger", @@ -12952,16 +13024,16 @@ dependencies = [ "rustix 0.36.12", "serde", "sha2 0.10.6", - "toml", - "windows-sys 0.42.0", + "toml 0.5.11", + "windows-sys 0.45.0", "zstd 0.11.2+zstd.1.5.2", ] [[package]] name = "wasmtime-cranelift" -version = "6.0.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b2c92a08c0db6efffd88fdc97d7aa9c7c63b03edb0971dbca745469f820e8c" +checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", @@ -12969,27 +13041,43 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.2", + "gimli", "log", - "object 0.29.0", + "object", "target-lexicon", "thiserror", "wasmparser", + "wasmtime-cranelift-shared", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-native", + "gimli", + "object", + "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "6.0.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a6db9fc52985ba06ca601f2ff0ff1f526c5d724c7ac267b47326304b0c97883" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.2", + "gimli", "indexmap", "log", - "object 0.29.0", + "object", "serde", "target-lexicon", "thiserror", @@ -12999,18 +13087,18 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "6.0.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b77e3a52cd84d0f7f18554afa8060cfe564ccac61e3b0802d3fd4084772fa5f6" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line 0.17.0", + "addr2line", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.26.2", + "gimli", "log", - "object 0.29.0", + "object", "rustc-demangle", "serde", "target-lexicon", @@ -13018,36 +13106,36 @@ dependencies = [ "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-jit-debug" -version = "6.0.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "object 0.29.0", + "object", "once_cell", "rustix 0.36.12", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "6.0.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67d412e9340ab1c83867051d8d1d7c90aa8c9afc91da086088068e2734e25064" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" dependencies = [ "cfg-if", "libc", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-runtime" -version = "6.0.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d594e791b5fdd4dbaf8cf7ae62f2e4ff85018ce90f483ca6f42947688e48827d" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ "anyhow", "cc", @@ -13057,21 +13145,21 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.6.5", + "memoffset 0.8.0", "paste", "rand 0.8.5", "rustix 0.36.12", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-types" -version = "6.0.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6688d6f96d4dbc1f89fab626c56c1778936d122b5f4ae7a57c2eb42b8d982e2" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ "cranelift-entity", "serde", @@ -13596,6 +13684,15 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "winnow" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" @@ -13730,7 +13827,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.18", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index aee07374d4..be484c9189 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,7 +72,6 @@ subspace-farmer-components = { opt-level = 3 } subspace-proof-of-space = { opt-level = 3 } twox-hash = { opt-level = 3 } uint = { opt-level = 3 } -wasmi = { opt-level = 3 } x25519-dalek = { opt-level = 3 } yamux = { opt-level = 3 } zeroize = { opt-level = 3 } @@ -89,31 +88,32 @@ codegen-units = 1 # Reason: We need to patch substrate dependency of snowfork and frontier libraries to our fork # TODO: Remove when we are using upstream substrate instead of fork [patch."https://github.com/paritytech/substrate.git"] -frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-client-db = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-database = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-externalities = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-state-machine = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-storage = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-trie = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -substrate-prometheus-endpoint = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-client-db = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-database = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-storage = { version = "13.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-trie = { version = "22.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +substrate-prometheus-endpoint = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } diff --git a/crates/pallet-domains/Cargo.toml b/crates/pallet-domains/Cargo.toml index 88b15f1444..723fab0b29 100644 --- a/crates/pallet-domains/Cargo.toml +++ b/crates/pallet-domains/Cargo.toml @@ -13,20 +13,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } log = { version = "0.4.17", default-features = false } pallet-settlement = { version = "0.1.0", default-features = false, path = "../pallet-settlement" } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [dev-dependencies] -sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-trie = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-trie = { version = "22.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/crates/pallet-feeds/Cargo.toml b/crates/pallet-feeds/Cargo.toml index ff050278c5..060a76a11f 100644 --- a/crates/pallet-feeds/Cargo.toml +++ b/crates/pallet-feeds/Cargo.toml @@ -14,18 +14,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } [dev-dependencies] serde = "1.0.159" -sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/crates/pallet-grandpa-finality-verifier/Cargo.toml b/crates/pallet-grandpa-finality-verifier/Cargo.toml index d783299149..20262b77de 100644 --- a/crates/pallet-grandpa-finality-verifier/Cargo.toml +++ b/crates/pallet-grandpa-finality-verifier/Cargo.toml @@ -14,23 +14,23 @@ codec = { package = "parity-scale-codec", version = "3.4.0", default-features = finality-grandpa = { version = "0.16.1", default-features = false } log = { version = "0.4.17", default-features = false } num-traits = { version = "0.2.15", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } serde = { version = "1.0.159", optional = true } # Substrate Dependencies -frame-support = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -frame-system = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-consensus-grandpa = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-core = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-runtime = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-std = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-trie = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } +frame-support = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +frame-system = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-core = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-runtime = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-std = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-trie = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } [dev-dependencies] ed25519-dalek = { version = "1.0", default-features = false, features = ["u64_backend"] } -sp-io = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-application-crypto = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-io = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-application-crypto = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/crates/pallet-object-store/Cargo.toml b/crates/pallet-object-store/Cargo.toml index 2379732fdc..924f3ca068 100644 --- a/crates/pallet-object-store/Cargo.toml +++ b/crates/pallet-object-store/Cargo.toml @@ -14,19 +14,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } hex = { version = "0.4.3", default-features = false, features = ["alloc"] } log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } [dev-dependencies] serde = "1.0.159" -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/crates/pallet-offences-subspace/Cargo.toml b/crates/pallet-offences-subspace/Cargo.toml index 6b92c53294..54700b2676 100644 --- a/crates/pallet-offences-subspace/Cargo.toml +++ b/crates/pallet-offences-subspace/Cargo.toml @@ -14,17 +14,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [dev-dependencies] -sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } schnorrkel = "0.9.1" [features] diff --git a/crates/pallet-rewards/Cargo.toml b/crates/pallet-rewards/Cargo.toml index 673064a302..87c3ed8838 100644 --- a/crates/pallet-rewards/Cargo.toml +++ b/crates/pallet-rewards/Cargo.toml @@ -19,10 +19,10 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } [features] diff --git a/crates/pallet-runtime-configs/Cargo.toml b/crates/pallet-runtime-configs/Cargo.toml index de5f8cf4cd..f828e800fb 100644 --- a/crates/pallet-runtime-configs/Cargo.toml +++ b/crates/pallet-runtime-configs/Cargo.toml @@ -17,10 +17,10 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/crates/pallet-runtime-configs/src/lib.rs b/crates/pallet-runtime-configs/src/lib.rs index 7e6837b5ed..03657d4eaf 100644 --- a/crates/pallet-runtime-configs/src/lib.rs +++ b/crates/pallet-runtime-configs/src/lib.rs @@ -22,7 +22,6 @@ pub use pallet::*; #[frame_support::pallet] mod pallet { use frame_support::pallet_prelude::*; - #[cfg(feature = "std")] use sp_runtime::traits::Zero; #[pallet::pallet] @@ -51,7 +50,6 @@ mod pallet { pub confirmation_depth_k: T::BlockNumber, } - #[cfg(feature = "std")] impl Default for GenesisConfig { #[inline] fn default() -> Self { diff --git a/crates/pallet-settlement/Cargo.toml b/crates/pallet-settlement/Cargo.toml index 820f5a9f4d..90fddd4877 100644 --- a/crates/pallet-settlement/Cargo.toml +++ b/crates/pallet-settlement/Cargo.toml @@ -13,14 +13,14 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/crates/pallet-subspace/Cargo.toml b/crates/pallet-subspace/Cargo.toml index 6e76462008..2f16af2b44 100644 --- a/crates/pallet-subspace/Cargo.toml +++ b/crates/pallet-subspace/Cargo.toml @@ -14,20 +14,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } log = { version = "0.4.17", default-features = false } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } +pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] } serde = { version = "1.0.159", optional = true, default-features = false, features = ["derive"] } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } 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-solving = { version = "0.1.0", default-features = false, path = "../subspace-solving" } @@ -36,10 +36,10 @@ subspace-verification = { version = "0.1.0", path = "../subspace-verification", [dev-dependencies] env_logger = "0.10.0" futures = "0.3.28" -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-offences-subspace = { version = "0.1.0", path = "../pallet-offences-subspace" } rand = { version = "0.8.5", features = ["min_const_gen"] } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } 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-subspace/src/lib.rs b/crates/pallet-subspace/src/lib.rs index afc3cf6edc..9dbecb6929 100644 --- a/crates/pallet-subspace/src/lib.rs +++ b/crates/pallet-subspace/src/lib.rs @@ -272,7 +272,6 @@ mod pallet { pub allow_authoring_by: AllowAuthoringBy, } - #[cfg(feature = "std")] impl Default for GenesisConfig { #[inline] fn default() -> Self { diff --git a/crates/pallet-subspace/src/mock.rs b/crates/pallet-subspace/src/mock.rs index 9ee7671906..5d1aa693e2 100644 --- a/crates/pallet-subspace/src/mock.rs +++ b/crates/pallet-subspace/src/mock.rs @@ -136,7 +136,7 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } diff --git a/crates/pallet-transaction-fees/Cargo.toml b/crates/pallet-transaction-fees/Cargo.toml index e8f5c80593..bbfb21d3e3 100644 --- a/crates/pallet-transaction-fees/Cargo.toml +++ b/crates/pallet-transaction-fees/Cargo.toml @@ -19,9 +19,9 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } [features] diff --git a/crates/sc-consensus-fraud-proof/Cargo.toml b/crates/sc-consensus-fraud-proof/Cargo.toml index 781a17ef17..dc731b94af 100644 --- a/crates/sc-consensus-fraud-proof/Cargo.toml +++ b/crates/sc-consensus-fraud-proof/Cargo.toml @@ -13,10 +13,10 @@ include = [ [dependencies] async-trait = "0.1.68" codec = { package = "parity-scale-codec", version = "3.4.0", features = ["derive"] } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../sp-domains" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", path = "../sp-settlement" } subspace-fraud-proof = { version = "0.1.0", path = "../subspace-fraud-proof" } diff --git a/crates/sc-consensus-subspace-rpc/Cargo.toml b/crates/sc-consensus-subspace-rpc/Cargo.toml index a130bfc15f..6c2bd9c492 100644 --- a/crates/sc-consensus-subspace-rpc/Cargo.toml +++ b/crates/sc-consensus-subspace-rpc/Cargo.toml @@ -19,16 +19,16 @@ futures-timer = "3.0.2" jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } parity-scale-codec = "3.4.0" parking_lot = "0.12.1" -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } 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/sc-consensus-subspace/Cargo.toml b/crates/sc-consensus-subspace/Cargo.toml index 65634c695c..18a7c09df6 100644 --- a/crates/sc-consensus-subspace/Cargo.toml +++ b/crates/sc-consensus-subspace/Cargo.toml @@ -16,33 +16,33 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] async-trait = "0.1.68" codec = { package = "parity-scale-codec", version = "3.4.0", features = ["derive"] } -fork-tree = { version = "3.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +fork-tree = { version = "3.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } futures = "0.3.28" futures-timer = "3.0.2" log = "0.4.17" lru = "0.10.0" parking_lot = "0.12.1" -prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", version = "0.10.0-dev" } +prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", version = "0.10.0-dev" } rand = "0.8.5" schnorrkel = "0.9.1" -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } serde = { version = "1.0.159", features = ["derive"] } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-objects = { version = "0.1.0", path = "../sp-objects" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-version = { version = "22.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space" } diff --git a/crates/sc-consensus-subspace/src/lib.rs b/crates/sc-consensus-subspace/src/lib.rs index 03368fed61..35d03e4414 100644 --- a/crates/sc-consensus-subspace/src/lib.rs +++ b/crates/sc-consensus-subspace/src/lib.rs @@ -325,14 +325,7 @@ where client.usage_info().chain.genesis_hash }; - Ok(SlotDuration::from_millis( - client - .runtime_api() - .slot_duration(block_hash)? - .as_millis() - .try_into() - .expect("Slot duration in ms never exceeds u64; qed"), - )) + Ok(client.runtime_api().slot_duration(block_hash)?) } /// Parameters for Subspace. diff --git a/crates/sc-subspace-block-relay/Cargo.toml b/crates/sc-subspace-block-relay/Cargo.toml index 6d1696a97c..dc31ec4047 100644 --- a/crates/sc-subspace-block-relay/Cargo.toml +++ b/crates/sc-subspace-block-relay/Cargo.toml @@ -11,18 +11,19 @@ include = [ ] [dependencies] +async-channel = "1.8.0" async-trait = "0.1.68" codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } futures = "0.3.28" lru = "0.10.0" parking_lot = "0.12.1" -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } thiserror = "1.0.38" tracing = "0.1.37" diff --git a/crates/sc-subspace-block-relay/src/consensus.rs b/crates/sc-subspace-block-relay/src/consensus.rs index 3ff61c4426..1ba10ccf9d 100644 --- a/crates/sc-subspace-block-relay/src/consensus.rs +++ b/crates/sc-subspace-block-relay/src/consensus.rs @@ -7,7 +7,7 @@ use crate::{ }; use async_trait::async_trait; use codec::{Decode, Encode}; -use futures::channel::{mpsc, oneshot}; +use futures::channel::oneshot; use futures::stream::StreamExt; use lru::LruCache; use parking_lot::Mutex; @@ -288,7 +288,7 @@ struct ConsensusRelayServer< > { client: Arc, protocol: Box, - request_receiver: mpsc::Receiver, + request_receiver: async_channel::Receiver, _block: std::marker::PhantomData, } @@ -602,7 +602,7 @@ where Client: HeaderBackend + BlockBackend + 'static, Pool: TransactionPool + 'static, { - let (tx, request_receiver) = mpsc::channel(NUM_PEER_HINT.get()); + let (tx, request_receiver) = async_channel::bounded(NUM_PEER_HINT.get()); let backend = Arc::new(ConsensusBackend::new(client.clone(), pool, spawn_handle)); let relay_client: ConsensusRelayClient = ConsensusRelayClient { diff --git a/crates/sc-subspace-chain-specs/Cargo.toml b/crates/sc-subspace-chain-specs/Cargo.toml index 147d3c05c5..167cdbb454 100644 --- a/crates/sc-subspace-chain-specs/Cargo.toml +++ b/crates/sc-subspace-chain-specs/Cargo.toml @@ -12,9 +12,9 @@ include = [ ] [dependencies] -sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } serde = "1.0.159" -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } diff --git a/crates/sp-consensus-subspace/Cargo.toml b/crates/sp-consensus-subspace/Cargo.toml index 3e1ce7196b..b5cc94f4e9 100644 --- a/crates/sp-consensus-subspace/Cargo.toml +++ b/crates/sp-consensus-subspace/Cargo.toml @@ -16,19 +16,19 @@ targets = ["x86_64-unknown-linux-gnu"] async-trait = { version = "0.1.68", optional = true } codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false } log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-application-crypto = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-externalities = { version = "0.13.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime-interface = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-application-crypto = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-externalities = { version = "0.19.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime-interface = { version = "17.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving", default-features = false } subspace-solving = { version = "0.1.0", path = "../subspace-solving", default-features = false } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } diff --git a/crates/sp-consensus-subspace/src/lib.rs b/crates/sp-consensus-subspace/src/lib.rs index ec6cc63cc7..7f2e2e8cfc 100644 --- a/crates/sp-consensus-subspace/src/lib.rs +++ b/crates/sp-consensus-subspace/src/lib.rs @@ -31,11 +31,10 @@ use crate::digests::{CompatibleDigestItem, PreDigest}; use alloc::borrow::Cow; use alloc::string::String; use codec::{Decode, Encode, MaxEncodedLen}; -use core::time::Duration; use scale_info::TypeInfo; use schnorrkel::context::SigningContext; use sp_api::{BlockT, HeaderT}; -use sp_consensus_slots::Slot; +use sp_consensus_slots::{Slot, SlotDuration}; use sp_core::crypto::KeyTypeId; use sp_core::H256; use sp_io::hashing; @@ -480,7 +479,7 @@ sp_api::decl_runtime_apis! { /// API necessary for block authorship with Subspace. pub trait SubspaceApi { /// The slot duration in milliseconds for Subspace. - fn slot_duration() -> Duration; + fn slot_duration() -> SlotDuration; /// Global randomnesses used for deriving global challenges. fn global_randomnesses() -> GlobalRandomnesses; diff --git a/crates/sp-domains/Cargo.toml b/crates/sp-domains/Cargo.toml index 5f7e16c722..bc17e30770 100644 --- a/crates/sp-domains/Cargo.toml +++ b/crates/sp-domains/Cargo.toml @@ -13,22 +13,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] blake2 = { version = "0.10.6", default-features = false } -merlin = { version = "2.0.1", default-features = false } parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } rs_merkle = { version = "1.2.0", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] } -serde = { version = "1.0.159", optional = true, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-application-crypto = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-keystore = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-state-machine = { version = "0.13.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-trie = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.159", default-features = false, features = ["alloc", "derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-application-crypto = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-state-machine = { version = "0.28.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } 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" } thiserror = { version = "1.0.38", optional = true } @@ -37,11 +35,9 @@ thiserror = { version = "1.0.38", optional = true } default = ["std"] std = [ "blake2/std", - "merlin/std", "parity-scale-codec/std", "rs_merkle/std", "scale-info/std", - "schnorrkel/std", "serde/std", "sp-api/std", "sp-blockchain", diff --git a/crates/sp-domains/src/bundle_election.rs b/crates/sp-domains/src/bundle_election.rs index 065a3875b7..5d9ae8235b 100644 --- a/crates/sp-domains/src/bundle_election.rs +++ b/crates/sp-domains/src/bundle_election.rs @@ -1,13 +1,10 @@ use crate::merkle_tree::{MerkleProof, Witness}; use crate::{DomainId, ExecutorPublicKey, ProofOfElection, StakeWeight}; -use merlin::Transcript; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; -use schnorrkel::vrf::{VRFOutput, VRFProof, VRF_OUTPUT_LENGTH}; -use schnorrkel::{SignatureError, SignatureResult}; +use sp_core::crypto::{VrfPublic, Wraps}; +use sp_core::sr25519::vrf::{VrfInput, VrfOutput, VrfSignature}; use sp_core::H256; -#[cfg(feature = "std")] -use sp_keystore::vrf::{VRFTranscriptData, VRFTranscriptValue}; use sp_runtime::traits::{BlakeTwo256, Hash}; use sp_std::vec::Vec; use sp_trie::{read_trie_value, LayoutV1, StorageProof}; @@ -22,25 +19,24 @@ const LOCAL_RANDOMNESS_CONTEXT: &[u8] = b"bundle_election_local_randomness_conte type LocalRandomness = [u8; core::mem::size_of::()]; fn derive_local_randomness( - vrf_output: [u8; VRF_OUTPUT_LENGTH], + vrf_output: &VrfOutput, public_key: &ExecutorPublicKey, global_challenge: &Blake2b256Hash, -) -> SignatureResult { - let in_out = VRFOutput(vrf_output).attach_input_hash( - &schnorrkel::PublicKey::from_bytes(public_key.as_ref())?, - make_local_randomness_transcript(global_challenge), - )?; - - Ok(in_out.make_bytes(LOCAL_RANDOMNESS_CONTEXT)) +) -> Result { + vrf_output.make_bytes( + LOCAL_RANDOMNESS_CONTEXT, + &make_local_randomness_input(global_challenge), + public_key.as_ref(), + ) } /// Returns the domain-specific solution for the challenge of producing a bundle. pub fn derive_bundle_election_solution( domain_id: DomainId, - vrf_output: [u8; VRF_OUTPUT_LENGTH], + vrf_output: &VrfOutput, public_key: &ExecutorPublicKey, global_challenge: &Blake2b256Hash, -) -> SignatureResult { +) -> Result { let local_randomness = derive_local_randomness(vrf_output, public_key, global_challenge)?; let local_domain_randomness = blake2b_256_hash_list(&[&domain_id.to_le_bytes(), &local_randomness]); @@ -78,25 +74,12 @@ pub fn is_election_solution_within_threshold(election_solution: u128, threshold: election_solution <= threshold } -/// Make a VRF transcript. -pub fn make_local_randomness_transcript(global_challenge: &Blake2b256Hash) -> Transcript { - let mut transcript = Transcript::new(VRF_TRANSCRIPT_LABEL); - transcript.append_message(b"global challenge", global_challenge); - transcript -} - -/// Make a VRF transcript data. -#[cfg(feature = "std")] -pub fn make_local_randomness_transcript_data( - global_challenge: &Blake2b256Hash, -) -> VRFTranscriptData { - VRFTranscriptData { - label: VRF_TRANSCRIPT_LABEL, - items: vec![( - "global challenge", - VRFTranscriptValue::Bytes(global_challenge.to_vec()), - )], - } +/// Make a VRF inout. +pub fn make_local_randomness_input(global_challenge: &Blake2b256Hash) -> VrfInput { + VrfInput::new( + VRF_TRANSCRIPT_LABEL, + &[(b"global challenge", global_challenge)], + ) } pub mod well_known_keys { @@ -161,8 +144,6 @@ struct SystemBundleElectionVerifierParams { #[derive(Debug, Decode, Encode, TypeInfo, PartialEq, Eq, Clone)] pub enum VrfProofError { - /// Can not construct the vrf public_key/output/proof from the raw bytes. - VrfSignatureConstructionError, /// Invalid vrf proof. BadProof, } @@ -170,22 +151,15 @@ pub enum VrfProofError { /// Verify the vrf proof generated in the bundle election. pub(crate) fn verify_vrf_proof( public_key: &ExecutorPublicKey, - vrf_output: &[u8], - vrf_proof: &[u8], + vrf_signature: &VrfSignature, global_challenge: &Blake2b256Hash, ) -> Result<(), VrfProofError> { - let public_key = schnorrkel::PublicKey::from_bytes(public_key.as_ref()) - .map_err(|_| VrfProofError::VrfSignatureConstructionError)?; - - public_key - .vrf_verify( - make_local_randomness_transcript(global_challenge), - &VRFOutput::from_bytes(vrf_output) - .map_err(|_| VrfProofError::VrfSignatureConstructionError)?, - &VRFProof::from_bytes(vrf_proof) - .map_err(|_| VrfProofError::VrfSignatureConstructionError)?, - ) - .map_err(|_| VrfProofError::BadProof)?; + if !public_key.as_inner_ref().vrf_verify( + &make_local_randomness_input(global_challenge).into(), + vrf_signature, + ) { + return Err(VrfProofError::BadProof); + } Ok(()) } @@ -244,7 +218,7 @@ pub enum BundleSolutionError { /// Invalid merkle proof. BadMerkleProof, /// Failed to derive the bundle election solution. - FailedToDeriveBundleElectionSolution(SignatureError), + FailedToDeriveBundleElectionSolution(parity_scale_codec::Error), /// Election solution does not satisfy the threshold. InvalidElectionSolution, } @@ -296,7 +270,7 @@ pub fn verify_system_bundle_solution( verify_bundle_solution_threshold( *domain_id, - *vrf_output, + vrf_output, stake_weight, total_stake_weight, slot_probability, @@ -309,7 +283,7 @@ pub fn verify_system_bundle_solution( pub fn verify_bundle_solution_threshold( domain_id: DomainId, - vrf_output: [u8; VRF_OUTPUT_LENGTH], + vrf_output: &VrfOutput, stake_weight: StakeWeight, total_stake_weight: StakeWeight, slot_probability: (u64, u64), diff --git a/crates/sp-domains/src/fraud_proof.rs b/crates/sp-domains/src/fraud_proof.rs index 11e5cc426b..fe3b95f4ba 100644 --- a/crates/sp-domains/src/fraud_proof.rs +++ b/crates/sp-domains/src/fraud_proof.rs @@ -1,4 +1,6 @@ -use crate::{BundleHeader, DomainId, SealedBundleHeader}; +#[cfg(any(feature = "std", feature = "runtime-benchmarks"))] +use crate::BundleHeader; +use crate::{DomainId, SealedBundleHeader}; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; use sp_consensus_slots::Slot; diff --git a/crates/sp-domains/src/lib.rs b/crates/sp-domains/src/lib.rs index 75d2984ab2..dbc6bbe1e3 100644 --- a/crates/sp-domains/src/lib.rs +++ b/crates/sp-domains/src/lib.rs @@ -24,10 +24,13 @@ pub mod transaction; use bundle_election::VrfProofError; use merkle_tree::Witness; +#[cfg(any(feature = "std", feature = "runtime-benchmarks"))] +use parity_scale_codec::MaxEncodedLen; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; -use schnorrkel::vrf::{VRF_OUTPUT_LENGTH, VRF_PROOF_LENGTH}; +use serde::{Deserialize, Serialize}; use sp_core::crypto::KeyTypeId; +use sp_core::sr25519::vrf::{VrfOutput, VrfProof, VrfSignature}; use sp_core::H256; use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Hash as HashT, NumberFor, Zero}; use sp_runtime::{OpaqueExtrinsic, RuntimeAppPublic}; @@ -73,9 +76,21 @@ pub type StakeWeight = u128; /// Unique identifier of a domain. #[derive( - Clone, Copy, Debug, Hash, Default, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo, + Clone, + Copy, + Debug, + Hash, + Default, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + TypeInfo, + Serialize, + Deserialize, )] -#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] pub struct DomainId(u32); impl From for DomainId { @@ -117,8 +132,6 @@ impl DomainId { pub const CORE_PAYMENTS: Self = Self::new(1); - pub const CORE_ETH_RELAY: Self = Self::new(2); - pub const CORE_EVM: Self = Self::new(3); /// Creates a [`DomainId`]. @@ -155,8 +168,8 @@ impl DomainId { } /// Domain configuration. -#[derive(Debug, Encode, Decode, TypeInfo, Clone, PartialEq, Eq)] -#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] +#[derive(Debug, Encode, Decode, TypeInfo, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] pub struct DomainConfig { /// Hash of the domain wasm runtime blob. pub wasm_runtime_hash: Hash, @@ -246,9 +259,9 @@ pub struct ProofOfElection { /// Domain id. pub domain_id: DomainId, /// VRF output. - pub vrf_output: [u8; VRF_OUTPUT_LENGTH], + pub vrf_output: VrfOutput, /// VRF proof. - pub vrf_proof: [u8; VRF_PROOF_LENGTH], + pub vrf_proof: VrfProof, /// VRF public key. pub executor_public_key: ExecutorPublicKey, /// Global challenge. @@ -267,8 +280,12 @@ impl ProofOfElection { pub fn verify_vrf_proof(&self) -> Result<(), VrfProofError> { bundle_election::verify_vrf_proof( &self.executor_public_key, - &self.vrf_output, - &self.vrf_proof, + // TODO: Maybe we want to store signature in the struct rather than separate fields, + // such that we don't need to clone here? + &VrfSignature { + output: self.vrf_output.clone(), + proof: self.vrf_proof.clone(), + }, &self.global_challenge, ) } @@ -284,10 +301,12 @@ impl ProofOfElection { impl ProofOfElection { #[cfg(any(feature = "std", feature = "runtime-benchmarks"))] pub fn dummy(domain_id: DomainId, executor_public_key: ExecutorPublicKey) -> Self { + let output_bytes = vec![0u8; VrfOutput::max_encoded_len()]; + let proof_bytes = vec![0u8; VrfProof::max_encoded_len()]; Self { domain_id, - vrf_output: [0u8; VRF_OUTPUT_LENGTH], - vrf_proof: [0u8; VRF_PROOF_LENGTH], + vrf_output: VrfOutput::decode(&mut output_bytes.as_slice()).unwrap(), + vrf_proof: VrfProof::decode(&mut proof_bytes.as_slice()).unwrap(), executor_public_key, global_challenge: Blake2b256Hash::default(), storage_proof: StorageProof::empty(), diff --git a/crates/sp-lightclient/Cargo.toml b/crates/sp-lightclient/Cargo.toml index 20505197bc..34c30f78c8 100644 --- a/crates/sp-lightclient/Cargo.toml +++ b/crates/sp-lightclient/Cargo.toml @@ -17,20 +17,20 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] } -sp-arithmetic = { version = "6.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-arithmetic = { version = "16.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace", default-features = false } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } 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 } subspace-solving = { version = "0.1.0", path = "../subspace-solving", default-features = false } subspace-verification = { version = "0.1.0", path = "../subspace-verification", default-features = false } [dev-dependencies] -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } futures = "0.3.28" rand = { version = "0.8.5", features = ["min_const_gen"] } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving"} diff --git a/crates/sp-objects/Cargo.toml b/crates/sp-objects/Cargo.toml index 3ecd61519e..9e140a4339 100644 --- a/crates/sp-objects/Cargo.toml +++ b/crates/sp-objects/Cargo.toml @@ -13,8 +13,8 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } 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-settlement/Cargo.toml b/crates/sp-settlement/Cargo.toml index cc984a1232..09300b5d9a 100644 --- a/crates/sp-settlement/Cargo.toml +++ b/crates/sp-settlement/Cargo.toml @@ -13,11 +13,11 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/crates/subspace-core-primitives/Cargo.toml b/crates/subspace-core-primitives/Cargo.toml index 6ddac5d200..30157447ea 100644 --- a/crates/subspace-core-primitives/Cargo.toml +++ b/crates/subspace-core-primitives/Cargo.toml @@ -27,7 +27,7 @@ num-traits = { version = "0.2.15", default-features = false } parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive", "max-encoded-len"] } parking_lot = { version = "0.12.1", optional = true } rayon = { version = "1.7.0", optional = true } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } serde = { version = "1.0.159", optional = true, features = ["alloc", "derive"] } serde_arrays = { version = "0.1.0", optional = true } # Replacement for `parking_lot` in `no_std` environment diff --git a/crates/subspace-farmer-components/Cargo.toml b/crates/subspace-farmer-components/Cargo.toml index a311db761f..e652f33f64 100644 --- a/crates/subspace-farmer-components/Cargo.toml +++ b/crates/subspace-farmer-components/Cargo.toml @@ -36,7 +36,7 @@ subspace-erasure-coding = { version = "0.1.0", path = "../subspace-erasure-codin subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space", features = ["parallel"] } subspace-verification = { version = "0.1.0", path = "../subspace-verification" } thiserror = "1.0.38" -tokio = { version = "1.27.0", features = ["macros", "parking_lot", "rt-multi-thread", "signal", "sync"] } +tokio = { version = "1.28.2", features = ["macros", "parking_lot", "rt-multi-thread", "signal", "sync"] } tracing = "0.1.37" [dev-dependencies] diff --git a/crates/subspace-farmer/Cargo.toml b/crates/subspace-farmer/Cargo.toml index 7bbe2a1eec..a979ff110c 100644 --- a/crates/subspace-farmer/Cargo.toml +++ b/crates/subspace-farmer/Cargo.toml @@ -50,7 +50,7 @@ subspace-rpc-primitives = { version = "0.1.0", path = "../subspace-rpc-primitive substrate-bip39 = "0.4.4" tempfile = "3.5.0" thiserror = "1.0.38" -tokio = { version = "1.27.0", features = ["macros", "parking_lot", "rt-multi-thread", "signal"] } +tokio = { version = "1.28.2", features = ["macros", "parking_lot", "rt-multi-thread", "signal"] } tracing = "0.1.37" tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } ulid = { version = "1.0.0", features = ["serde"] } diff --git a/crates/subspace-fraud-proof/Cargo.toml b/crates/subspace-fraud-proof/Cargo.toml index 2279c3610c..91e05333ca 100644 --- a/crates/subspace-fraud-proof/Cargo.toml +++ b/crates/subspace-fraud-proof/Cargo.toml @@ -15,20 +15,20 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.4.0", features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } domain-block-preprocessor = { version = "0.1.0", path = "../../domains/client/block-preprocessor" } -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } futures = "0.3.28" hash-db = "0.16.0" -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../sp-domains" } sp-domain-digests = { version = "0.1.0", path = "../../domains/primitives/digests" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", path = "../sp-settlement" } -sp-state-machine = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-trie = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-trie = { version = "22.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-wasm-tools = { version = "0.1.0", path = "../subspace-wasm-tools" } system-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/system-runtime" } tracing = "0.1.37" @@ -36,15 +36,15 @@ tracing = "0.1.37" [dev-dependencies] domain-block-builder = { version = "0.1.0", path = "../../domains/client/block-builder" } domain-test-service = { version = "0.1.0", path = "../../domains/test/service" } -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-domains = { version = "0.1.0", path = "../../crates/pallet-domains" } -sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-keyring = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-keyring = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-test-client = { version = "0.1.0", path = "../../test/subspace-test-client" } subspace-test-runtime = { version = "0.1.0", path = "../../test/subspace-test-runtime" } subspace-test-service = { version = "0.1.0", path = "../../test/subspace-test-service" } subspace-runtime-primitives = { version = "0.1.0", path = "../../crates/subspace-runtime-primitives" } -substrate-test-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +substrate-test-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } tempfile = "3.5.0" -tokio = "1.27.0" +tokio = "1.28.2" diff --git a/crates/subspace-fraud-proof/src/invalid_state_transition_proof.rs b/crates/subspace-fraud-proof/src/invalid_state_transition_proof.rs index 2341d5a75f..d713c8dc35 100644 --- a/crates/subspace-fraud-proof/src/invalid_state_transition_proof.rs +++ b/crates/subspace-fraud-proof/src/invalid_state_transition_proof.rs @@ -12,7 +12,7 @@ use domain_runtime_primitives::opaque::Block; use hash_db::{HashDB, Hasher, Prefix}; use sc_client_api::backend; use sp_api::{ProvideRuntimeApi, StorageProof}; -use sp_core::traits::{CodeExecutor, RuntimeCode, SpawnNamed}; +use sp_core::traits::{CodeExecutor, RuntimeCode}; use sp_core::H256; use sp_domain_digests::AsPredigest; use sp_domains::fraud_proof::{ExecutionPhase, InvalidStateTransitionProof, VerificationError}; @@ -29,7 +29,6 @@ use std::sync::Arc; pub struct ExecutionProver { backend: Arc, executor: Arc, - spawn_handle: Box, _phantom: PhantomData, } @@ -40,11 +39,10 @@ where Exec: CodeExecutor + 'static, { /// Constructs a new instance of [`ExecutionProver`]. - pub fn new(backend: Arc, executor: Arc, spawn_handle: Box) -> Self { + pub fn new(backend: Arc, executor: Arc) -> Self { Self { backend, executor, - spawn_handle, _phantom: PhantomData::, } } @@ -75,7 +73,6 @@ where &delta_backend, &mut Default::default(), &*self.executor, - self.spawn_handle.clone(), execution_phase.proving_method(), call_data, &runtime_code, @@ -88,7 +85,6 @@ where trie_backend, &mut Default::default(), &*self.executor, - self.spawn_handle.clone(), execution_phase.proving_method(), call_data, &runtime_code, @@ -121,12 +117,11 @@ where .runtime_code() .map_err(sp_blockchain::Error::RuntimeCode)?; - sp_state_machine::execution_proof_check::( + sp_state_machine::execution_proof_check::( pre_execution_root, proof, &mut Default::default(), &*self.executor, - self.spawn_handle.clone(), execution_phase.verifying_method(), call_data, &runtime_code, @@ -191,32 +186,28 @@ pub struct InvalidStateTransitionProofVerifier< PBlock, PClient, Exec, - Spawn, Hash, VerifierClient, DomainExtrinsicsBuilder, > { primary_chain_client: Arc, executor: Exec, - spawn_handle: Spawn, verifier_client: VerifierClient, domain_extrinsics_builder: DomainExtrinsicsBuilder, _phantom: PhantomData<(PBlock, Hash)>, } -impl Clone +impl Clone for InvalidStateTransitionProofVerifier< PBlock, PClient, Exec, - Spawn, Hash, VerifierClient, DomainExtrinsicsBuilder, > where Exec: Clone, - Spawn: Clone, VerifierClient: Clone, DomainExtrinsicsBuilder: Clone, { @@ -224,7 +215,6 @@ where Self { primary_chain_client: self.primary_chain_client.clone(), executor: self.executor.clone(), - spawn_handle: self.spawn_handle.clone(), verifier_client: self.verifier_client.clone(), domain_extrinsics_builder: self.domain_extrinsics_builder.clone(), _phantom: self._phantom, @@ -232,12 +222,11 @@ where } } -impl +impl InvalidStateTransitionProofVerifier< PBlock, PClient, Exec, - Spawn, Hash, VerifierClient, DomainExtrinsicsBuilder, @@ -248,7 +237,6 @@ where PClient: ProvideRuntimeApi + Send + Sync, PClient::Api: ExecutorApi, Exec: CodeExecutor + Clone + 'static, - Spawn: SpawnNamed + Clone + Send + 'static, Hash: Encode + Decode, VerifierClient: VerifierApi, DomainExtrinsicsBuilder: BuildDomainExtrinsics, @@ -257,14 +245,12 @@ where pub fn new( primary_chain_client: Arc, executor: Exec, - spawn_handle: Spawn, verifier_client: VerifierClient, domain_extrinsics_builder: DomainExtrinsicsBuilder, ) -> Self { Self { primary_chain_client, executor, - spawn_handle, verifier_client, domain_extrinsics_builder, _phantom: PhantomData::<(PBlock, Hash)>, @@ -356,12 +342,11 @@ where ExecutionPhase::FinalizeBlock { .. } => Vec::new(), }; - let execution_result = sp_state_machine::execution_proof_check::( + let execution_result = sp_state_machine::execution_proof_check::( *pre_state_root, proof.clone(), &mut Default::default(), &self.executor, - self.spawn_handle.clone(), execution_phase.verifying_method(), &call_data, &runtime_code, @@ -392,13 +377,12 @@ pub trait VerifyInvalidStateTransitionProof { ) -> Result<(), VerificationError>; } -impl +impl VerifyInvalidStateTransitionProof for InvalidStateTransitionProofVerifier< PBlock, C, Exec, - Spawn, Hash, VerifierClient, DomainExtrinsicsBuilder, @@ -409,7 +393,6 @@ where C: ProvideRuntimeApi + Send + Sync, C::Api: ExecutorApi, Exec: CodeExecutor + Clone + 'static, - Spawn: SpawnNamed + Clone + Send + 'static, Hash: Encode + Decode, VerifierClient: VerifierApi, DomainExtrinsicsBuilder: BuildDomainExtrinsics, diff --git a/crates/subspace-fraud-proof/src/tests.rs b/crates/subspace-fraud-proof/src/tests.rs index eb8eabf03e..422d4f6d07 100644 --- a/crates/subspace-fraud-proof/src/tests.rs +++ b/crates/subspace-fraud-proof/src/tests.rs @@ -228,11 +228,7 @@ async fn execution_proof_creation_and_verification_should_work() { }; let initialize_block_call_data = new_header.encode(); - let prover = ExecutionProver::new( - alice.backend.clone(), - alice.code_executor.clone(), - Box::new(alice.task_manager.spawn_handle()), - ); + let prover = ExecutionProver::new(alice.backend.clone(), alice.code_executor.clone()); // Test `initialize_block`. let storage_proof = prover @@ -267,7 +263,6 @@ async fn execution_proof_creation_and_verification_should_work() { let invalid_state_transition_proof_verifier = InvalidStateTransitionProofVerifier::new( ferdie.client.clone(), ferdie.executor.clone(), - ferdie.task_manager.spawn_handle(), TestVerifierClient::new(ferdie.client.clone(), alice.client.clone()), SystemDomainExtrinsicsBuilder::new( ferdie.client.clone(), @@ -511,11 +506,7 @@ async fn invalid_execution_proof_should_not_work() { .unwrap() }; - let prover = ExecutionProver::new( - alice.backend.clone(), - alice.code_executor.clone(), - Box::new(alice.task_manager.spawn_handle()), - ); + let prover = ExecutionProver::new(alice.backend.clone(), alice.code_executor.clone()); let create_extrinsic_proof = |extrinsic_index: usize| { let storage_changes = create_block_builder() @@ -563,7 +554,6 @@ async fn invalid_execution_proof_should_not_work() { let invalid_state_transition_proof_verifier = InvalidStateTransitionProofVerifier::new( ferdie.client.clone(), ferdie.executor.clone(), - ferdie.task_manager.spawn_handle(), TestVerifierClient::new(ferdie.client.clone(), alice.client.clone()), SystemDomainExtrinsicsBuilder::new( ferdie.client.clone(), @@ -733,7 +723,6 @@ async fn test_invalid_transaction_proof_creation_and_verification() { let invalid_state_transition_proof_verifier = InvalidStateTransitionProofVerifier::new( ferdie.client.clone(), ferdie.executor.clone(), - ferdie.task_manager.spawn_handle(), TestVerifierClient::new(ferdie.client.clone(), alice.client.clone()), domain_extrinsics_builder.clone(), ); diff --git a/crates/subspace-networking/Cargo.toml b/crates/subspace-networking/Cargo.toml index 8c1a601cb3..346050d806 100644 --- a/crates/subspace-networking/Cargo.toml +++ b/crates/subspace-networking/Cargo.toml @@ -41,7 +41,7 @@ serde_json = "1.0.95" subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } tempfile = "3.5.0" thiserror = "1.0.38" -tokio = { version = "1.27.0", features = ["macros", "parking_lot", "rt-multi-thread", "sync", "time"] } +tokio = { version = "1.28.2", features = ["macros", "parking_lot", "rt-multi-thread", "sync", "time"] } tracing = "0.1.37" tracing-subscriber = { version = "0.3.16", features = ["env-filter"]} unsigned-varint = { version = "0.7.1", features = ["futures", "asynchronous_codec"] } diff --git a/crates/subspace-node/Cargo.toml b/crates/subspace-node/Cargo.toml index 621b56960d..6039321a7a 100644 --- a/crates/subspace-node/Cargo.toml +++ b/crates/subspace-node/Cargo.toml @@ -23,7 +23,6 @@ targets = ["x86_64-unknown-linux-gnu"] bytesize = "1.2.0" clap = { version = "4.2.1", features = ["derive"] } cross-domain-message-gossip = { version = "0.1.0", path = "../../domains/client/cross-domain-message-gossip" } -core-eth-relay-runtime = { version = "0.1.0", path = "../../domains/runtime/core-eth-relay" } core-evm-runtime = { version = "0.1.0", path = "../../domains/runtime/core-evm" } core-payments-domain-runtime = { version = "0.1.0", path = "../../domains/runtime/core-payments" } dirs = "5.0.0" @@ -31,34 +30,34 @@ domain-client-executor = { version = "0.1.0", path = "../../domains/client/domai domain-eth-service = { version = "0.1.0", path = "../../domains/client/eth-service" } domain-service = { version = "0.1.0", path = "../../domains/service" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } -fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } futures = "0.3.28" hex-literal = "0.4.0" log = "0.4.17" once_cell = "1.17.1" parity-scale-codec = "3.4.0" -sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } sc-subspace-chain-specs = { version = "0.1.0", path = "../sc-subspace-chain-specs" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } serde = "1.0.159" serde_json = "1.0.95" -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../sp-domains" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } @@ -68,10 +67,10 @@ subspace-runtime-primitives = { version = "0.1.0", path = "../subspace-runtime-p subspace-service = { version = "0.1.0", path = "../subspace-service" } system-domain-runtime = { version = "0.1.0", path = "../../domains/runtime/system" } thiserror = "1.0.38" -tokio = "1.27.0" +tokio = "1.28.2" [build-dependencies] -substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["do-not-enforce-cost-of-storage"] @@ -83,7 +82,6 @@ runtime-benchmarks = [ "frame-benchmarking-cli/runtime-benchmarks", "subspace-runtime/runtime-benchmarks", "system-domain-runtime/runtime-benchmarks", - "core-eth-relay-runtime/runtime-benchmarks", "core-evm-runtime/runtime-benchmarks", "core-payments-domain-runtime/runtime-benchmarks", ] diff --git a/crates/subspace-node/README.md b/crates/subspace-node/README.md index 7faa8dfedf..f8a60877bc 100644 --- a/crates/subspace-node/README.md +++ b/crates/subspace-node/README.md @@ -31,7 +31,7 @@ Start a single node development chain: ```bash target/production/subspace-node \ --dev \ - --ws-external \ + --rpc-external \ --node-key 0000000000000000000000000000000000000000000000000000000000000001 ``` @@ -55,7 +55,7 @@ You can now run another full node and sync the chain from the node started earli ```bash target/production/subspace-node \ --dev \ - --ws-external \ + --rpc-external \ --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp ``` diff --git a/crates/subspace-node/src/bin/subspace-node.rs b/crates/subspace-node/src/bin/subspace-node.rs index c8a720e1f3..f6b4497c4f 100644 --- a/crates/subspace-node/src/bin/subspace-node.rs +++ b/crates/subspace-node/src/bin/subspace-node.rs @@ -17,7 +17,7 @@ //! Subspace node implementation. use core_evm_runtime::AccountId as AccountId20; -use cross_domain_message_gossip::{cdm_gossip_peers_set_config, GossipWorkerBuilder}; +use cross_domain_message_gossip::GossipWorkerBuilder; use domain_client_executor::ExecutorStreams; use domain_eth_service::provider::EthProvider; use domain_eth_service::DefaultEthConfig; @@ -87,24 +87,6 @@ impl NativeExecutionDispatch for CorePaymentsDomainExecutorDispatch { } } -/// Core eth relay domain executor instance. -pub struct CoreEthRelayDomainExecutorDispatch; - -impl NativeExecutionDispatch for CoreEthRelayDomainExecutorDispatch { - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = (); - - fn dispatch(method: &str, data: &[u8]) -> Option> { - core_eth_relay_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - core_eth_relay_runtime::native_version() - } -} - /// Core evm domain executor instance. pub struct CoreEVMDomainExecutorDispatch; @@ -557,12 +539,6 @@ fn main() -> Result<(), Error> { } }; - let mut primary_chain_config = primary_chain_config; - primary_chain_config - .network - .extra_sets - .push(cdm_gossip_peers_set_config()); - let primary_chain_config = SubspaceConfiguration { base: primary_chain_config, // Domain node needs slots notifications for bundle production. @@ -774,63 +750,6 @@ fn main() -> Result<(), Error> { core_domain_node.network_starter.start_network(); } - DomainId::CORE_ETH_RELAY => { - let core_domain_config = core_domain_cli - .create_domain_configuration::<_, Identity>(tokio_handle) - .map_err(|error| { - sc_service::Error::Other(format!( - "Failed to create core domain configuration: {error:?}" - )) - })?; - - let core_domain_params = domain_service::CoreDomainParams { - domain_id: core_domain_cli.domain_id, - core_domain_config, - system_domain_client: system_domain_node.client.clone(), - system_domain_sync_service: system_domain_node - .sync_service - .clone(), - system_domain_block_import_notifications: system_domain_node - .executor - .import_notification_stream(), - primary_chain_client: primary_chain_node.client.clone(), - primary_network_sync_oracle: primary_chain_node - .sync_service - .clone(), - select_chain: primary_chain_node.select_chain.clone(), - executor_streams, - gossip_message_sink: xdm_gossip_worker_builder.gossip_msg_sink(), - provider: DefaultProvider, - }; - - let core_domain_node = - domain_service::new_full_core::< - DomainBlock, - _, - _, - _, - _, - _, - _, - _, - _, - core_eth_relay_runtime::RuntimeApi, - CoreEthRelayDomainExecutorDispatch, - AccountId32, - _, - >(core_domain_params) - .await?; - - xdm_gossip_worker_builder.push_domain_tx_pool_sink( - core_domain_cli.domain_id, - core_domain_node.tx_pool_sink, - ); - primary_chain_node - .task_manager - .add_child(core_domain_node.task_manager); - - core_domain_node.network_starter.start_network(); - } DomainId::CORE_EVM => { let core_domain_config = core_domain_cli .create_domain_configuration::<_, AccountId32ToAccountId20Converter>( @@ -842,15 +761,14 @@ fn main() -> Result<(), Error> { )) })?; - let evm_base_path = core_domain_config - .service_config - .base_path - .as_ref() - .map(|base_path| { - BasePath::new( - base_path.config_dir(core_domain_config.service_config.chain_spec.id()), + let evm_base_path = BasePath::new( + core_domain_config + .service_config + .base_path + .config_dir( + core_domain_config.service_config.chain_spec.id() ) - }); + ); let eth_provider = EthProvider::< core_evm_runtime::TransactionConverter, DefaultEthConfig< @@ -861,7 +779,7 @@ fn main() -> Result<(), Error> { >, FullBackend, >, - >::new(evm_base_path, core_domain_cli.additional_args()); + >::new(Some(evm_base_path), core_domain_cli.additional_args()); let core_domain_params = domain_service::CoreDomainParams { domain_id: core_domain_cli.domain_id, core_domain_config, diff --git a/crates/subspace-node/src/core_domain.rs b/crates/subspace-node/src/core_domain.rs index bf1568ef9c..0fd60fac09 100644 --- a/crates/subspace-node/src/core_domain.rs +++ b/crates/subspace-node/src/core_domain.rs @@ -1,5 +1,4 @@ pub(crate) mod cli; -pub(crate) mod core_eth_relay_chain_spec; pub(crate) mod core_evm_chain_spec; pub(crate) mod core_payments_chain_spec; diff --git a/crates/subspace-node/src/core_domain/cli.rs b/crates/subspace-node/src/core_domain/cli.rs index 70d56af38e..fb849f118d 100644 --- a/crates/subspace-node/src/core_domain/cli.rs +++ b/crates/subspace-node/src/core_domain/cli.rs @@ -14,9 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::core_domain::{ - core_eth_relay_chain_spec, core_evm_chain_spec, core_payments_chain_spec, -}; +use crate::core_domain::{core_evm_chain_spec, core_payments_chain_spec}; use clap::Parser; use core_evm_runtime::AccountId as AccountId20; use domain_service::DomainConfiguration; @@ -184,7 +182,6 @@ impl SubstrateCli for CoreDomainCli { // TODO: add core domain chain spec an extension of system domain chain spec. match self.domain_id { DomainId::CORE_PAYMENTS => core_payments_chain_spec::load_chain_spec(id), - DomainId::CORE_ETH_RELAY => core_eth_relay_chain_spec::load_chain_spec(id), DomainId::CORE_EVM => core_evm_chain_spec::load_chain_spec(id), domain_id => unreachable!("Unsupported core domain: {domain_id:?}"), } @@ -196,7 +193,6 @@ impl SubstrateCli for CoreDomainCli { .expect("Initialized when constructing this struct") { &DomainId::CORE_PAYMENTS => &core_payments_domain_runtime::VERSION, - &DomainId::CORE_ETH_RELAY => &core_eth_relay_runtime::VERSION, &DomainId::CORE_EVM => &core_evm_runtime::VERSION, domain_id => unreachable!("Unsupported core domain: {domain_id:?}"), } @@ -208,14 +204,10 @@ impl DefaultConfigurationValues for CoreDomainCli { 30335 } - fn rpc_ws_listen_port() -> u16 { + fn rpc_listen_port() -> u16 { 9946 } - fn rpc_http_listen_port() -> u16 { - 9935 - } - fn prometheus_listen_port() -> u16 { 9617 } @@ -250,16 +242,8 @@ impl CliConfiguration for CoreDomainCli { .or_else(|| self.base_path.clone().map(Into::into))) } - fn rpc_http(&self, default_listen_port: u16) -> Result> { - self.run.rpc_http(default_listen_port) - } - - fn rpc_ipc(&self) -> Result> { - self.run.rpc_ipc() - } - - fn rpc_ws(&self, default_listen_port: u16) -> Result> { - self.run.rpc_ws(default_listen_port) + fn rpc_addr(&self, default_listen_port: u16) -> Result> { + self.run.rpc_addr(default_listen_port) } fn prometheus_config( @@ -290,8 +274,8 @@ impl CliConfiguration for CoreDomainCli { self.run.rpc_methods() } - fn rpc_ws_max_connections(&self) -> Result> { - self.run.rpc_ws_max_connections() + fn rpc_max_connections(&self) -> Result { + self.run.rpc_max_connections() } fn rpc_cors(&self, is_dev: bool) -> Result>> { diff --git a/crates/subspace-node/src/core_domain/core_eth_relay_chain_spec.rs b/crates/subspace-node/src/core_domain/core_eth_relay_chain_spec.rs deleted file mode 100644 index 7d605486eb..0000000000 --- a/crates/subspace-node/src/core_domain/core_eth_relay_chain_spec.rs +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (C) 2021 Subspace Labs, Inc. -// SPDX-License-Identifier: GPL-3.0-or-later - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -//! Core eth relay domain configurations. - -use crate::chain_spec_utils::{chain_spec_properties, get_account_id_from_seed}; -use core_eth_relay_runtime::{ - AccountId, BalancesConfig, EthereumBeaconClientConfig, GenesisConfig, MessengerConfig, - SudoConfig, SystemConfig, WASM_BINARY, -}; -use sc_service::ChainType; -use sc_subspace_chain_specs::ExecutionChainSpec; -use sp_core::crypto::Ss58Codec; -use subspace_runtime_primitives::SSC; - -pub type ChainSpec = ExecutionChainSpec; - -pub fn development_config() -> ExecutionChainSpec { - ExecutionChainSpec::from_genesis( - // Name - "Development", - // ID - "core_eth_relay_domain_dev", - ChainType::Development, - move || { - testnet_genesis( - vec![ - get_account_id_from_seed("Alice"), - get_account_id_from_seed("Bob"), - get_account_id_from_seed("Alice//stash"), - get_account_id_from_seed("Bob//stash"), - ], - Some(get_account_id_from_seed("Alice")), - vec![( - get_account_id_from_seed("Alice"), - get_account_id_from_seed("Alice"), - )], - ) - }, - vec![], - None, - None, - None, - Some(chain_spec_properties()), - None, - ) -} - -pub fn local_testnet_config() -> ExecutionChainSpec { - ExecutionChainSpec::from_genesis( - // Name - "Local Testnet", - // ID - "core_eth_relay_domain_local_testnet", - ChainType::Local, - move || { - testnet_genesis( - vec![ - get_account_id_from_seed("Alice"), - get_account_id_from_seed("Bob"), - get_account_id_from_seed("Charlie"), - get_account_id_from_seed("Dave"), - get_account_id_from_seed("Eve"), - get_account_id_from_seed("Ferdie"), - get_account_id_from_seed("Alice//stash"), - get_account_id_from_seed("Bob//stash"), - get_account_id_from_seed("Charlie//stash"), - get_account_id_from_seed("Dave//stash"), - get_account_id_from_seed("Eve//stash"), - get_account_id_from_seed("Ferdie//stash"), - ], - Some(get_account_id_from_seed("Alice")), - vec![ - ( - get_account_id_from_seed("Alice"), - get_account_id_from_seed("Alice"), - ), - ( - get_account_id_from_seed("Bob"), - get_account_id_from_seed("Bob"), - ), - ], - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - Some("template-local"), - None, - // Properties - Some(chain_spec_properties()), - // Extensions - None, - ) -} - -pub fn gemini_3d_config() -> ExecutionChainSpec { - ExecutionChainSpec::from_genesis( - // Name - "Subspace Gemini 3d Core Eth Relay Domain", - // ID - "subspace_gemini_3d_core_eth_relay_domain", - ChainType::Live, - move || { - let sudo_account = - AccountId::from_ss58check("5CXTmJEusve5ixyJufqHThmy4qUrrm6FyLCR7QfE4bbyMTNC") - .expect("Invalid Sudo account"); - testnet_genesis( - vec![ - // Genesis executor - AccountId::from_ss58check("5Df6w8CgYY8kTRwCu8bjBsFu46fy4nFa61xk6dUbL6G4fFjQ") - .expect("Wrong executor account address"), - // Sudo account - sudo_account.clone(), - ], - Some(sudo_account), - Default::default(), - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - Some("subspace-gemini-3d-core-core-eth-relay-domain"), - None, - // Properties - Some(chain_spec_properties()), - // Extensions - None, - ) -} - -pub fn devnet_config() -> ExecutionChainSpec { - ExecutionChainSpec::from_genesis( - // Name - "Subspace Devnet Core Eth Relay Domain", - // ID - "subspace_devnet_core_eth_relay_domain", - ChainType::Custom("Testnet".to_string()), - move || { - let sudo_account = - AccountId::from_ss58check("5CXTmJEusve5ixyJufqHThmy4qUrrm6FyLCR7QfE4bbyMTNC") - .expect("Invalid Sudo account"); - testnet_genesis( - vec![ - // Genesis executor - AccountId::from_ss58check("5Df6w8CgYY8kTRwCu8bjBsFu46fy4nFa61xk6dUbL6G4fFjQ") - .expect("Wrong executor account address"), - // Sudo account - sudo_account.clone(), - ], - Some(sudo_account.clone()), - vec![( - sudo_account, - AccountId::from_ss58check("5D7kgfacBsP6pkMB628221HG98mz2euaytthdoeZPGceQusS") - .expect("Wrong relayer account address"), - )], - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - Some("subspace-devnet-core-eth-relay-domain"), - None, - // Properties - Some(chain_spec_properties()), - // Extensions - None, - ) -} - -pub fn load_chain_spec(spec_id: &str) -> std::result::Result, String> { - let chain_spec = match spec_id { - "dev" => development_config(), - "gemini-3d" => gemini_3d_config(), - "devnet" => devnet_config(), - "" | "local" => local_testnet_config(), - path => ChainSpec::from_json_file(std::path::PathBuf::from(path))?, - }; - Ok(Box::new(chain_spec)) -} - -fn testnet_genesis( - endowed_accounts: Vec, - maybe_sudo_account: Option, - relayers: Vec<(AccountId, AccountId)>, -) -> GenesisConfig { - GenesisConfig { - system: SystemConfig { - code: WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - }, - sudo: SudoConfig { - key: maybe_sudo_account, - }, - transaction_payment: Default::default(), - balances: BalancesConfig { - balances: endowed_accounts - .iter() - .cloned() - .map(|k| (k, 1_000_000 * SSC)) - .collect(), - }, - messenger: MessengerConfig { relayers }, - ethereum_beacon_client: EthereumBeaconClientConfig { - initial_sync: Default::default(), - }, - } -} diff --git a/crates/subspace-node/src/system_domain/chain_spec.rs b/crates/subspace-node/src/system_domain/chain_spec.rs index 43bdffde36..fbc320717c 100644 --- a/crates/subspace-node/src/system_domain/chain_spec.rs +++ b/crates/subspace-node/src/system_domain/chain_spec.rs @@ -73,23 +73,6 @@ pub fn development_config() -> ExecutionChainSpec { get_account_id_from_seed("Alice"), Percent::from_percent(10), ), - ( - get_account_id_from_seed("Alice"), - 1_000 * SSC, - // TODO: proper genesis domain config - DomainConfig { - wasm_runtime_hash: blake2b_256_hash( - system_domain_runtime::CORE_ETH_RELAY_WASM_BUNDLE, - ) - .into(), - max_bundle_size: 1024 * 1024, - bundle_slot_probability: (1, 1), - max_bundle_weight: Weight::MAX, - min_operator_stake: 100 * SSC, - }, - get_account_id_from_seed("Alice"), - Percent::from_percent(10), - ), ( get_account_id_from_seed("Alice"), 1_000 * SSC, @@ -171,23 +154,6 @@ pub fn local_testnet_config() -> ExecutionChainSpec { get_account_id_from_seed("Alice"), Percent::from_percent(10), ), - ( - get_account_id_from_seed("Alice"), - 1_000 * SSC, - // TODO: proper genesis domain config - DomainConfig { - wasm_runtime_hash: blake2b_256_hash( - system_domain_runtime::CORE_ETH_RELAY_WASM_BUNDLE, - ) - .into(), - max_bundle_size: 1024 * 1024, - bundle_slot_probability: (1, 1), - max_bundle_weight: Weight::MAX, - min_operator_stake: 100 * SSC, - }, - get_account_id_from_seed("Alice"), - Percent::from_percent(10), - ), ( get_account_id_from_seed("Alice"), 1_000 * SSC, @@ -352,28 +318,6 @@ pub fn devnet_config() -> ExecutionChainSpec { .expect("Wrong executor account address"), Percent::from_percent(10), ), - ( - AccountId::from_ss58check( - "5Df6w8CgYY8kTRwCu8bjBsFu46fy4nFa61xk6dUbL6G4fFjQ", - ) - .expect("Wrong executor account address"), - 1_000 * SSC, - DomainConfig { - wasm_runtime_hash: blake2b_256_hash( - system_domain_runtime::CORE_ETH_RELAY_WASM_BUNDLE, - ) - .into(), - max_bundle_size: 4 * 1024 * 1024, - bundle_slot_probability: (1, 1), - max_bundle_weight: Weight::MAX, - min_operator_stake: 100 * SSC, - }, - AccountId::from_ss58check( - "5Df6w8CgYY8kTRwCu8bjBsFu46fy4nFa61xk6dUbL6G4fFjQ", - ) - .expect("Wrong executor account address"), - Percent::from_percent(10), - ), ( AccountId::from_ss58check( "5Df6w8CgYY8kTRwCu8bjBsFu46fy4nFa61xk6dUbL6G4fFjQ", diff --git a/crates/subspace-node/src/system_domain/cli.rs b/crates/subspace-node/src/system_domain/cli.rs index 89bb4b8b68..59e793439e 100644 --- a/crates/subspace-node/src/system_domain/cli.rs +++ b/crates/subspace-node/src/system_domain/cli.rs @@ -192,14 +192,10 @@ impl DefaultConfigurationValues for SystemDomainCli { 30334 } - fn rpc_ws_listen_port() -> u16 { + fn rpc_listen_port() -> u16 { 9945 } - fn rpc_http_listen_port() -> u16 { - 9934 - } - fn prometheus_listen_port() -> u16 { 9616 } @@ -234,16 +230,8 @@ impl CliConfiguration for SystemDomainCli { .or_else(|| self.base_path.clone().map(Into::into))) } - fn rpc_http(&self, default_listen_port: u16) -> Result> { - self.run.run_system.rpc_http(default_listen_port) - } - - fn rpc_ipc(&self) -> Result> { - self.run.run_system.rpc_ipc() - } - - fn rpc_ws(&self, default_listen_port: u16) -> Result> { - self.run.run_system.rpc_ws(default_listen_port) + fn rpc_addr(&self, default_listen_port: u16) -> Result> { + self.run.run_system.rpc_addr(default_listen_port) } fn prometheus_config( @@ -276,8 +264,8 @@ impl CliConfiguration for SystemDomainCli { self.run.run_system.rpc_methods() } - fn rpc_ws_max_connections(&self) -> Result> { - self.run.run_system.rpc_ws_max_connections() + fn rpc_max_connections(&self) -> Result { + self.run.run_system.rpc_max_connections() } fn rpc_cors(&self, is_dev: bool) -> Result>> { diff --git a/crates/subspace-runtime-primitives/Cargo.toml b/crates/subspace-runtime-primitives/Cargo.toml index 79f90da54c..fa87ccb747 100644 --- a/crates/subspace-runtime-primitives/Cargo.toml +++ b/crates/subspace-runtime-primitives/Cargo.toml @@ -17,17 +17,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.159", optional = true, features = ["derive"] } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +# TODO: Should, idealy, be optional, but `sp-runtime`'s `serde` feature is enabled unconditiionally by something in +# Substrate and as the result our custom `Block` implementation has to derive `serde` traits essentially +# unconditionally or else it doesn't compile +serde = { version = "1.0.159", default-features = false, features = ["alloc", "derive"] } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } [features] default = ["std"] std = [ "parity-scale-codec/std", - "serde", + "serde/std", "sp-core/std", "sp-runtime/std", "sp-std/std", diff --git a/crates/subspace-runtime-primitives/src/lib.rs b/crates/subspace-runtime-primitives/src/lib.rs index bef5eecde4..e8cc64dbf2 100644 --- a/crates/subspace-runtime-primitives/src/lib.rs +++ b/crates/subspace-runtime-primitives/src/lib.rs @@ -68,7 +68,6 @@ pub type Moment = u64; pub mod opaque { use super::BlockNumber; use parity_scale_codec::{Decode, Encode}; - #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Header as HeaderT}; use sp_runtime::{generic, DigestItem, OpaqueExtrinsic}; @@ -80,10 +79,9 @@ pub mod opaque { /// Opaque block type. /// Abstraction over a substrate block. - #[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)] - #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] - #[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] - #[cfg_attr(feature = "std", serde(deny_unknown_fields))] + #[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, Serialize, Deserialize)] + #[serde(rename_all = "camelCase")] + #[serde(deny_unknown_fields)] pub struct Block { /// The block header. pub header: Header, diff --git a/crates/subspace-runtime/Cargo.toml b/crates/subspace-runtime/Cargo.toml index 8febc1b21c..7e160e27fa 100644 --- a/crates/subspace-runtime/Cargo.toml +++ b/crates/subspace-runtime/Cargo.toml @@ -18,14 +18,14 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } orml-vesting = { version = "0.4.1-dev", default-features = false, path = "../../orml/vesting" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-domains = { version = "0.1.0", default-features = false, path = "../pallet-domains" } pallet-feeds = { version = "0.1.0", default-features = false, path = "../pallet-feeds" } pallet-grandpa-finality-verifier = { version = "0.1.0", default-features = false, path = "../pallet-grandpa-finality-verifier" } @@ -34,29 +34,29 @@ pallet-offences-subspace = { version = "0.1.0", default-features = false, path = pallet-settlement = { version = "0.1.0", default-features = false, path = "../pallet-settlement" } 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-subspace = { version = "0.1.0", default-features = false, path = "../pallet-subspace" } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-subspace = { version = "0.1.0", default-features = false, features = ["serde"], path = "../pallet-subspace" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-transaction-fees = { version = "0.1.0", default-features = false, path = "../pallet-transaction-fees" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false, version = "4.0.0-dev"} +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false, version = "4.0.0-dev"} sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } -sp-inherents = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false, version = "4.0.0-dev"} +sp-inherents = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false, version = "4.0.0-dev"} sp-objects = { version = "0.1.0", default-features = false, path = "../sp-objects" } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", default-features = false, path = "../sp-settlement" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } 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", default-features = false, path = "../subspace-verification" } @@ -64,7 +64,7 @@ system-domain-runtime = { version = "0.1.0", default-features = false, path = ". [build-dependencies] subspace-wasm-tools = { version = "0.1.0", path = "../subspace-wasm-tools" } -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } [dev-dependencies] hex-literal = "0.4.0" diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index 381cf804c7..3bddc900eb 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -42,7 +42,6 @@ use crate::fees::{OnChargeTransaction, TransactionByteFee}; use crate::object_mapping::extract_block_object_mapping; use crate::signed_extensions::{CheckStorageAccess, DisablePallets}; use core::mem; -use core::time::Duration; use frame_support::traits::{ConstU16, ConstU32, ConstU64, ConstU8, Everything, Get}; use frame_support::weights::constants::{RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}; use frame_support::weights::{ConstantMultiplier, IdentityFee, Weight}; @@ -52,6 +51,7 @@ use frame_system::EnsureNever; use pallet_feeds::feed_processor::FeedProcessor; pub use pallet_subspace::AllowAuthoringBy; use sp_api::{impl_runtime_apis, BlockT}; +use sp_consensus_slots::SlotDuration; use sp_consensus_subspace::{ ChainConstants, EquivocationProof, FarmerPublicKey, GlobalRandomnesses, SignedVote, SolutionRanges, Vote, @@ -303,7 +303,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = pallet_balances::weights::SubstrateWeight; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -381,6 +381,7 @@ impl pallet_utility::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type WeightInfo = pallet_sudo::weights::SubstrateWeight; } impl frame_system::offchain::SendTransactionTypes for Runtime @@ -665,8 +666,8 @@ impl_runtime_apis! { MAX_PIECES_IN_SECTOR } - fn slot_duration() -> Duration { - Duration::from_millis(Subspace::slot_duration()) + fn slot_duration() -> SlotDuration { + SlotDuration::from_millis(Subspace::slot_duration()) } fn global_randomnesses() -> GlobalRandomnesses { diff --git a/crates/subspace-service/Cargo.toml b/crates/subspace-service/Cargo.toml index 7319ab83fb..9447c07cf3 100644 --- a/crates/subspace-service/Cargo.toml +++ b/crates/subspace-service/Cargo.toml @@ -17,53 +17,54 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] async-trait = "0.1.58" +cross-domain-message-gossip = { version = "0.1.0", path = "../../domains/client/cross-domain-message-gossip" } derive_more = "0.99.17" domain-block-preprocessor = { version = "0.1.0", path = "../../domains/client/block-preprocessor" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } either = "1.8.1" -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } futures = "0.3.28" hex = "0.4.3" jsonrpsee = { version = "0.16.2", features = ["server"] } -pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } parity-scale-codec = "3.4.0" parking_lot = "0.12.1" -sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sc-consensus-fraud-proof = { version = "0.1.0", path = "../sc-consensus-fraud-proof" } 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 = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } sc-subspace-block-relay = { version = "0.1.0", path = "../sc-subspace-block-relay" } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../sp-domains" } -sp-externalities = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-objects = { version = "0.1.0", path = "../sp-objects" } -sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", path = "../sp-settlement" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-trie = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-trie = { version = "22.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-fraud-proof = { version = "0.1.0", path = "../subspace-fraud-proof" } @@ -71,15 +72,15 @@ 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" } subspace-transaction-pool = { version = "0.1.0", path = "../subspace-transaction-pool" } -substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } thiserror = "1.0.38" -tokio = { version = "1.27.0", features = ["sync"] } +tokio = { version = "1.28.2", features = ["sync"] } tracing = "0.1.37" -sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = [] diff --git a/crates/subspace-service/src/lib.rs b/crates/subspace-service/src/lib.rs index 3530e12201..4d6e110339 100644 --- a/crates/subspace-service/src/lib.rs +++ b/crates/subspace-service/src/lib.rs @@ -30,6 +30,7 @@ use crate::metrics::NodeMetrics; use crate::piece_cache::PieceCache; use crate::segment_headers::{start_segment_header_archiver, SegmentHeaderCache}; use crate::tx_pre_validator::PrimaryChainTxPreValidator; +use cross_domain_message_gossip::cdm_gossip_peers_set_config; use derive_more::{Deref, DerefMut, Into}; use domain_runtime_primitives::Hash as DomainHash; use dsn::start_dsn_archiver; @@ -53,10 +54,7 @@ use sc_consensus_subspace::{ }; use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; use sc_service::error::Error as ServiceError; -use sc_service::{ - Configuration, NetworkStarter, PartialComponents, SpawnTaskHandle, SpawnTasksParams, - TaskManager, -}; +use sc_service::{Configuration, NetworkStarter, PartialComponents, SpawnTasksParams, TaskManager}; use sc_subspace_block_relay::{build_consensus_relay, NetworkWrapper}; use sc_telemetry::{Telemetry, TelemetryWorker}; use sp_api::{ApiExt, ConstructRuntimeApi, Metadata, ProvideRuntimeApi, TransactionFor}; @@ -154,7 +152,6 @@ pub type InvalidStateTransitionProofVerifier = Block, FullClient, NativeElseWasmExecutor, - SpawnTaskHandle, Hash, VerifierClient, Block>, SystemDomainExtrinsicsBuilder< @@ -298,12 +295,7 @@ where }) .transpose()?; - let executor = NativeElseWasmExecutor::::new( - config.wasm_method, - config.default_heap_pages, - config.max_runtime_instances, - config.runtime_cache_size, - ); + let executor = sc_service::new_native_or_wasm_executor(config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( @@ -347,7 +339,6 @@ where let invalid_state_transition_proof_verifier = InvalidStateTransitionProofVerifier::new( client.clone(), executor, - task_manager.spawn_handle(), VerifierClient::new(client.clone()), domain_extrinsics_builder, ); @@ -784,9 +775,12 @@ where } else { None }; + let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); + net_config.add_notification_protocol(cdm_gossip_peers_set_config()); let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), diff --git a/crates/subspace-transaction-pool/Cargo.toml b/crates/subspace-transaction-pool/Cargo.toml index f5f880f764..9863d88213 100644 --- a/crates/subspace-transaction-pool/Cargo.toml +++ b/crates/subspace-transaction-pool/Cargo.toml @@ -15,17 +15,17 @@ domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitive futures = "0.3.28" jsonrpsee = { version = "0.16.2", features = ["server"] } parking_lot = "0.12.1" -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } sp-domains = { version = "0.1.0", path = "../sp-domains" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } tracing = "0.1.37" diff --git a/crates/subspace-transaction-pool/src/lib.rs b/crates/subspace-transaction-pool/src/lib.rs index af46617b1c..8da8f3dc0d 100644 --- a/crates/subspace-transaction-pool/src/lib.rs +++ b/crates/subspace-transaction-pool/src/lib.rs @@ -9,9 +9,9 @@ use sc_transaction_pool::{ }; use sc_transaction_pool_api::error::Error as TxPoolError; use sc_transaction_pool_api::{ - ChainEvent, ImportNotificationStream, MaintainedTransactionPool, PoolFuture, PoolStatus, - ReadyTransactions, TransactionFor, TransactionPool, TransactionSource, - TransactionStatusStreamFor, TxHash, + ChainEvent, ImportNotificationStream, MaintainedTransactionPool, + OffchainTransactionPoolFactory, PoolFuture, PoolStatus, ReadyTransactions, TransactionFor, + TransactionPool, TransactionSource, TransactionStatusStreamFor, TxHash, }; use sp_api::ProvideRuntimeApi; use sp_blockchain::{HeaderMetadata, TreeRoute}; @@ -277,12 +277,13 @@ where fn submit_local( &self, - at: &BlockId, + at: Block::Hash, xt: sc_transaction_pool_api::LocalTransactionFor, ) -> Result { + let at = BlockId::Hash(at); let validity = self .api() - .validate_transaction_blocking(at, TransactionSource::Local, xt.clone())? + .validate_transaction_blocking(&at, TransactionSource::Local, xt.clone())? .map_err(|e| { Self::Error::Pool(match e { TransactionValidityError::Invalid(i) => TxPoolError::InvalidTransaction(i), @@ -292,7 +293,7 @@ where let (hash, bytes) = self.pool().validated_pool().api().hash_and_length(&xt); let block_number = self .api() - .block_id_to_number(at)? + .block_id_to_number(&at)? .ok_or_else(|| sc_transaction_pool::error::Error::BlockIdConversion(at.to_string()))?; let validated = ValidatedTransaction::valid_at( block_number.saturated_into::(), @@ -429,7 +430,7 @@ where // make transaction pool available for off-chain runtime calls. client .execution_extensions() - .register_transaction_pool(&pool); + .register_transaction_pool_factory(OffchainTransactionPoolFactory::new(&pool)); pool } diff --git a/crates/subspace-verification/Cargo.toml b/crates/subspace-verification/Cargo.toml index 61f0eeac66..b7f8f337bb 100644 --- a/crates/subspace-verification/Cargo.toml +++ b/crates/subspace-verification/Cargo.toml @@ -18,10 +18,10 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false } merlin = { version = "2.0.1", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] } -sp-arithmetic = { version = "6.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-arithmetic = { version = "16.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving", default-features = false } subspace-solving = { version = "0.1.0", path = "../subspace-solving", default-features = false } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } diff --git a/crates/subspace-wasm-tools/Cargo.toml b/crates/subspace-wasm-tools/Cargo.toml index 008195546e..9f294f7790 100644 --- a/crates/subspace-wasm-tools/Cargo.toml +++ b/crates/subspace-wasm-tools/Cargo.toml @@ -11,5 +11,5 @@ include = [ ] [dependencies] -sc-executor-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-executor-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../sp-domains" } diff --git a/domains/client/block-builder/Cargo.toml b/domains/client/block-builder/Cargo.toml index fb747555c6..daf89cace1 100644 --- a/domains/client/block-builder/Cargo.toml +++ b/domains/client/block-builder/Cargo.toml @@ -14,15 +14,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", features = ["derive"] } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-state-machine = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } tracing = "0.1.37" [dev-dependencies] -substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } diff --git a/domains/client/block-preprocessor/Cargo.toml b/domains/client/block-preprocessor/Cargo.toml index 645f6cd467..d324aafce8 100644 --- a/domains/client/block-preprocessor/Cargo.toml +++ b/domains/client/block-preprocessor/Cargo.toml @@ -16,17 +16,17 @@ codec = { package = "parity-scale-codec", version = "3.4.0", features = [ "deriv domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime" } rand = "0.8.5" rand_chacha = "0.3.1" -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-executor-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-executor-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } sp-messenger = { version = "0.1.0", path = "../../primitives/messenger" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", path = "../../../crates/sp-settlement" } -sp-state-machine = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } subspace-wasm-tools = { version = "0.1.0", path = "../../../crates/subspace-wasm-tools" } @@ -34,5 +34,5 @@ system-runtime-primitives = { version = "0.1.0", path = "../../primitives/system tracing = "0.1.37" [dev-dependencies] -sp-keyring = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-state-machine = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-keyring = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } diff --git a/domains/client/consensus-relay-chain/Cargo.toml b/domains/client/consensus-relay-chain/Cargo.toml index bef09b7653..f49b64552c 100644 --- a/domains/client/consensus-relay-chain/Cargo.toml +++ b/domains/client/consensus-relay-chain/Cargo.toml @@ -9,10 +9,10 @@ edition = "2021" async-trait = "0.1.68" futures = "0.3.28" parking_lot = "0.12.1" -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } diff --git a/domains/client/cross-domain-message-gossip/Cargo.toml b/domains/client/cross-domain-message-gossip/Cargo.toml index 7a67b703ab..f3769c4fb0 100644 --- a/domains/client/cross-domain-message-gossip/Cargo.toml +++ b/domains/client/cross-domain-message-gossip/Cargo.toml @@ -15,12 +15,12 @@ include = [ futures = "0.3.28" parity-scale-codec = { version = "3.4.0", features = ["derive"] } parking_lot = "0.12.1" -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } tracing = "0.1.37" diff --git a/domains/client/domain-executor/Cargo.toml b/domains/client/domain-executor/Cargo.toml index fd31a2e296..0dc7e9ee5d 100644 --- a/domains/client/domain-executor/Cargo.toml +++ b/domains/client/domain-executor/Cargo.toml @@ -15,26 +15,26 @@ domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtim futures = "0.3.28" futures-timer = "3.0.1" parking_lot = "0.12.1" -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } sp-domain-digests = { version = "0.1.0", path = "../../primitives/digests" } -sp-keystore = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-messenger = { version = "0.1.0", path = "../../primitives/messenger" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", path = "../../../crates/sp-settlement" } -sp-state-machine = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-trie = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-trie = { version = "22.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives" } subspace-fraud-proof = { version = "0.1.0", path = "../../../crates/subspace-fraud-proof" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } @@ -42,29 +42,28 @@ subspace-wasm-tools = { version = "0.1.0", path = "../../../crates/subspace-wasm system-runtime-primitives = { version = "0.1.0", path = "../../primitives/system-runtime" } tracing = "0.1.37" thiserror = "1.0.38" -tokio = { version = "1.27.0", features = ["macros"] } +tokio = { version = "1.28.2", features = ["macros"] } [dev-dependencies] core-payments-domain-test-runtime = { version = "0.1.0", path = "../../test/runtime/core-payments" } -core-eth-relay-domain-test-runtime = { version = "0.1.0", path = "../../test/runtime/core-eth-relay" } core-payments-domain-runtime = { version = "0.1.0", path = "../../runtime/core-payments" } domain-client-message-relayer = { version = "0.1.0", path = "../relayer" } domain-test-primitives = { version = "0.1.0", path = "../../test/primitives" } domain-test-service = { version = "0.1.0", path = "../../test/service" } num-traits = "0.2.15" -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-domains = { version = "0.1.0", path = "../../../crates/pallet-domains" } pallet-messenger = { version = "0.1.0", path = "../../pallets/messenger" } pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter" } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-executor-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-state-machine = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-executor-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } system-domain-test-runtime = { version = "0.1.0", path = "../../test/runtime/system" } subspace-test-runtime = { version = "0.1.0", path = "../../../test/subspace-test-runtime" } subspace-test-service = { version = "0.1.0", path = "../../../test/subspace-test-service" } -substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -substrate-test-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +substrate-test-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } tempfile = "3.5.0" diff --git a/domains/client/domain-executor/README.md b/domains/client/domain-executor/README.md index 8bb819dedb..037dafcd1f 100644 --- a/domains/client/domain-executor/README.md +++ b/domains/client/domain-executor/README.md @@ -47,7 +47,7 @@ $ git clone https://github.com/subspace/subspace $ cd subspace # Run a primary chain, a system domain and a core domain node in one command: -$ cargo run --bin subspace-node -- --dev -- --alice --dev --ws-port 5678 -- --domain-id 1 --alice --dev --ws-port 6789 +$ cargo run --bin subspace-node -- --dev -- --alice --dev --rpc-port 5678 -- --domain-id 1 --alice --dev --rpc-port 6789 # Prepare the reward address beforehand and start a farmer in another terminal: $ cargo run --bin subspace-farmer -- --base-path tmp-farmer farm --plot-size 100M --reward-address [ADDRESS] diff --git a/domains/client/domain-executor/src/bundle_election_solver.rs b/domains/client/domain-executor/src/bundle_election_solver.rs index fceb79a4eb..fb06c451dc 100644 --- a/domains/client/domain-executor/src/bundle_election_solver.rs +++ b/domains/client/domain-executor/src/bundle_election_solver.rs @@ -4,12 +4,12 @@ use sp_api::{NumberFor, ProvideRuntimeApi}; use sp_blockchain::HeaderBackend; use sp_domains::bundle_election::{ calculate_bundle_election_threshold, derive_bundle_election_solution, - is_election_solution_within_threshold, make_local_randomness_transcript_data, well_known_keys, + is_election_solution_within_threshold, make_local_randomness_input, well_known_keys, BundleElectionSolverParams, }; use sp_domains::merkle_tree::{authorities_merkle_tree, Witness}; use sp_domains::{DomainId, ExecutorPublicKey, ProofOfElection, StakeWeight}; -use sp_keystore::{Keystore, KeystorePtr}; +use sp_keystore::KeystorePtr; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; use sp_runtime::RuntimeAppPublic; use std::marker::PhantomData; @@ -85,18 +85,16 @@ where "Total stake weight mismatches, which must be a bug in the runtime" ); - let transcript_data = make_local_randomness_transcript_data(&global_challenge); + let input = make_local_randomness_input(&global_challenge).into(); for (index, (authority_id, stake_weight)) in authorities.iter().enumerate() { - if let Ok(Some(vrf_signature)) = Keystore::sr25519_vrf_sign( - &*self.keystore, - ExecutorPublicKey::ID, - authority_id.as_ref(), - transcript_data.clone(), - ) { + if let Ok(Some(vrf_signature)) = + self.keystore + .sr25519_vrf_sign(ExecutorPublicKey::ID, authority_id.as_ref(), &input) + { let election_solution = derive_bundle_election_solution( domain_id, - vrf_signature.output.to_bytes(), + &vrf_signature.output, authority_id, &global_challenge, ) @@ -152,8 +150,8 @@ where let proof_of_election = ProofOfElection { domain_id, - vrf_output: vrf_signature.output.to_bytes(), - vrf_proof: vrf_signature.proof.to_bytes(), + vrf_output: vrf_signature.output, + vrf_proof: vrf_signature.proof, executor_public_key: authority_id.clone(), global_challenge, storage_proof, diff --git a/domains/client/domain-executor/src/core_executor.rs b/domains/client/domain-executor/src/core_executor.rs index 94dc15fe23..8adb1d10dc 100644 --- a/domains/client/domain-executor/src/core_executor.rs +++ b/domains/client/domain-executor/src/core_executor.rs @@ -16,7 +16,7 @@ use sp_api::ProvideRuntimeApi; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::SelectChain; use sp_consensus_slots::Slot; -use sp_core::traits::{CodeExecutor, SpawnEssentialNamed, SpawnNamed}; +use sp_core::traits::{CodeExecutor, SpawnEssentialNamed}; use sp_domains::{DomainId, ExecutorApi}; use sp_messenger::MessengerApi; use sp_runtime::traits::{Block as BlockT, HashFor, NumberFor}; @@ -41,7 +41,6 @@ pub struct Executor< > { primary_chain_client: Arc, client: Arc, - spawner: Box, transaction_pool: Arc, backend: Arc, fraud_proof_generator: FraudProofGenerator, @@ -55,7 +54,6 @@ impl { client: Arc, primary_chain_client: Arc, - spawner: Box, backend: Arc, code_executor: Arc, _phantom: PhantomData<(Block, PBlock)>, @@ -48,7 +47,6 @@ impl Clone Self { client: self.client.clone(), primary_chain_client: self.primary_chain_client.clone(), - spawner: self.spawner.clone(), backend: self.backend.clone(), code_executor: self.code_executor.clone(), _phantom: self._phantom, @@ -73,14 +71,12 @@ where pub fn new( client: Arc, primary_chain_client: Arc, - spawner: Box, backend: Arc, code_executor: Arc, ) -> Self { Self { client, primary_chain_client, - spawner, backend, code_executor, _phantom: Default::default(), @@ -109,11 +105,7 @@ where .map_err(|_| FraudProofError::InvalidStateRootType) }; - let prover = ExecutionProver::new( - self.backend.clone(), - self.code_executor.clone(), - self.spawner.clone() as Box, - ); + let prover = ExecutionProver::new(self.backend.clone(), self.code_executor.clone()); let parent_number = to_number_primitive(*parent_header.number()); diff --git a/domains/client/domain-executor/src/lib.rs b/domains/client/domain-executor/src/lib.rs index bdb6d3ee1f..9623795561 100644 --- a/domains/client/domain-executor/src/lib.rs +++ b/domains/client/domain-executor/src/lib.rs @@ -118,7 +118,6 @@ use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_consensus::{SelectChain, SyncOracle}; use sp_consensus_slots::Slot; -use sp_core::traits::SpawnNamed; use sp_domains::{Bundle, ExecutionReceipt}; use sp_keystore::KeystorePtr; use sp_runtime::traits::{ @@ -190,7 +189,6 @@ pub struct EssentialExecutorParams< pub code_executor: Arc, pub is_authority: bool, pub keystore: KeystorePtr, - pub spawner: Box, pub bundle_sender: Arc>, pub executor_streams: ExecutorStreams, pub domain_confirmation_depth: NumberFor, diff --git a/domains/client/domain-executor/src/system_executor.rs b/domains/client/domain-executor/src/system_executor.rs index adcc2a5200..6335d02345 100644 --- a/domains/client/domain-executor/src/system_executor.rs +++ b/domains/client/domain-executor/src/system_executor.rs @@ -17,7 +17,7 @@ use sp_api::ProvideRuntimeApi; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::SelectChain; use sp_consensus_slots::Slot; -use sp_core::traits::{CodeExecutor, SpawnEssentialNamed, SpawnNamed}; +use sp_core::traits::{CodeExecutor, SpawnEssentialNamed}; use sp_domains::{DomainId, ExecutorApi}; use sp_messenger::MessengerApi; use sp_runtime::traits::{Block as BlockT, HashFor, NumberFor}; @@ -34,7 +34,6 @@ where { primary_chain_client: Arc, client: Arc, - spawner: Box, transaction_pool: Arc, backend: Arc, fraud_proof_generator: FraudProofGenerator, @@ -52,7 +51,6 @@ where Self { primary_chain_client: self.primary_chain_client.clone(), client: self.client.clone(), - spawner: self.spawner.clone(), transaction_pool: self.transaction_pool.clone(), backend: self.backend.clone(), fraud_proof_generator: self.fraud_proof_generator.clone(), @@ -148,7 +146,6 @@ where let fraud_proof_generator = FraudProofGenerator::new( params.client.clone(), params.primary_chain_client.clone(), - params.spawner.clone(), params.backend.clone(), params.code_executor, ); @@ -201,7 +198,6 @@ where Ok(Self { primary_chain_client: params.primary_chain_client, client: params.client, - spawner: params.spawner, transaction_pool: params.transaction_pool, backend: params.backend, fraud_proof_generator, diff --git a/domains/client/domain-executor/src/tests.rs b/domains/client/domain-executor/src/tests.rs index 55b36b89fe..6eeb711e73 100644 --- a/domains/client/domain-executor/src/tests.rs +++ b/domains/client/domain-executor/src/tests.rs @@ -573,11 +573,7 @@ async fn fraud_proof_verification_in_tx_pool_should_work() { .intermediate_roots(header.hash()) .expect("Get intermediate roots"); - let prover = ExecutionProver::new( - alice.backend.clone(), - alice.code_executor.clone(), - Box::new(alice.task_manager.spawn_handle()), - ); + let prover = ExecutionProver::new(alice.backend.clone(), alice.code_executor.clone()); let digest = { Digest { @@ -1064,187 +1060,188 @@ async fn existing_bundle_can_be_resubmitted_to_new_fork() { } } -#[substrate_test_utils::test(flavor = "multi_thread")] -async fn test_cross_domains_message_should_work() { - let directory = TempDir::new().expect("Must be able to create temporary directory"); - - let mut builder = sc_cli::LoggerBuilder::new(""); - builder.with_colors(false); - let _ = builder.init(); - - let tokio_handle = tokio::runtime::Handle::current(); - - // Start Ferdie - let mut ferdie = MockPrimaryNode::run_mock_primary_node( - tokio_handle.clone(), - Ferdie, - BasePath::new(directory.path().join("ferdie")), - ); - - // Run Alice (a system domain authority node) - let mut alice = domain_test_service::SystemDomainNodeBuilder::new( - tokio_handle.clone(), - Alice, - BasePath::new(directory.path().join("alice")), - ) - .run_relayer() - .build_with_mock_primary_node(Role::Authority, &mut ferdie) - .await; - - // Run Bob (a core payments domain authority node) - let mut bob = domain_test_service::CoreDomainNodeBuilder::new( - tokio_handle.clone(), - Bob, - BasePath::new(directory.path().join("bob")), - ) - .run_relayer() - .build_core_payments_node(Role::Authority, &mut ferdie, &alice) - .await; - - // Run Charlie (a core eth relay domain authority node) - let mut charlie = domain_test_service::CoreDomainNodeBuilder::new( - tokio_handle.clone(), - Charlie, - BasePath::new(directory.path().join("charlie")), - ) - .run_relayer() - .build_core_eth_relay_node(Role::Authority, &mut ferdie, &alice) - .await; - - // Run the cross domain gossip message worker - ferdie.start_cross_domain_gossip_message_worker(); - - produce_blocks!(ferdie, alice, bob, charlie, 3) - .await - .unwrap(); - - // Open channel between the system domain and the core payments domain - let fee_model = FeeModel { - outbox_fee: ExecutionFee { - relayer_pool_fee: 2, - compute_fee: 0, - }, - inbox_fee: ExecutionFee { - relayer_pool_fee: 0, - compute_fee: 5, - }, - }; - bob.construct_and_send_extrinsic(pallet_sudo::Call::sudo { - call: Box::new(core_payments_domain_test_runtime::RuntimeCall::Messenger( - pallet_messenger::Call::initiate_channel { - dst_domain_id: DomainId::SYSTEM, - params: InitiateChannelParams { - max_outgoing_messages: 100, - fee_model, - }, - }, - )), - }) - .await - .expect("Failed to construct and send extrinsic"); - // Wait until channel open - produce_blocks_until!(ferdie, alice, bob, { - alice - .get_open_channel_for_domain(DomainId::CORE_PAYMENTS) - .is_some() - && bob.get_open_channel_for_domain(DomainId::SYSTEM).is_some() - }) - .await - .unwrap(); - - // Transfer balance cross the system domain and the core payments domain - let pre_alice_free_balance = alice.free_balance(alice.key.to_account_id()); - let pre_bob_free_balance = bob.free_balance(bob.key.to_account_id()); - let transfer_amount = 10; - alice - .construct_and_send_extrinsic(pallet_transporter::Call::transfer { - dst_location: pallet_transporter::Location { - domain_id: DomainId::CORE_PAYMENTS, - account_id: AccountIdConverter::convert(Bob.into()), - }, - amount: transfer_amount, - }) - .await - .expect("Failed to construct and send extrinsic"); - // Wait until transfer succeed - produce_blocks_until!(ferdie, alice, bob, charlie, { - let post_alice_free_balance = alice.free_balance(alice.key.to_account_id()); - let post_bob_free_balance = bob.free_balance(bob.key.to_account_id()); - - post_alice_free_balance - == pre_alice_free_balance - - transfer_amount - - fee_model.outbox_fee().unwrap() - - fee_model.inbox_fee().unwrap() - && post_bob_free_balance == pre_bob_free_balance + transfer_amount - }) - .await - .unwrap(); - - // Open channel between the core payments domain and the core eth relay domain - let fee_model = FeeModel { - outbox_fee: ExecutionFee { - relayer_pool_fee: 1, - compute_fee: 5, - }, - inbox_fee: ExecutionFee { - relayer_pool_fee: 2, - compute_fee: 3, - }, - }; - charlie - .construct_and_send_extrinsic(pallet_sudo::Call::sudo { - call: Box::new(core_eth_relay_domain_test_runtime::RuntimeCall::Messenger( - pallet_messenger::Call::initiate_channel { - dst_domain_id: DomainId::CORE_PAYMENTS, - params: InitiateChannelParams { - max_outgoing_messages: 100, - fee_model, - }, - }, - )), - }) - .await - .expect("Failed to construct and send extrinsic"); - // Wait until channel open - produce_blocks_until!(ferdie, alice, bob, charlie, { - bob.get_open_channel_for_domain(DomainId::CORE_ETH_RELAY) - .is_some() - && charlie - .get_open_channel_for_domain(DomainId::CORE_PAYMENTS) - .is_some() - }) - .await - .unwrap(); - - // Transfer balance cross the core payments domain and the core eth relay domain - let pre_bob_free_balance = bob.free_balance(bob.key.to_account_id()); - let pre_charlie_free_balance = charlie.free_balance(charlie.key.to_account_id()); - let transfer_amount = 10; - bob.construct_and_send_extrinsic(pallet_transporter::Call::transfer { - dst_location: pallet_transporter::Location { - domain_id: DomainId::CORE_ETH_RELAY, - account_id: AccountIdConverter::convert(Charlie.into()), - }, - amount: transfer_amount, - }) - .await - .expect("Failed to construct and send extrinsic"); - // Wait until transfer succeed - produce_blocks_until!(ferdie, alice, bob, charlie, { - let post_bob_free_balance = bob.free_balance(bob.key.to_account_id()); - let post_charlie_free_balance = charlie.free_balance(charlie.key.to_account_id()); - - post_bob_free_balance - == pre_bob_free_balance - - transfer_amount - - fee_model.outbox_fee().unwrap() - - fee_model.inbox_fee().unwrap() - && post_charlie_free_balance == pre_charlie_free_balance + transfer_amount - }) - .await - .unwrap(); -} +// TODO: Unlock test when fixed (core-eth-relay was removed) +// #[substrate_test_utils::test(flavor = "multi_thread")] +// async fn test_cross_domains_message_should_work() { +// let directory = TempDir::new().expect("Must be able to create temporary directory"); +// +// let mut builder = sc_cli::LoggerBuilder::new(""); +// builder.with_colors(false); +// let _ = builder.init(); +// +// let tokio_handle = tokio::runtime::Handle::current(); +// +// // Start Ferdie +// let mut ferdie = MockPrimaryNode::run_mock_primary_node( +// tokio_handle.clone(), +// Ferdie, +// BasePath::new(directory.path().join("ferdie")), +// ); +// +// // Run Alice (a system domain authority node) +// let mut alice = domain_test_service::SystemDomainNodeBuilder::new( +// tokio_handle.clone(), +// Alice, +// BasePath::new(directory.path().join("alice")), +// ) +// .run_relayer() +// .build_with_mock_primary_node(Role::Authority, &mut ferdie) +// .await; +// +// // Run Bob (a core payments domain authority node) +// let mut bob = domain_test_service::CoreDomainNodeBuilder::new( +// tokio_handle.clone(), +// Bob, +// BasePath::new(directory.path().join("bob")), +// ) +// .run_relayer() +// .build_core_payments_node(Role::Authority, &mut ferdie, &alice) +// .await; +// +// // Run Charlie (a core eth relay domain authority node) +// let mut charlie = domain_test_service::CoreDomainNodeBuilder::new( +// tokio_handle.clone(), +// Charlie, +// BasePath::new(directory.path().join("charlie")), +// ) +// .run_relayer() +// .build_core_eth_relay_node(Role::Authority, &mut ferdie, &alice) +// .await; +// +// // Run the cross domain gossip message worker +// ferdie.start_cross_domain_gossip_message_worker(); +// +// produce_blocks!(ferdie, alice, bob, charlie, 3) +// .await +// .unwrap(); +// +// // Open channel between the system domain and the core payments domain +// let fee_model = FeeModel { +// outbox_fee: ExecutionFee { +// relayer_pool_fee: 2, +// compute_fee: 0, +// }, +// inbox_fee: ExecutionFee { +// relayer_pool_fee: 0, +// compute_fee: 5, +// }, +// }; +// bob.construct_and_send_extrinsic(pallet_sudo::Call::sudo { +// call: Box::new(core_payments_domain_test_runtime::RuntimeCall::Messenger( +// pallet_messenger::Call::initiate_channel { +// dst_domain_id: DomainId::SYSTEM, +// params: InitiateChannelParams { +// max_outgoing_messages: 100, +// fee_model, +// }, +// }, +// )), +// }) +// .await +// .expect("Failed to construct and send extrinsic"); +// // Wait until channel open +// produce_blocks_until!(ferdie, alice, bob, { +// alice +// .get_open_channel_for_domain(DomainId::CORE_PAYMENTS) +// .is_some() +// && bob.get_open_channel_for_domain(DomainId::SYSTEM).is_some() +// }) +// .await +// .unwrap(); +// +// // Transfer balance cross the system domain and the core payments domain +// let pre_alice_free_balance = alice.free_balance(alice.key.to_account_id()); +// let pre_bob_free_balance = bob.free_balance(bob.key.to_account_id()); +// let transfer_amount = 10; +// alice +// .construct_and_send_extrinsic(pallet_transporter::Call::transfer { +// dst_location: pallet_transporter::Location { +// domain_id: DomainId::CORE_PAYMENTS, +// account_id: AccountIdConverter::convert(Bob.into()), +// }, +// amount: transfer_amount, +// }) +// .await +// .expect("Failed to construct and send extrinsic"); +// // Wait until transfer succeed +// produce_blocks_until!(ferdie, alice, bob, charlie, { +// let post_alice_free_balance = alice.free_balance(alice.key.to_account_id()); +// let post_bob_free_balance = bob.free_balance(bob.key.to_account_id()); +// +// post_alice_free_balance +// == pre_alice_free_balance +// - transfer_amount +// - fee_model.outbox_fee().unwrap() +// - fee_model.inbox_fee().unwrap() +// && post_bob_free_balance == pre_bob_free_balance + transfer_amount +// }) +// .await +// .unwrap(); +// +// // Open channel between the core payments domain and the core eth relay domain +// let fee_model = FeeModel { +// outbox_fee: ExecutionFee { +// relayer_pool_fee: 1, +// compute_fee: 5, +// }, +// inbox_fee: ExecutionFee { +// relayer_pool_fee: 2, +// compute_fee: 3, +// }, +// }; +// charlie +// .construct_and_send_extrinsic(pallet_sudo::Call::sudo { +// call: Box::new(core_eth_relay_domain_test_runtime::RuntimeCall::Messenger( +// pallet_messenger::Call::initiate_channel { +// dst_domain_id: DomainId::CORE_PAYMENTS, +// params: InitiateChannelParams { +// max_outgoing_messages: 100, +// fee_model, +// }, +// }, +// )), +// }) +// .await +// .expect("Failed to construct and send extrinsic"); +// // Wait until channel open +// produce_blocks_until!(ferdie, alice, bob, charlie, { +// bob.get_open_channel_for_domain(DomainId::CORE_ETH_RELAY) +// .is_some() +// && charlie +// .get_open_channel_for_domain(DomainId::CORE_PAYMENTS) +// .is_some() +// }) +// .await +// .unwrap(); +// +// // Transfer balance cross the core payments domain and the core eth relay domain +// let pre_bob_free_balance = bob.free_balance(bob.key.to_account_id()); +// let pre_charlie_free_balance = charlie.free_balance(charlie.key.to_account_id()); +// let transfer_amount = 10; +// bob.construct_and_send_extrinsic(pallet_transporter::Call::transfer { +// dst_location: pallet_transporter::Location { +// domain_id: DomainId::CORE_ETH_RELAY, +// account_id: AccountIdConverter::convert(Charlie.into()), +// }, +// amount: transfer_amount, +// }) +// .await +// .expect("Failed to construct and send extrinsic"); +// // Wait until transfer succeed +// produce_blocks_until!(ferdie, alice, bob, charlie, { +// let post_bob_free_balance = bob.free_balance(bob.key.to_account_id()); +// let post_charlie_free_balance = charlie.free_balance(charlie.key.to_account_id()); +// +// post_bob_free_balance +// == pre_bob_free_balance +// - transfer_amount +// - fee_model.outbox_fee().unwrap() +// - fee_model.inbox_fee().unwrap() +// && post_charlie_free_balance == pre_charlie_free_balance + transfer_amount +// }) +// .await +// .unwrap(); +// } #[substrate_test_utils::test(flavor = "multi_thread")] async fn test_unordered_cross_domains_message_should_work() { diff --git a/domains/client/eth-service/Cargo.toml b/domains/client/eth-service/Cargo.toml index c28b93688e..66281d0810 100644 --- a/domains/client/eth-service/Cargo.toml +++ b/domains/client/eth-service/Cargo.toml @@ -15,26 +15,27 @@ include = [ clap = { version = "4.2.1", 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/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -fc-db = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -fc-mapping-sync = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -fc-rpc = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b", features = ['rpc-binary-search-estimate'] } -fc-rpc-core = { version = "1.1.0-dev", git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -fc-storage = { version = "1.0.0-dev", git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -fp-rpc = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b", features = ['default'] } +fc-consensus = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +fc-db = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +fc-mapping-sync = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +fc-rpc = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4", features = ['rpc-binary-search-estimate'] } +fc-rpc-core = { version = "1.1.0-dev", git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +fc-storage = { version = "1.0.0-dev", git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +fp-rpc = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4", features = ['default'] } futures = "0.3.28" jsonrpsee = { version = "0.16.2", features = ["server"] } -pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } serde = { version = "1.0.159", features = ["derive"] } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } diff --git a/domains/client/eth-service/src/provider.rs b/domains/client/eth-service/src/provider.rs index aef22997b8..3f3444ba72 100644 --- a/domains/client/eth-service/src/provider.rs +++ b/domains/client/eth-service/src/provider.rs @@ -1,7 +1,6 @@ use crate::rpc::{create_eth_rpc, EthDeps}; use crate::service::{ - new_frontier_partial, spawn_frontier_tasks, EthConfiguration, FrontierBackend, - FrontierPartialComponents, + new_frontier_partial, spawn_frontier_tasks, EthConfiguration, FrontierPartialComponents, }; use clap::Parser; use domain_runtime_primitives::{Balance, Index}; @@ -26,6 +25,7 @@ use sp_api::{ApiExt, BlockT, CallApiAt, ConstructRuntimeApi, Core, ProvideRuntim use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_core::traits::SpawnEssentialNamed; +use sp_core::H256; use sp_runtime::codec::{Decode, Encode}; use std::error::Error; use std::fmt::{Debug, Display}; @@ -87,7 +87,7 @@ where impl RpcProvider for EthProvider where - Block: BlockT, + Block: BlockT, BE: Backend + 'static, Client: ProvideRuntimeApi + BlockchainEvents @@ -125,7 +125,7 @@ where Some(base_path) => BasePath::new(base_path.path()), }; - let frontier_backend = Arc::new(FrontierBackend::open( + let frontier_backend = Arc::new(fc_db::kv::Backend::open( client, &full_deps.database_source, base_path.path(), @@ -141,6 +141,7 @@ where full_deps: full_deps.clone(), converter: Some(CT::default()), enable_dev_signer: self.eth_config.enable_dev_signer, + sync: full_deps.sync.clone(), frontier_backend, overrides: overrides.clone(), block_data_cache: Arc::new(fc_rpc::EthBlockDataCacheTask::new( @@ -155,6 +156,7 @@ where fee_history_cache, fee_history_cache_limit, execute_gas_limit_multiplier: self.eth_config.execute_gas_limit_multiplier, + forced_parent_hashes: None, }) } @@ -178,10 +180,20 @@ where essential_task_spawner.clone(), )?; + // Sinks for pubsub notifications. + // Everytime a new subscription is created, a new mpsc channel is added to the sink pool. + // The MappingSyncWorker sends through the channel on block import and the subscription emits a notification to the subscriber on receiving a message through this channel. + // This way we avoid race conditions when using native substrate block import notification stream. + let pubsub_notification_sinks: fc_mapping_sync::EthereumBlockNotificationSinks< + fc_mapping_sync::EthereumBlockNotification, + > = Default::default(); + let pubsub_notification_sinks = Arc::new(pubsub_notification_sinks); + let io = create_eth_rpc::( io, deps.clone(), subscription_task_executor, + pubsub_notification_sinks.clone(), )?; // spawn essential rpc tasks @@ -196,6 +208,8 @@ where fee_history_cache: deps.fee_history_cache, fee_history_cache_limit: deps.fee_history_cache_limit, }, + deps.sync, + pubsub_notification_sinks, ); Ok(io) } diff --git a/domains/client/eth-service/src/rpc.rs b/domains/client/eth-service/src/rpc.rs index fd1c741ea2..33766867aa 100644 --- a/domains/client/eth-service/src/rpc.rs +++ b/domains/client/eth-service/src/rpc.rs @@ -1,5 +1,5 @@ use domain_service::rpc::FullDeps; -use fc_db::Backend as FrontierBackend; +use fc_mapping_sync::{EthereumBlockNotification, EthereumBlockNotificationSinks}; use fc_rpc::{ Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub, EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer, @@ -12,13 +12,16 @@ use fp_rpc::{ConvertTransaction, ConvertTransactionRuntimeApi, EthereumRuntimeRP use jsonrpsee::RpcModule; use sc_client_api::backend::{Backend, StorageProvider}; use sc_client_api::client::BlockchainEvents; +use sc_network_sync::SyncingService; use sc_rpc::SubscriptionTaskExecutor; use sc_transaction_pool::ChainApi; use sc_transaction_pool_api::TransactionPool; use sp_api::{CallApiAt, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sp_core::H256; use sp_runtime::traits::Block as BlockT; +use std::collections::BTreeMap; use std::sync::Arc; pub struct DefaultEthConfig(std::marker::PhantomData<(Client, Backend)>); @@ -42,8 +45,10 @@ pub struct EthDeps { pub converter: Option, /// Whether to enable dev signer pub enable_dev_signer: bool, + /// Chain syncing service + pub sync: Arc>, /// Frontier Backend. - pub frontier_backend: Arc>, + pub frontier_backend: Arc>, /// Ethereum data access overrides. pub overrides: Arc>, /// Cache for Ethereum block data. @@ -59,6 +64,8 @@ pub struct EthDeps { /// Maximum allowed gas limit will be ` block.gas_limit * execute_gas_limit_multiplier` when /// using eth_call/eth_estimateGas. pub execute_gas_limit_multiplier: u64, + /// Mandated parent hashes for a given block hash. + pub forced_parent_hashes: Option>, } impl Clone @@ -69,6 +76,7 @@ impl Clone full_deps: self.full_deps.clone(), converter: self.converter.clone(), enable_dev_signer: self.enable_dev_signer, + sync: self.sync.clone(), frontier_backend: self.frontier_backend.clone(), overrides: self.overrides.clone(), block_data_cache: self.block_data_cache.clone(), @@ -77,6 +85,7 @@ impl Clone fee_history_cache: self.fee_history_cache.clone(), fee_history_cache_limit: self.fee_history_cache_limit, execute_gas_limit_multiplier: self.execute_gas_limit_multiplier, + forced_parent_hashes: self.forced_parent_hashes.clone(), } } } @@ -86,9 +95,12 @@ pub(crate) fn create_eth_rpc, deps: EthDeps, subscription_task_executor: SubscriptionTaskExecutor, + pubsub_notification_sinks: Arc< + EthereumBlockNotificationSinks>, + >, ) -> Result, Box> where - Block: BlockT, + Block: BlockT, Client: CallApiAt + ProvideRuntimeApi, Client::Api: BlockBuilderApi + EthereumRuntimeRPCApi + ConvertTransactionRuntimeApi, @@ -113,6 +125,8 @@ where fee_history_cache, fee_history_cache_limit, execute_gas_limit_multiplier, + forced_parent_hashes, + .. } = deps; let FullDeps { @@ -145,6 +159,7 @@ where fee_history_cache, fee_history_cache_limit, execute_gas_limit_multiplier, + forced_parent_hashes, ) .replace_config::() .into_rpc(), @@ -171,6 +186,7 @@ where sync, subscription_task_executor, overrides, + pubsub_notification_sinks, ) .into_rpc(), )?; diff --git a/domains/client/eth-service/src/service.rs b/domains/client/eth-service/src/service.rs index f7c6239d91..9ac258f9c7 100644 --- a/domains/client/eth-service/src/service.rs +++ b/domains/client/eth-service/src/service.rs @@ -1,10 +1,12 @@ pub use fc_consensus::FrontierBlockImport; -pub use fc_db::frontier_database_dir; -use fc_mapping_sync::{MappingSyncWorker, SyncStrategy}; +pub use fc_db::kv::frontier_database_dir; +use fc_mapping_sync::kv::MappingSyncWorker; +use fc_mapping_sync::SyncStrategy; use fc_rpc::{EthTask, OverrideHandle}; pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool}; use futures::{future, StreamExt}; use sc_client_api::{BlockchainEvents, StorageProvider}; +use sc_network_sync::SyncingService; use sc_service::error::Error as ServiceError; use sp_api::{BlockT, ProvideRuntimeApi}; use sp_blockchain::HeaderBackend; @@ -14,9 +16,6 @@ use std::collections::BTreeMap; use std::sync::{Arc, Mutex}; use std::time::Duration; -/// Frontier DB backend type. -pub type FrontierBackend = fc_db::Backend; - /// The ethereum-compatibility configuration used to run a node. #[derive(Clone, Debug, clap::Parser)] pub struct EthConfiguration { @@ -65,13 +64,20 @@ pub(crate) fn new_frontier_partial( }) } +#[allow(clippy::too_many_arguments)] pub(crate) fn spawn_frontier_tasks( essential_task_spawner: SE, client: Arc, backend: Arc, - frontier_backend: Arc>, + frontier_backend: Arc>, overrides: Arc>, frontier_partial_components: FrontierPartialComponents, + sync: Arc>, + pubsub_notification_sinks: Arc< + fc_mapping_sync::EthereumBlockNotificationSinks< + fc_mapping_sync::EthereumBlockNotification, + >, + >, ) where Block: BlockT, Backend: sc_client_api::Backend + 'static, @@ -101,6 +107,8 @@ pub(crate) fn spawn_frontier_tasks( 3, NumberFor::::zero(), SyncStrategy::Normal, + sync, + pubsub_notification_sinks, ) .for_each(|()| future::ready(())), ), diff --git a/domains/client/executor-gossip/Cargo.toml b/domains/client/executor-gossip/Cargo.toml index 5edfc9caa1..11bfd38e6a 100644 --- a/domains/client/executor-gossip/Cargo.toml +++ b/domains/client/executor-gossip/Cargo.toml @@ -8,11 +8,11 @@ edition = "2021" futures = "0.3.28" parity-scale-codec = { version = "3.4.0", features = ["derive"] } parking_lot = "0.12.1" -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } tracing = "0.1.37" diff --git a/domains/client/executor-gossip/src/lib.rs b/domains/client/executor-gossip/src/lib.rs index 16cf1faebd..5fc944f40b 100644 --- a/domains/client/executor-gossip/src/lib.rs +++ b/domains/client/executor-gossip/src/lib.rs @@ -31,7 +31,8 @@ const REBROADCAST_AFTER: Duration = Duration::from_secs(6); type MessageHash = [u8; 8]; -/// Returns the configuration value to put in [`sc_network::config::NetworkConfiguration::extra_sets`]. +/// Returns the configuration value to use in +/// [`sc_network::config::FullNetworkConfiguration::add_notification_protocol`]. pub fn executor_gossip_peers_set_config() -> NonDefaultSetConfig { let mut cfg = NonDefaultSetConfig::new(EXECUTOR_PROTOCOL_NAME.into(), 1024 * 1024); cfg.allow_non_reserved(25, 25); diff --git a/domains/client/relayer/Cargo.toml b/domains/client/relayer/Cargo.toml index 76c5eade9a..b48f577034 100644 --- a/domains/client/relayer/Cargo.toml +++ b/domains/client/relayer/Cargo.toml @@ -18,18 +18,18 @@ domain-runtime-primitives = { path = "../../primitives/runtime" } futures = "0.3.28" parity-scale-codec = { version = "3.4.0", features = ["derive"] } parking_lot = "0.12.1" -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } sp-messenger = { version = "0.1.0", path = "../../primitives/messenger" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", path = "../../../crates/sp-settlement" } system-runtime-primitives = { version = "0.1.0", path = "../../primitives/system-runtime" } tracing = "0.1.37" diff --git a/domains/pallets/domain-registry/Cargo.toml b/domains/pallets/domain-registry/Cargo.toml index ece34028a9..a6e5a5d44f 100644 --- a/domains/pallets/domain-registry/Cargo.toml +++ b/domains/pallets/domain-registry/Cargo.toml @@ -13,25 +13,25 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } log = { version = "0.4.17", default-features = false } pallet-settlement = { version = "0.1.0", default-features = false, path = "../../../crates/pallet-settlement" } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } serde = { version = "1.0.159", optional = true } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } sp-domain-digests = { version = "0.1.0", path = "../../primitives/digests", default-features = false } sp-executor-registry = { version = "0.1.0", path = "../../primitives/executor-registry", default-features = false } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-std = { version = "5.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-trie = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-std = { version = "8.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-trie = { version = "22.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } [dev-dependencies] -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-executor-registry = { version = "0.1.0", path = "../executor-registry" } -sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/domains/pallets/domain-registry/src/lib.rs b/domains/pallets/domain-registry/src/lib.rs index f4ce5336bc..f3700faf42 100644 --- a/domains/pallets/domain-registry/src/lib.rs +++ b/domains/pallets/domain-registry/src/lib.rs @@ -213,7 +213,7 @@ mod pallet { // TODO: proper weight #[pallet::call_index(1)] - #[pallet::weight(10_000)] + #[pallet::weight({10_000})] pub fn update_domain_config( origin: OriginFor, domain_id: DomainId, @@ -378,7 +378,6 @@ mod pallet { } } - #[cfg(feature = "std")] type GenesisDomainInfo = ( ::AccountId, BalanceOf, @@ -388,20 +387,11 @@ mod pallet { ); #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub domains: Vec>, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - #[inline] - fn default() -> Self { - Self { - domains: Vec::new(), - } - } - } - #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { @@ -914,7 +904,7 @@ impl Pallet { verify_bundle_solution_threshold( domain_id, - *vrf_output, + vrf_output, stake_weight, total_stake_weight, slot_probability, diff --git a/domains/pallets/domain-registry/src/tests.rs b/domains/pallets/domain-registry/src/tests.rs index a128c4df35..e92b109b8c 100644 --- a/domains/pallets/domain-registry/src/tests.rs +++ b/domains/pallets/domain-registry/src/tests.rs @@ -81,7 +81,7 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } diff --git a/domains/pallets/executive/Cargo.toml b/domains/pallets/executive/Cargo.toml index 7daa34552d..452b115978 100644 --- a/domains/pallets/executive/Cargo.toml +++ b/domains/pallets/executive/Cargo.toml @@ -13,22 +13,22 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-executive = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-std = { version = "5.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-tracing = { version = "6.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } +frame-executive = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-std = { version = "8.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-tracing = { version = "10.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } [dev-dependencies] hex-literal = "0.4.0" -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-version = { version = "22.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/domains/pallets/executive/src/lib.rs b/domains/pallets/executive/src/lib.rs index cbc447f811..1d36dfbfa3 100644 --- a/domains/pallets/executive/src/lib.rs +++ b/domains/pallets/executive/src/lib.rs @@ -307,16 +307,10 @@ where Self::initial_checks(&block); - let signature_batching = sp_runtime::SignatureBatching::start(); - // execute extrinsics let (header, extrinsics) = block.deconstruct(); Self::execute_extrinsics_with_book_keeping(extrinsics, *header.number()); - if !signature_batching.verify() { - panic!("Signature verification failed."); - } - Self::final_checks(&header); } } diff --git a/domains/pallets/executor-registry/Cargo.toml b/domains/pallets/executor-registry/Cargo.toml index d266cbff3b..885f2987f7 100644 --- a/domains/pallets/executor-registry/Cargo.toml +++ b/domains/pallets/executor-registry/Cargo.toml @@ -13,22 +13,22 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -frame-support = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -frame-system = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-arithmetic = { version = "6.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false, optional = true } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +frame-support = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +frame-system = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-arithmetic = { version = "16.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false, optional = true } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } sp-executor-registry = { version = "0.1.0", path = "../../primitives/executor-registry", default-features = false } -sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-std = { version = "5.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-std = { version = "8.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives", default-features = false } [dev-dependencies] -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/domains/pallets/executor-registry/src/lib.rs b/domains/pallets/executor-registry/src/lib.rs index 9715698e7b..7843bab84c 100644 --- a/domains/pallets/executor-registry/src/lib.rs +++ b/domains/pallets/executor-registry/src/lib.rs @@ -232,7 +232,7 @@ mod pallet { /// Declare no desire to be an executor and remove the registration. // TODO: proper weight #[pallet::call_index(1)] - #[pallet::weight(10_000)] + #[pallet::weight({10_000})] pub fn deregister(origin: OriginFor) -> DispatchResult { let _who = ensure_signed(origin)?; @@ -500,7 +500,6 @@ mod pallet { } } - #[cfg(feature = "std")] type GenesisExecutorInfo = ( ::AccountId, BalanceOf, @@ -514,7 +513,6 @@ mod pallet { pub slot_probability: (u64, u64), } - #[cfg(feature = "std")] impl Default for GenesisConfig { #[inline] fn default() -> Self { @@ -810,7 +808,6 @@ impl ExecutorRegistry, T::StakeWeight> for Self::key_owner_hashed_key_for(executor_public_key) } - #[cfg(feature = "std")] fn authority_stake_weight(who: &T::AccountId) -> Option { Executors::::get(who).and_then(|executor_config| { Authorities::::get() diff --git a/domains/pallets/executor-registry/src/tests.rs b/domains/pallets/executor-registry/src/tests.rs index be927ff83f..64fbe68664 100644 --- a/domains/pallets/executor-registry/src/tests.rs +++ b/domains/pallets/executor-registry/src/tests.rs @@ -76,7 +76,7 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } diff --git a/domains/pallets/messenger/Cargo.toml b/domains/pallets/messenger/Cargo.toml index d961f5adbd..35c6e5733f 100644 --- a/domains/pallets/messenger/Cargo.toml +++ b/domains/pallets/messenger/Cargo.toml @@ -15,23 +15,23 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } 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 = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-trie = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [dev-dependencies] domain-runtime-primitives = { path = "../../primitives/runtime" } -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-transporter = { version = "0.1.0", path = "../transporter" } -sp-state-machine = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/domains/pallets/messenger/src/lib.rs b/domains/pallets/messenger/src/lib.rs index aae4fc58b7..1a5a74162f 100644 --- a/domains/pallets/messenger/src/lib.rs +++ b/domains/pallets/messenger/src/lib.rs @@ -114,6 +114,7 @@ mod pallet { use sp_runtime::traits::CheckedSub; use sp_runtime::ArithmeticError; use sp_std::boxed::Box; + use sp_std::vec::Vec; #[pallet::config] pub trait Config: frame_system::Config { @@ -307,22 +308,12 @@ mod pallet { } #[pallet::genesis_config] - #[derive(Debug)] + #[derive(Debug, frame_support::DefaultNoBound)] pub struct GenesisConfig { /// Genesis relayers that join the relayer pool. pub relayers: Vec<(T::AccountId, RelayerId)>, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - #[inline] - fn default() -> Self { - Self { - relayers: Default::default(), - } - } - } - #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { diff --git a/domains/pallets/messenger/src/mock.rs b/domains/pallets/messenger/src/mock.rs index 1c3fbc3663..18f2be954d 100644 --- a/domains/pallets/messenger/src/mock.rs +++ b/domains/pallets/messenger/src/mock.rs @@ -136,7 +136,7 @@ macro_rules! impl_runtime { type WeightInfo = (); type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } diff --git a/domains/pallets/transporter/Cargo.toml b/domains/pallets/transporter/Cargo.toml index 18b8d1258d..a098a71a77 100644 --- a/domains/pallets/transporter/Cargo.toml +++ b/domains/pallets/transporter/Cargo.toml @@ -16,19 +16,19 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } domain-runtime-primitives = { path = "../../primitives/runtime" , default-features = false } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } 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 = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [dev-dependencies] -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/domains/pallets/transporter/src/mock.rs b/domains/pallets/transporter/src/mock.rs index aad6025f2b..e34f28d600 100644 --- a/domains/pallets/transporter/src/mock.rs +++ b/domains/pallets/transporter/src/mock.rs @@ -72,7 +72,7 @@ impl pallet_balances::Config for MockRuntime { type WeightInfo = (); type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } diff --git a/domains/primitives/digests/Cargo.toml b/domains/primitives/digests/Cargo.toml index da73302873..8a1ec38b31 100644 --- a/domains/primitives/digests/Cargo.toml +++ b/domains/primitives/digests/Cargo.toml @@ -15,10 +15,10 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/domains/primitives/executor-registry/Cargo.toml b/domains/primitives/executor-registry/Cargo.toml index b3d2098ecb..f2691b5dad 100644 --- a/domains/primitives/executor-registry/Cargo.toml +++ b/domains/primitives/executor-registry/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/domains/primitives/executor-registry/src/lib.rs b/domains/primitives/executor-registry/src/lib.rs index 69ab51bf7d..e613760b1f 100644 --- a/domains/primitives/executor-registry/src/lib.rs +++ b/domains/primitives/executor-registry/src/lib.rs @@ -33,7 +33,6 @@ pub trait ExecutorRegistry { fn key_owner_storage_key(executor_public_key: &ExecutorPublicKey) -> Vec; /// Returns `Some(stake_weight)` if the given account is an authority. - #[cfg(feature = "std")] fn authority_stake_weight(who: &AccountId) -> Option; /// Register an executor without check, only use in benchmark. @@ -54,7 +53,6 @@ impl ExecutorRegistry Option { None } diff --git a/domains/primitives/messenger/Cargo.toml b/domains/primitives/messenger/Cargo.toml index 3a51b96471..01c6fe9e8d 100644 --- a/domains/primitives/messenger/Cargo.toml +++ b/domains/primitives/messenger/Cargo.toml @@ -15,15 +15,15 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } hash-db = { version = "0.16.0", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-trie = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/domains/primitives/messenger/src/messages.rs b/domains/primitives/messenger/src/messages.rs index 084db10aa2..b78c67a0bb 100644 --- a/domains/primitives/messenger/src/messages.rs +++ b/domains/primitives/messenger/src/messages.rs @@ -307,7 +307,7 @@ impl CrossDomainMessage, pub inbox_responses: Vec, diff --git a/domains/primitives/runtime/Cargo.toml b/domains/primitives/runtime/Cargo.toml index c91a056df5..d60ebad3d7 100644 --- a/domains/primitives/runtime/Cargo.toml +++ b/domains/primitives/runtime/Cargo.toml @@ -13,11 +13,11 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } [features] diff --git a/domains/primitives/system-runtime/Cargo.toml b/domains/primitives/system-runtime/Cargo.toml index d68954908b..46d0e9643c 100644 --- a/domains/primitives/system-runtime/Cargo.toml +++ b/domains/primitives/system-runtime/Cargo.toml @@ -13,11 +13,11 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] diff --git a/domains/runtime/core-eth-relay/Cargo.toml b/domains/runtime/core-eth-relay/Cargo.toml deleted file mode 100644 index 9749216245..0000000000 --- a/domains/runtime/core-eth-relay/Cargo.toml +++ /dev/null @@ -1,111 +0,0 @@ -[package] -name = "core-eth-relay-runtime" -version = "0.1.0" -authors = ["Liu-Cheng Xu , Parth Desai "] -license = "Apache-2.0" -homepage = "https://subspace.network" -repository = "https://github.com/subspace/subspace/" -edition = "2021" -links = "core-eth-relay-runtime" - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.2.1", 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 = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -hex-literal = { version = '0.4.0', optional = true } -log = { version = "0.4.17", default-features = false } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-feeds = { version = "0.1.0", path = "../../../crates/pallet-feeds", default-features = false } -pallet-messenger = { version = "0.1.0", path = "../../pallets/messenger", default-features = false } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -# Light client pallet and primitives -snowbridge-beacon-primitives = { git = "https://github.com/Snowfork/snowbridge", rev = "cac98d860b8f24a9c3a3eabb5bcbee8dc2880960", default-features = false } -snowbridge-ethereum-beacon-client = { git = "https://github.com/Snowfork/snowbridge", rev = "cac98d860b8f24a9c3a3eabb5bcbee8dc2880960", default-features = false } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } - -[build-dependencies] -subspace-wasm-tools = { version = "0.1.0", path = "../../../crates/subspace-wasm-tools" } -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } - -[features] -default = [ - "std", -] -std = [ - "codec/std", - "domain-pallet-executive/std", - "domain-runtime-primitives/std", - "frame-benchmarking?/std", - "frame-support/std", - "frame-system/std", - "frame-system-benchmarking?/std", - "frame-system-rpc-runtime-api/std", - "log/std", - "pallet-balances/std", - "pallet-feeds/std", - "pallet-messenger/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-transporter/std", - "scale-info/std", - "snowbridge-beacon-primitives/std", - "snowbridge-ethereum-beacon-client/std", - "sp-api/std", - "sp-block-builder/std", - "sp-core/std", - "sp-domains/std", - "sp-session/std", - "sp-inherents/std", - "sp-io/std", - "sp-messenger/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "subspace-runtime-primitives/std", - "substrate-wasm-builder", -] -# Internal implementation detail, enabled during building of wasm blob. -wasm-builder = [] -runtime-benchmarks = [ - 'hex-literal', - "sp-runtime/runtime-benchmarks", - "frame-benchmarking", - "frame-benchmarking/runtime-benchmarks", - "frame-system-benchmarking", - "frame-system-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "snowbridge-ethereum-beacon-client/runtime-benchmarks" -] diff --git a/domains/runtime/core-eth-relay/build.rs b/domains/runtime/core-eth-relay/build.rs deleted file mode 100644 index a9033702fe..0000000000 --- a/domains/runtime/core-eth-relay/build.rs +++ /dev/null @@ -1,13 +0,0 @@ -fn main() { - #[cfg(feature = "std")] - { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .enable_feature("wasm-builder") - .export_heap_base() - .import_memory() - .build(); - } - - subspace_wasm_tools::export_wasm_bundle_path(); -} diff --git a/domains/runtime/core-eth-relay/src/feed_processor.rs b/domains/runtime/core-eth-relay/src/feed_processor.rs deleted file mode 100644 index 73630a6429..0000000000 --- a/domains/runtime/core-eth-relay/src/feed_processor.rs +++ /dev/null @@ -1,156 +0,0 @@ -use crate::{AccountId, FeedId, Runtime}; -use codec::{Decode, Encode}; -use frame_support::dispatch::{RawOrigin, TypeInfo}; -use pallet_feeds::feed_processor::{FeedMetadata, FeedObjectMapping, FeedProcessor}; -use snowbridge_ethereum_beacon_client::{ - FinalizedHeaderUpdateOf, HeaderUpdateOf, Pallet, SyncCommitteePeriodUpdateOf, -}; -use sp_core::TypeId; -use sp_runtime::traits::AccountIdConversion; -use sp_runtime::DispatchError; -use sp_std::prelude::*; - -/// A feed processor identifier. It is used by the feed processor to derive sovereign account id -#[derive(Clone, Copy, Eq, PartialEq, Encode, Decode, TypeInfo)] -pub struct FeedProcessorId(pub [u8; 8]); - -impl TypeId for FeedProcessorId { - const TYPE_ID: [u8; 4] = *b"feed"; -} - -#[derive(Encode, Decode)] -pub struct FeedProcessorData { - pub sync_committee_update: Option>, - pub finalized_header_update: Option>, - pub header_update: Option>, -} - -impl FeedProcessorData { - /// checks if the feed data we got is valid or not. - /// As of now, only constraint is at least one component need to be `Some` - pub fn is_valid(&self) -> bool { - self.sync_committee_update.is_some() - || self.finalized_header_update.is_some() - || self.header_update.is_some() - } -} - -/// Type representing implementation of the ethereum feed processor -struct EthereumFeedProcessorImpl { - derived_account_id: AccountId, -} - -impl EthereumFeedProcessorImpl { - pub fn new(processor_id: FeedProcessorId) -> EthereumFeedProcessorImpl { - EthereumFeedProcessorImpl { - derived_account_id: processor_id.into_account_truncating(), - } - } -} - -impl FeedProcessor for EthereumFeedProcessorImpl { - fn put(&self, _feed_id: FeedId, object: &[u8]) -> Result, DispatchError> { - let feed_data = FeedProcessorData::::decode(&mut &*object).map_err(|_e| { - DispatchError::Other("unable to decode feed processor data in ethereum feed processor") - })?; - - if !feed_data.is_valid() { - return Err(DispatchError::Other("feed processor data is invalid")); - } - - let mut maybe_metadata: Option = None; - - // Indicating that this feed processor signed the request - let feed_processor_origin = RawOrigin::Signed(self.derived_account_id.clone()); - - if let Some(sync_committee_update) = feed_data.sync_committee_update { - Pallet::::sync_committee_period_update( - feed_processor_origin.clone().into(), - sync_committee_update, - )?; - } - - if let Some(finalized_header_update) = feed_data.finalized_header_update { - Pallet::::import_finalized_header( - feed_processor_origin.clone().into(), - finalized_header_update, - )?; - } - - if let Some(header_update) = feed_data.header_update { - maybe_metadata = Some( - ( - header_update.execution_header.block_hash, - header_update.execution_header.block_number, - ) - .encode(), - ); - - Pallet::::import_execution_header( - feed_processor_origin.into(), - header_update, - )?; - } - - Ok(maybe_metadata) - } - - fn object_mappings(&self, _feed_id: FeedId, object: &[u8]) -> Vec { - let feed_data = match FeedProcessorData::::decode(&mut &*object) { - Ok(feed_data) => feed_data, - // we just return empty if we failed to decode as this is not called in runtime - Err(_) => return vec![], - }; - - let header_update = match feed_data.header_update { - Some(header_update) => header_update, - None => return vec![], // Nothing to index if no header update in feed data. - }; - - // calculating header update offset as per the encoding size hints. - // We are adding one to account for byte pushed at encoding to identify - // `Option` enum variant. - let header_update_offset = feed_data.sync_committee_update.encoded_size() - + feed_data.finalized_header_update.encoded_size() - + 1; - - let header_update_offset = match u32::try_from(header_update_offset) { - Ok(offset) => offset, - // Type conversion failed this would mean size of data structure is too large - // While this is unlikely, We should just return empty vec in that case. - Err(_) => return vec![], - }; - - // we send two mappings pointed to the same object - // block height and block hash - // this would be easier for sync client to crawl through the descendants by block height - // if you already have a block hash, you can fetch the same block with it as well - vec![ - FeedObjectMapping::Custom { - key: header_update.execution_header.block_hash.encode(), - offset: header_update_offset, - }, - FeedObjectMapping::Custom { - key: header_update.execution_header.block_number.encode(), - offset: header_update_offset, - }, - ] - } -} - -/// FeedProcessorId represents the available FeedProcessor impls -#[derive(Default, Debug, Clone, Copy, Encode, Decode, TypeInfo, Eq, PartialEq)] -pub enum FeedProcessorKind { - /// Ethereum execution headers feed processor - #[default] - EthereumLike, -} - -pub(crate) fn feed_processor( - identity: FeedProcessorId, - feed_processor_kind: FeedProcessorKind, -) -> Box> { - match feed_processor_kind { - FeedProcessorKind::EthereumLike => Box::new(EthereumFeedProcessorImpl::new(identity)), - } -} diff --git a/domains/runtime/core-eth-relay/src/lib.rs b/domains/runtime/core-eth-relay/src/lib.rs deleted file mode 100644 index 130c2c8ff7..0000000000 --- a/domains/runtime/core-eth-relay/src/lib.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] - -// Skip in regular `no-std` environment, such that we don't cause conflicts of globally exported -// functions -#[cfg(any(feature = "wasm-builder", feature = "std"))] -mod runtime; - -// Skip in regular `no-std` environment, such that we don't cause conflicts of globally exported -// functions -#[cfg(any(feature = "wasm-builder", feature = "std"))] -pub use runtime::*; -#[cfg(any(feature = "wasm-builder", feature = "std"))] -mod feed_processor; - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); diff --git a/domains/runtime/core-eth-relay/src/runtime.rs b/domains/runtime/core-eth-relay/src/runtime.rs deleted file mode 100644 index 8054f87726..0000000000 --- a/domains/runtime/core-eth-relay/src/runtime.rs +++ /dev/null @@ -1,740 +0,0 @@ -use crate::feed_processor::{feed_processor, FeedProcessorId, FeedProcessorKind}; -use codec::{Decode, Encode}; -use domain_runtime_primitives::{opaque, AccountIdConverter, SLOT_DURATION}; -pub use domain_runtime_primitives::{ - AccountId, Address, Balance, BlockNumber, Hash, Index, Signature, -}; -use frame_support::dispatch::DispatchClass; -use frame_support::traits::{ConstU16, ConstU32, ConstU64, Everything}; -use frame_support::weights::constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; -use frame_support::weights::{ConstantMultiplier, IdentityFee, Weight}; -use frame_support::{construct_runtime, parameter_types}; -use frame_system::limits::{BlockLength, BlockWeights}; -use pallet_feeds::feed_processor::FeedProcessor; -use pallet_transporter::EndpointHandler; -use snowbridge_beacon_primitives::{Fork, ForkVersions}; -use snowbridge_ethereum_beacon_client as pallet_ethereum_beacon_client; -use sp_api::impl_runtime_apis; -use sp_core::crypto::KeyTypeId; -use sp_core::OpaqueMetadata; -use sp_domains::DomainId; -use sp_messenger::endpoint::{Endpoint, EndpointHandler as EndpointHandlerT, EndpointId}; -use sp_messenger::messages::{ - CrossDomainMessage, ExtractedStateRootsFromProof, MessageId, RelayerMessagesWithStorageKey, -}; -use sp_runtime::traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, StaticLookup}; -use sp_runtime::transaction_validity::{TransactionSource, TransactionValidity}; -use sp_runtime::{create_runtime_str, generic, impl_opaque_keys, ApplyExtrinsicResult}; -pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use sp_std::marker::PhantomData; -use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; -use subspace_runtime_primitives::{Moment, SHANNON, SSC}; - -/// Block header type as expected by this runtime. -pub type Header = generic::Header; - -/// Block type as expected by this runtime. -pub type Block = generic::Block; - -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; - -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; - -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckMortality, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, -); - -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; - -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; - -/// Executive: handles dispatch to the various modules. -pub type Executive = domain_pallet_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, - Runtime, ->; - -impl_opaque_keys! { - pub struct SessionKeys { - /// Primarily used for adding the executor authority key into the keystore in the dev mode. - pub executor: sp_domains::ExecutorKey, - } -} - -#[sp_version::runtime_version] -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("subspace-eth-relay-domain"), - impl_name: create_runtime_str!("subspace-eth-relay-domain"), - authoring_version: 0, - spec_version: 0, - impl_version: 0, - apis: RUNTIME_API_VERSIONS, - transaction_version: 0, - state_version: 0, -}; - -/// The existential deposit. Same with the one on primary chain. -pub const EXISTENTIAL_DEPOSIT: Balance = 500 * SHANNON; - -/// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is -/// used to limit the maximal weight of a single extrinsic. -const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); - -/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by -/// `Operational` extrinsics. -const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); - -/// TODO: Proper max block weight -const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::MAX; - -/// The version information used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { - runtime_version: VERSION, - can_author_with: Default::default(), - } -} - -parameter_types! { - pub const Version: RuntimeVersion = VERSION; - pub const BlockHashCount: BlockNumber = 2400; - - // This part is copied from Substrate's `bin/node/runtime/src/lib.rs`. - // The `RuntimeBlockLength` and `RuntimeBlockWeights` exist here because the - // `DeletionWeightLimit` and `DeletionQueueDepth` depend on those to parameterize - // the lazy contract deletion. - pub RuntimeBlockLength: BlockLength = - BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() - .base_block(BlockExecutionWeight::get()) - .for_class(DispatchClass::all(), |weights| { - weights.base_extrinsic = ExtrinsicBaseWeight::get(); - }) - .for_class(DispatchClass::Normal, |weights| { - weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - .for_class(DispatchClass::Operational, |weights| { - weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); - // Operational transactions have some extra reserved space, so that they - // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. - weights.reserved = Some( - MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT - ); - }) - .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) - .build_or_panic(); -} - -// Configure FRAME pallets to include in runtime. - -impl frame_system::Config for Runtime { - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type RuntimeCall = RuntimeCall; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = AccountIdLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - /// The ubiquitous origin type. - type RuntimeOrigin = RuntimeOrigin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Runtime version. - type Version = Version; - /// Converts a module to an index of this module in the runtime. - type PalletInfo = PalletInfo; - /// The data to be stored in an account. - type AccountData = pallet_balances::AccountData; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The weight of database operations that the runtime can invoke. - type DbWeight = RocksDbWeight; - /// The basic call filter to use in dispatchable. - type BaseCallFilter = Everything; - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = (); - /// Block & extrinsics weights: base values and limits. - type BlockWeights = RuntimeBlockWeights; - /// The maximum length of a block (in bytes). - type BlockLength = RuntimeBlockLength; - /// This is used as an identifier of the chain. 42 is the generic substrate prefix. - type SS58Prefix = ConstU16<42>; - /// The action to take on a Runtime Upgrade - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; -} - -impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = Moment; - type OnTimestampSet = (); - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; - type WeightInfo = (); -} - -parameter_types! { - pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; - pub const MaxLocks: u32 = 50; - pub const MaxReserves: u32 = 50; -} - -impl pallet_balances::Config for Runtime { - type MaxLocks = MaxLocks; - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight; - type MaxReserves = MaxReserves; - type ReserveIdentifier = [u8; 8]; - type FreezeIdentifier = (); - type MaxFreezes = (); - type HoldIdentifier = (); - type MaxHolds = (); -} - -parameter_types! { - pub const TransactionByteFee: Balance = 1; - pub const OperationalFeeMultiplier: u8 = 5; -} - -impl pallet_transaction_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; - type WeightToFee = IdentityFee; - type LengthToFee = ConstantMultiplier; - type FeeMultiplierUpdate = (); - type OperationalFeeMultiplier = OperationalFeeMultiplier; -} - -impl domain_pallet_executive::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; -} - -parameter_types! { - pub const StateRootsBound: u32 = 50; - pub const RelayConfirmationDepth: BlockNumber = 7; -} - -parameter_types! { - pub const MaximumRelayers: u32 = 100; - pub const RelayerDeposit: Balance = 100 * SSC; - pub const CoreEthRelayDomainId: DomainId = DomainId::CORE_ETH_RELAY; -} - -impl pallet_messenger::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type SelfDomainId = CoreEthRelayDomainId; - - fn get_endpoint_response_handler( - endpoint: &Endpoint, - ) -> Option>> { - if endpoint == &Endpoint::Id(TransporterEndpointId::get()) { - Some(Box::new(EndpointHandler(PhantomData::))) - } else { - None - } - } - - type Currency = Balances; - type MaximumRelayers = MaximumRelayers; - type RelayerDeposit = RelayerDeposit; - type DomainInfo = (); - type ConfirmationDepth = RelayConfirmationDepth; - type WeightInfo = pallet_messenger::weights::SubstrateWeight; -} - -impl frame_system::offchain::SendTransactionTypes for Runtime -where - RuntimeCall: From, -{ - type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = RuntimeCall; -} - -parameter_types! { - pub const TransporterEndpointId: EndpointId = 1; -} - -impl pallet_transporter::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type SelfDomainId = CoreEthRelayDomainId; - type SelfEndpointId = TransporterEndpointId; - type Currency = Balances; - type Sender = Messenger; - type AccountIdConverter = AccountIdConverter; - type WeightInfo = pallet_transporter::weights::SubstrateWeight; -} - -impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; -} - -// Ethereum mainnet configuration -parameter_types! { - pub const MaxSyncCommitteeSize: u32 = 512; - pub const MaxProofBranchSize: u32 = 20; - pub const MaxExtraDataSize: u32 = 32; - pub const MaxLogsBloomSize: u32 = 256; - pub const MaxFeeRecipientSize: u32 = 20; - pub const MaxPublicKeySize: u32 = 48; - pub const MaxSignatureSize: u32 = 96; - pub const MaxSlotsPerHistoricalRoot: u64 = 8192; - pub const MaxFinalizedHeaderSlotArray: u32 = 1000; - pub const WeakSubjectivityPeriodSeconds: u32 = 97200; - pub const ChainForkVersions: ForkVersions = ForkVersions{ - genesis: Fork { - version: [0, 0, 16, 32], // 0x00001020 - epoch: 0, - }, - altair: Fork { - version: [1, 0, 16, 32], // 0x01001020 - epoch: 36660, - }, - bellatrix: Fork { - version: [2, 0, 16, 32], // 0x02001020 - epoch: 112260, - }, - capella: Fork { - version: [3, 0, 16, 32], // 0x03001020 - epoch: 162304, - }, - }; -} - -impl pallet_ethereum_beacon_client::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type TimeProvider = Timestamp; - type MaxSyncCommitteeSize = MaxSyncCommitteeSize; - type MaxProofBranchSize = MaxProofBranchSize; - type MaxExtraDataSize = MaxExtraDataSize; - type MaxLogsBloomSize = MaxLogsBloomSize; - type MaxFeeRecipientSize = MaxFeeRecipientSize; - type MaxPublicKeySize = MaxPublicKeySize; - type MaxSignatureSize = MaxSignatureSize; - type MaxSlotsPerHistoricalRoot = MaxSlotsPerHistoricalRoot; - type MaxFinalizedHeaderSlotArray = MaxFinalizedHeaderSlotArray; - type ForkVersions = ChainForkVersions; - type WeakSubjectivityPeriodSeconds = WeakSubjectivityPeriodSeconds; - type WeightInfo = pallet_ethereum_beacon_client::weights::SnowbridgeWeight; -} - -pub type FeedId = u64; - -parameter_types! { - // Limit maximum number of feeds per account - pub const MaxFeeds: u32 = 1; - pub const EthereumFeedProcessorId: FeedProcessorId = FeedProcessorId(*b"py/feprx"); -} - -impl pallet_feeds::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type FeedId = FeedId; - type FeedProcessorKind = FeedProcessorKind; - type MaxFeeds = MaxFeeds; - - fn feed_processor( - feed_processor_kind: Self::FeedProcessorKind, - ) -> Box> { - feed_processor(EthereumFeedProcessorId::get(), feed_processor_kind) - } -} - -// Create the runtime by composing the FRAME pallets that were previously configured. -// -// NOTE: Currently domain runtime does not naturally support the pallets with inherent extrinsics. -construct_runtime!( - pub struct Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - // System support stuff. - System: frame_system = 0, - Timestamp: pallet_timestamp = 1, - ExecutivePallet: domain_pallet_executive = 2, - - // Monetary stuff. - Balances: pallet_balances = 20, - TransactionPayment: pallet_transaction_payment = 21, - - // messenger stuff - // Note: Indexes should match the indexes of the System domain runtime - Messenger: pallet_messenger = 60, - Transporter: pallet_transporter = 61, - - // Having beacon client at 90 to have plenty of room for system domain runtime pallets - // (w.r.t future upgrade of system domain runtime) as well as some room for adding light client - // related pallets after 90 - EthereumBeaconClient: pallet_ethereum_beacon_client::{Pallet, Config, Storage, Event} = 90, - Feeds: pallet_feeds = 91, - - // Sudo account - Sudo: pallet_sudo = 100, - } -); - -#[cfg(feature = "runtime-benchmarks")] -#[macro_use] -mod benches { - frame_benchmarking::define_benchmarks!( - [pallet_ethereum_beacon_client, EthereumBeaconClient] - [frame_benchmarking, BaselineBench::] - [frame_system, SystemBench::] - [pallet_balances, Balances] - [pallet_timestamp, Timestamp] - ); -} - -impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block) - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl sp_block_builder::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl sp_offchain::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { - fn query_info( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment::FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl domain_runtime_primitives::DomainCoreApi for Runtime { - fn extract_signer( - extrinsics: Vec<::Extrinsic>, - ) -> Vec<(Option, ::Extrinsic)> { - use domain_runtime_primitives::Signer; - let lookup = frame_system::ChainContext::::default(); - extrinsics.into_iter().map(|xt| (xt.signer(&lookup).map(|signer| signer.encode()), xt)).collect() - } - - fn intermediate_roots() -> Vec<[u8; 32]> { - ExecutivePallet::intermediate_roots() - } - - fn initialize_block_with_post_state_root(header: &::Header) -> Vec { - Executive::initialize_block(header); - Executive::storage_root() - } - - fn apply_extrinsic_with_post_state_root(extrinsic: ::Extrinsic) -> Vec { - let _ = Executive::apply_extrinsic(extrinsic); - Executive::storage_root() - } - - fn construct_set_code_extrinsic(code: Vec) -> Vec { - use codec::Encode; - let set_code_call = frame_system::Call::set_code { code }; - UncheckedExtrinsic::new_unsigned( - domain_pallet_executive::Call::sudo_unchecked_weight_unsigned { - call: Box::new(set_code_call.into()), - weight: Weight::from_parts(0, 0), - }.into() - ).encode() - } - - fn check_transaction_validity( - uxt: ::Extrinsic, - block_hash: ::Hash, - ) -> Result<(), domain_runtime_primitives::CheckTxValidityError> { - let maybe_address = uxt - .signature - .as_ref() - .map(|(address, _signature, _extra)| address.clone()); - - if let Some(address) = maybe_address { - let sender = ::Lookup::lookup(address)?; - - let tx_validity = - Executive::validate_transaction(TransactionSource::External, uxt, block_hash); - - tx_validity.map(|_| ()).map_err(|tx_validity_error| { - let storage_keys = sp_std::vec![ - frame_system::Account::::hashed_key_for(&sender), - pallet_transaction_payment::NextFeeMultiplier::::hashed_key().to_vec(), - ]; - domain_runtime_primitives::CheckTxValidityError::InvalidTransaction { - error: tx_validity_error, - storage_keys, - } - }) - } else { - Ok(()) - } - } - - fn storage_keys_for_verifying_transaction_validity( - who: opaque::AccountId, - ) -> Result>, domain_runtime_primitives::VerifyTxValidityError> { - let sender = AccountId::decode(&mut who.as_slice()) - .map_err(|_| domain_runtime_primitives::VerifyTxValidityError::FailedToDecodeAccountId)?; - Ok(sp_std::vec![ - frame_system::Account::::hashed_key_for(sender), - pallet_transaction_payment::NextFeeMultiplier::::hashed_key().to_vec(), - ]) - } - } - - impl domain_runtime_primitives::InherentExtrinsicApi for Runtime { - fn construct_inherent_timestamp_extrinsic(moment: Moment) -> Option<::Extrinsic> { - Some( - UncheckedExtrinsic::new_unsigned( - pallet_timestamp::Call::set{ now: moment }.into() - ) - ) - } - } - - impl sp_messenger::MessengerApi for Runtime { - fn extract_xdm_proof_state_roots( - extrinsic: Vec, - ) -> Option::Hash, ::Hash>> { - extract_xdm_proof_state_roots(extrinsic) - } - - fn confirmation_depth() -> BlockNumber { - RelayConfirmationDepth::get() - } - } - - impl sp_messenger::RelayerApi for Runtime { - fn domain_id() -> DomainId { - CoreEthRelayDomainId::get() - } - - fn relay_confirmation_depth() -> BlockNumber { - RelayConfirmationDepth::get() - } - - fn domain_best_number(_domain_id: DomainId) -> Option { - None - } - - fn domain_state_root(_domain_id: DomainId, _number: BlockNumber, _hash: Hash) -> Option{ - None - } - - fn relayer_assigned_messages(relayer_id: AccountId) -> RelayerMessagesWithStorageKey { - Messenger::relayer_assigned_messages(relayer_id) - } - - fn outbox_message_unsigned(msg: CrossDomainMessage::Hash, ::Hash>) -> Option<::Extrinsic> { - Messenger::outbox_message_unsigned(msg) - } - - fn inbox_response_message_unsigned(msg: CrossDomainMessage::Hash, ::Hash>) -> Option<::Extrinsic> { - Messenger::inbox_response_message_unsigned(msg) - } - - fn should_relay_outbox_message(dst_domain_id: DomainId, msg_id: MessageId) -> bool { - Messenger::should_relay_outbox_message(dst_domain_id, msg_id) - } - - fn should_relay_inbox_message_response(dst_domain_id: DomainId, msg_id: MessageId) -> bool { - Messenger::should_relay_inbox_message_response(dst_domain_id, msg_id) - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark for Runtime { - fn benchmark_metadata(extra: bool) -> ( - Vec, - Vec, - ) { - use frame_benchmarking::{baseline, Benchmarking, BenchmarkList}; - use frame_support::traits::StorageInfoTrait; - use frame_system_benchmarking::Pallet as SystemBench; - use baseline::Pallet as BaselineBench; - - let mut list = Vec::::new(); - - list_benchmarks!(list, extra); - - let storage_info = AllPalletsWithSystem::storage_info(); - - (list, storage_info) - } - - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch, TrackedStorageKey}; - - use frame_system_benchmarking::Pallet as SystemBench; - use baseline::Pallet as BaselineBench; - - impl frame_system_benchmarking::Config for Runtime {} - impl baseline::Config for Runtime {} - - let whitelist: Vec = vec![ - // Block Number - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), - // Total Issuance - hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), - // Execution Phase - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), - // RuntimeEvent Count - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), - // System Events - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), - ]; - - let mut batches = Vec::::new(); - let params = (&config, &whitelist); - - add_benchmarks!(params, batches); - - if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } - Ok(batches) - } - } -} - -fn extract_xdm_proof_state_roots( - encoded_ext: Vec, -) -> Option> { - if let Ok(ext) = UncheckedExtrinsic::decode(&mut encoded_ext.as_slice()) { - match &ext.function { - RuntimeCall::Messenger(pallet_messenger::Call::relay_message { msg }) => { - msg.extract_state_roots_from_proof::() - } - RuntimeCall::Messenger(pallet_messenger::Call::relay_message_response { msg }) => { - msg.extract_state_roots_from_proof::() - } - _ => None, - } - } else { - None - } -} diff --git a/domains/runtime/core-evm/Cargo.toml b/domains/runtime/core-evm/Cargo.toml index 603d582144..34976501ee 100644 --- a/domains/runtime/core-evm/Cargo.toml +++ b/domains/runtime/core-evm/Cargo.toml @@ -20,50 +20,50 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.2.1", 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, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -fp-evm = { version = "3.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -fp-rpc = { version = "3.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -fp-self-contained = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +fp-evm = { version = "3.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +fp-rpc = { version = "3.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +fp-self-contained = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } hex-literal = { version = '0.4.0', optional = true } log = { version = "0.4.17", default-features = false } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-base-fee = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -pallet-ethereum = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } -pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier/", rev = "e60f3f8617cabd3473bd5e197b7c0c1991fbcd9b" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-base-fee = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +pallet-ethereum = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } +pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "c13d670b25b5506c1c5243f352941dc46c82ffe4" } pallet-messenger = { version = "0.1.0", path = "../../pallets/messenger", default-features = false } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } [build-dependencies] subspace-wasm-tools = { version = "0.1.0", path = "../../../crates/subspace-wasm-tools" } -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } [features] default = [ diff --git a/domains/runtime/core-evm/src/precompiles.rs b/domains/runtime/core-evm/src/precompiles.rs index 92d0ae45aa..a1e11d859f 100644 --- a/domains/runtime/core-evm/src/precompiles.rs +++ b/domains/runtime/core-evm/src/precompiles.rs @@ -1,4 +1,6 @@ -use pallet_evm::{Precompile, PrecompileHandle, PrecompileResult, PrecompileSet}; +use pallet_evm::{ + IsPrecompileResult, Precompile, PrecompileHandle, PrecompileResult, PrecompileSet, +}; use sp_core::H160; use sp_std::marker::PhantomData; @@ -51,8 +53,11 @@ where } } - fn is_precompile(&self, address: H160) -> bool { - Self::used_addresses().contains(&address) + fn is_precompile(&self, address: H160, _gas: u64) -> IsPrecompileResult { + IsPrecompileResult::Answer { + is_precompile: Self::used_addresses().contains(&address), + extra_cost: 0, + } } } diff --git a/domains/runtime/core-evm/src/runtime.rs b/domains/runtime/core-evm/src/runtime.rs index 9e1c02996d..f1084903b0 100644 --- a/domains/runtime/core-evm/src/runtime.rs +++ b/domains/runtime/core-evm/src/runtime.rs @@ -309,7 +309,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -335,6 +335,7 @@ impl domain_pallet_executive::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type WeightInfo = pallet_sudo::weights::SubstrateWeight; } parameter_types! { @@ -460,7 +461,8 @@ impl pallet_evm::Config for Runtime { type OnChargeTransaction = (); type OnCreate = (); type FindAuthor = FindAuthorTruncated; - type UnixTime = Timestamp; + type Timestamp = Timestamp; + type WeightInfo = pallet_evm::weights::SubstrateWeight; } parameter_types! { @@ -471,6 +473,7 @@ impl pallet_ethereum::Config for Runtime { type RuntimeEvent = RuntimeEvent; type StateRoot = pallet_ethereum::IntermediateStateRoot; type PostLogContent = PostOnlyBlockHash; + type ExtraDataLength = ConstU32<30>; } parameter_types! { @@ -796,7 +799,7 @@ impl_runtime_apis! { } fn account_code_at(address: H160) -> Vec { - EVM::account_codes(address) + pallet_evm::AccountCodes::::get(address) } fn author() -> H160 { @@ -806,7 +809,7 @@ impl_runtime_apis! { fn storage_at(address: H160, index: U256) -> H256 { let mut tmp = [0u8; 32]; index.to_big_endian(&mut tmp); - EVM::account_storages(address, H256::from_slice(&tmp[..])) + pallet_evm::AccountStorages::::get(address, H256::from_slice(&tmp[..])) } fn call( @@ -886,15 +889,15 @@ impl_runtime_apis! { } fn current_transaction_statuses() -> Option> { - Ethereum::current_transaction_statuses() + pallet_ethereum::CurrentTransactionStatuses::::get() } fn current_block() -> Option { - Ethereum::current_block() + pallet_ethereum::CurrentBlock::::get() } fn current_receipts() -> Option> { - Ethereum::current_receipts() + pallet_ethereum::CurrentReceipts::::get() } fn current_all() -> ( @@ -903,9 +906,9 @@ impl_runtime_apis! { Option> ) { ( - Ethereum::current_block(), - Ethereum::current_receipts(), - Ethereum::current_transaction_statuses() + pallet_ethereum::CurrentBlock::::get(), + pallet_ethereum::CurrentReceipts::::get(), + pallet_ethereum::CurrentTransactionStatuses::::get() ) } @@ -919,7 +922,7 @@ impl_runtime_apis! { } fn elasticity() -> Option { - Some(BaseFee::elasticity()) + Some(pallet_base_fee::Elasticity::::get()) } fn gas_limit_multiplier_support() {} diff --git a/domains/runtime/core-payments/Cargo.toml b/domains/runtime/core-payments/Cargo.toml index 7fa467d2b1..b277b0c662 100644 --- a/domains/runtime/core-payments/Cargo.toml +++ b/domains/runtime/core-payments/Cargo.toml @@ -15,38 +15,38 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.4.0", 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 = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } hex-literal = { version = '0.4.0', optional = true } log = { version = "0.4.17", default-features = false } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-messenger = { version = "0.1.0", path = "../../pallets/messenger", default-features = false } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } [build-dependencies] subspace-wasm-tools = { version = "0.1.0", path = "../../../crates/subspace-wasm-tools" } -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } [features] default = [ diff --git a/domains/runtime/core-payments/src/runtime.rs b/domains/runtime/core-payments/src/runtime.rs index 543f228fbf..de1417e060 100644 --- a/domains/runtime/core-payments/src/runtime.rs +++ b/domains/runtime/core-payments/src/runtime.rs @@ -217,7 +217,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -298,6 +298,7 @@ impl pallet_transporter::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type WeightInfo = pallet_sudo::weights::SubstrateWeight; } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/domains/runtime/system/Cargo.toml b/domains/runtime/system/Cargo.toml index 05ca1b2294..f2621715e6 100644 --- a/domains/runtime/system/Cargo.toml +++ b/domains/runtime/system/Cargo.toml @@ -17,42 +17,42 @@ codec = { package = "parity-scale-codec", version = "3.4.0", default-features = core-payments-domain-runtime = { version = "0.1.0", path = "../../runtime/core-payments", default-features = false } 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 = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-domain-registry = { version = "0.1.0", path = "../../pallets/domain-registry", default-features = false } pallet-executor-registry = { version = "0.1.0", path = "../../pallets/executor-registry", default-features = false } pallet-settlement = { version = "0.1.0", path = "../../../crates/pallet-settlement", default-features = false } pallet-messenger = { version = "0.1.0", path = "../../pallets/messenger", default-features = false } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-messenger = { version = "0.1.0", path = "../../primitives/messenger", default-features = false } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", path = "../../../crates/sp-settlement", default-features = false } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } system-runtime-primitives = { version = "0.1.0", path = "../../primitives/system-runtime", default-features = false } [build-dependencies] sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } subspace-wasm-tools = { version = "0.1.0", path = "../../../crates/subspace-wasm-tools" } -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } [features] default = [ diff --git a/domains/runtime/system/build.rs b/domains/runtime/system/build.rs index 85f456e51a..6a73ae8031 100644 --- a/domains/runtime/system/build.rs +++ b/domains/runtime/system/build.rs @@ -6,13 +6,6 @@ fn main() { "core_payments_wasm_bundle.rs", ); - subspace_wasm_tools::create_runtime_bundle_inclusion_file( - "core-eth-relay-runtime", - "CORE_ETH_RELAY_WASM_BUNDLE", - Some(&sp_domains::DomainId::CORE_ETH_RELAY.link_section_name()), - "core_eth_relay_wasm_bundle.rs", - ); - subspace_wasm_tools::create_runtime_bundle_inclusion_file( "core-evm-runtime", "CORE_EVM_WASM_BUNDLE", diff --git a/domains/runtime/system/src/runtime.rs b/domains/runtime/system/src/runtime.rs index 012081a426..60f01ed4d4 100644 --- a/domains/runtime/system/src/runtime.rs +++ b/domains/runtime/system/src/runtime.rs @@ -34,9 +34,8 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use subspace_runtime_primitives::{SHANNON, SSC}; -// Make core-payments WASM runtime available. +// Make various WASM runtimes available. include!(concat!(env!("OUT_DIR"), "/core_payments_wasm_bundle.rs")); -include!(concat!(env!("OUT_DIR"), "/core_eth_relay_wasm_bundle.rs")); include!(concat!(env!("OUT_DIR"), "/core_evm_wasm_bundle.rs")); /// Block header type as expected by this runtime. @@ -224,7 +223,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -377,6 +376,7 @@ impl pallet_transporter::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type WeightInfo = pallet_sudo::weights::SubstrateWeight; } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/domains/service/Cargo.toml b/domains/service/Cargo.toml index 926e934996..973eb2157a 100644 --- a/domains/service/Cargo.toml +++ b/domains/service/Cargo.toml @@ -22,53 +22,53 @@ domain-client-executor = { version = "0.1.0", path = "../client/domain-executor" domain-client-executor-gossip = { version = "0.1.0", path = "../client/executor-gossip" } domain-client-message-relayer = { version = "0.1.0", path = "../client/relayer" } domain-runtime-primitives = { version = "0.1.0", path = "../primitives/runtime" } -frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false, features = ["runtime-benchmarks"] } +frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false, features = ["runtime-benchmarks"] } futures = "0.3.28" hex-literal = "0.4.0" jsonrpsee = { version = "0.16.2", features = ["server"] } log = "0.4.17" -pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-transactions = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-transactions = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } serde = { version = "1.0.159", features = ["derive"] } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../crates/sp-domains" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-keystore = { version = "0.13.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } -sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", path = "../../crates/sp-settlement" } -sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } system-runtime-primitives = { version = "0.1.0", path = "../primitives/system-runtime" } subspace-core-primitives = { version = "0.1.0", path = "../../crates/subspace-core-primitives" } subspace-fraud-proof = { version = "0.1.0", path = "../../crates/subspace-fraud-proof" } subspace-runtime-primitives = { version = "0.1.0", path = "../../crates/subspace-runtime-primitives" } subspace-transaction-pool = { version = "0.1.0", path = "../../crates/subspace-transaction-pool" } -substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } tracing = "0.1.37" [build-dependencies] -substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } diff --git a/domains/service/src/core_domain.rs b/domains/service/src/core_domain.rs index 3222218dc4..3c2b16235b 100644 --- a/domains/service/src/core_domain.rs +++ b/domains/service/src/core_domain.rs @@ -221,12 +221,7 @@ where }) .transpose()?; - let executor = NativeElseWasmExecutor::new( - config.wasm_method, - config.default_heap_pages, - config.max_runtime_instances, - config.runtime_cache_size, - ); + let executor = sc_service::new_native_or_wasm_executor(config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts( config, @@ -456,12 +451,6 @@ where // TODO: Do we even need block announcement on core domain node? // core_domain_config.announce_block = false; - core_domain_config - .service_config - .network - .extra_sets - .push(domain_client_executor_gossip::executor_gossip_peers_set_config()); - let params = new_partial::<_, _, _, Block, SBlock, PBlock, Provider>( &core_domain_config.service_config, system_domain_client.clone(), @@ -477,9 +466,18 @@ where let mut task_manager = params.task_manager; let import_queue = params.import_queue; + let mut net_config = sc_network::config::FullNetworkConfiguration::new( + &core_domain_config.service_config.network, + ); + + net_config.add_notification_protocol( + domain_client_executor_gossip::executor_gossip_peers_set_config(), + ); + let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = crate::build_network(BuildNetworkParams { config: &core_domain_config.service_config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), @@ -579,7 +577,6 @@ where code_executor: code_executor.clone(), is_authority, keystore: params.keystore_container.keystore(), - spawner: Box::new(task_manager.spawn_handle()), bundle_sender: Arc::new(bundle_sender), executor_streams, domain_confirmation_depth, diff --git a/domains/service/src/lib.rs b/domains/service/src/lib.rs index fb7cd9a63e..70a28210fe 100644 --- a/domains/service/src/lib.rs +++ b/domains/service/src/lib.rs @@ -50,6 +50,7 @@ pub struct DomainConfiguration { /// 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, @@ -79,6 +80,7 @@ where { let BuildNetworkParams { config, + mut net_config, client, transaction_pool, spawn_handle, @@ -147,7 +149,7 @@ where .as_ref() .map(|config| config.registry.clone()) .as_ref(), - &config.network, + &net_config, protocol_id.clone(), &config.chain_spec.fork_id().map(ToOwned::to_owned), Box::new(DefaultBlockAnnounceValidator), @@ -168,7 +170,23 @@ where .ok() .flatten() .expect("Genesis block exists; qed"); - let mut network_params = sc_network::config::Params:: { + + // crate transactions protocol and add it to the list of supported protocols of `network_params` + let transactions_handler_proto = sc_network_transactions::TransactionsHandlerPrototype::new( + protocol_id.clone(), + client + .block_hash(0u32.into()) + .ok() + .flatten() + .expect("Genesis block exists; qed"), + config.chain_spec.fork_id(), + ); + net_config.add_notification_protocol(transactions_handler_proto.set_config()); + + net_config.add_request_response_protocol(block_request_protocol_config); + net_config.add_request_response_protocol(state_request_protocol_config); + + let network_params = sc_network::config::Params:: { role: config.role.clone(), executor: { let spawn_handle = Clone::clone(&spawn_handle); @@ -176,9 +194,9 @@ where spawn_handle.spawn("libp2p-node", Some("networking"), fut); }) }, - network_config: config.network.clone(), + network_config: net_config, genesis_hash, - protocol_id: protocol_id.clone(), + protocol_id, fork_id: config.chain_spec.fork_id().map(ToOwned::to_owned), metrics_registry: config .prometheus_config @@ -186,28 +204,13 @@ where .map(|config| config.registry.clone()), block_announce_config, tx, - request_response_protocol_configs: vec![ - block_request_protocol_config, - state_request_protocol_config, - ], }; - // crate transactions protocol and add it to the list of supported protocols of `network_params` - let transactions_handler_proto = sc_network_transactions::TransactionsHandlerPrototype::new( - protocol_id, - client - .block_hash(0u32.into()) - .ok() - .flatten() - .expect("Genesis block exists; qed"), - config.chain_spec.fork_id(), - ); - network_params + let has_bootnodes = !network_params .network_config - .extra_sets - .insert(0, transactions_handler_proto.set_config()); - - let has_bootnodes = !network_params.network_config.boot_nodes.is_empty(); + .network_config + .boot_nodes + .is_empty(); let network_mut = sc_network::NetworkWorker::new(network_params)?; let network = network_mut.service().clone(); diff --git a/domains/service/src/system_domain.rs b/domains/service/src/system_domain.rs index 7c1ae94f7a..503e7d70b3 100644 --- a/domains/service/src/system_domain.rs +++ b/domains/service/src/system_domain.rs @@ -18,7 +18,7 @@ use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; use sc_rpc_api::DenyUnsafe; use sc_service::{ BuildNetworkParams, Configuration as ServiceConfiguration, NetworkStarter, PartialComponents, - SpawnTaskHandle, SpawnTasksParams, TFullBackend, TaskManager, + SpawnTasksParams, TFullBackend, TaskManager, }; use sc_telemetry::{Telemetry, TelemetryWorker, TelemetryWorkerHandle}; use sc_utils::mpsc::tracing_unbounded; @@ -157,7 +157,6 @@ type InvalidStateTransitionProofVerifier PBlock, PClient, NativeElseWasmExecutor, - SpawnTaskHandle, Hash, VerifierClient, Block>, CoreDomainExtrinsicsBuilder< @@ -231,12 +230,7 @@ where }) .transpose()?; - let executor = NativeElseWasmExecutor::new( - config.wasm_method, - config.default_heap_pages, - config.max_runtime_instances, - config.runtime_cache_size, - ); + let executor = sc_service::new_native_or_wasm_executor(config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts( config, @@ -263,7 +257,6 @@ where let invalid_state_transition_proof_verifier = InvalidStateTransitionProofVerifier::new( primary_chain_client.clone(), executor.clone(), - task_manager.spawn_handle(), VerifierClient::new(client.clone()), domain_extrinsics_builder.clone(), ); @@ -321,7 +314,7 @@ where /// /// This is the actual implementation that is abstract over the executor and the runtime api. pub async fn new_full_system( - mut system_domain_config: DomainConfiguration, + system_domain_config: DomainConfiguration, primary_chain_client: Arc, primary_network_sync_oracle: Arc, select_chain: &SC, @@ -378,12 +371,6 @@ where // TODO: Do we even need block announcement on system domain node? // system_domain_config.announce_block = false; - system_domain_config - .service_config - .network - .extra_sets - .push(domain_client_executor_gossip::executor_gossip_peers_set_config()); - let params = new_partial( &system_domain_config.service_config, primary_chain_client.clone(), @@ -396,9 +383,18 @@ where let transaction_pool = params.transaction_pool.clone(); let mut task_manager = params.task_manager; + let mut net_config = sc_network::config::FullNetworkConfiguration::new( + &system_domain_config.service_config.network, + ); + + net_config.add_notification_protocol( + domain_client_executor_gossip::executor_gossip_peers_set_config(), + ); + let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = crate::build_network(BuildNetworkParams { config: &system_domain_config.service_config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), @@ -470,7 +466,6 @@ where code_executor: code_executor.clone(), is_authority, keystore: params.keystore_container.keystore(), - spawner: Box::new(task_manager.spawn_handle()), bundle_sender: Arc::new(bundle_sender), executor_streams, domain_confirmation_depth, diff --git a/domains/test/primitives/Cargo.toml b/domains/test/primitives/Cargo.toml index 4ee31d1ab7..aaebae7019 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.4.0", default-features = false, features = ["derive"]} -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } 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" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } diff --git a/domains/test/runtime/core-eth-relay/Cargo.toml b/domains/test/runtime/core-eth-relay/Cargo.toml deleted file mode 100644 index 785a6c618e..0000000000 --- a/domains/test/runtime/core-eth-relay/Cargo.toml +++ /dev/null @@ -1,112 +0,0 @@ -[package] -name = "core-eth-relay-domain-test-runtime" -version = "0.1.0" -authors = ["Liu-Cheng Xu , Parth Desai "] -license = "Apache-2.0" -homepage = "https://subspace.network" -repository = "https://github.com/subspace/subspace/" -edition = "2021" -links = "core-eth-relay-domain-test-runtime" - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.2.1", 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 } -domain-test-primitives = { version = "0.1.0", path = "../../primitives", default-features = false } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -hex-literal = { version = '0.4.0', optional = true } -log = { version = "0.4.17", default-features = false } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-domain-registry = { version = "0.1.0", path = "../../../pallets/domain-registry", default-features = false } -pallet-executor-registry = { version = "0.1.0", path = "../../../pallets/executor-registry", default-features = false } -pallet-feeds = { version = "0.1.0", path = "../../../../crates/pallet-feeds", default-features = false } -pallet-messenger = { version = "0.1.0", path = "../../../pallets/messenger", default-features = false } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transporter = { version = "0.1.0", path = "../../../pallets/transporter", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -# Light client pallet and primitives -snowbridge-beacon-primitives = { git = "https://github.com/Snowfork/snowbridge", rev = "cac98d860b8f24a9c3a3eabb5bcbee8dc2880960", default-features = false } -snowbridge-ethereum-beacon-client = { git = "https://github.com/Snowfork/snowbridge", rev = "cac98d860b8f24a9c3a3eabb5bcbee8dc2880960", default-features = false } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-domains = { version = "0.1.0", path = "../../../../crates/sp-domains", default-features = false } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-messenger = { version = "0.1.0", default-features = false, path = "../../../primitives/messenger" } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -subspace-runtime-primitives = { version = "0.1.0", path = "../../../../crates/subspace-runtime-primitives", default-features = false } - -[build-dependencies] -subspace-wasm-tools = { version = "0.1.0", path = "../../../../crates/subspace-wasm-tools" } -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } - -[features] -default = [ - "std", -] -std = [ - "codec/std", - "domain-pallet-executive/std", - "domain-runtime-primitives/std", - "frame-support/std", - "frame-system/std", - "frame-system-rpc-runtime-api/std", - "log/std", - "pallet-balances/std", - "pallet-domain-registry/std", - "pallet-executor-registry/std", - "pallet-feeds/std", - "pallet-messenger/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-transporter/std", - "scale-info/std", - "snowbridge-beacon-primitives/std", - "snowbridge-ethereum-beacon-client/std", - "sp-api/std", - "sp-block-builder/std", - "sp-core/std", - "sp-domains/std", - "sp-session/std", - "sp-inherents/std", - "sp-io/std", - "sp-messenger/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "subspace-runtime-primitives/std", - "substrate-wasm-builder", -] -# Internal implementation detail, enabled during building of wasm blob. -wasm-builder = [] -runtime-benchmarks = [ - 'hex-literal', - "sp-runtime/runtime-benchmarks", - "frame-benchmarking", - "frame-system-benchmarking", - "frame-system-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "snowbridge-ethereum-beacon-client/runtime-benchmarks" -] diff --git a/domains/test/runtime/core-eth-relay/build.rs b/domains/test/runtime/core-eth-relay/build.rs deleted file mode 100644 index a9033702fe..0000000000 --- a/domains/test/runtime/core-eth-relay/build.rs +++ /dev/null @@ -1,13 +0,0 @@ -fn main() { - #[cfg(feature = "std")] - { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .enable_feature("wasm-builder") - .export_heap_base() - .import_memory() - .build(); - } - - subspace_wasm_tools::export_wasm_bundle_path(); -} diff --git a/domains/test/runtime/core-eth-relay/src/feed_processor.rs b/domains/test/runtime/core-eth-relay/src/feed_processor.rs deleted file mode 100644 index 73630a6429..0000000000 --- a/domains/test/runtime/core-eth-relay/src/feed_processor.rs +++ /dev/null @@ -1,156 +0,0 @@ -use crate::{AccountId, FeedId, Runtime}; -use codec::{Decode, Encode}; -use frame_support::dispatch::{RawOrigin, TypeInfo}; -use pallet_feeds::feed_processor::{FeedMetadata, FeedObjectMapping, FeedProcessor}; -use snowbridge_ethereum_beacon_client::{ - FinalizedHeaderUpdateOf, HeaderUpdateOf, Pallet, SyncCommitteePeriodUpdateOf, -}; -use sp_core::TypeId; -use sp_runtime::traits::AccountIdConversion; -use sp_runtime::DispatchError; -use sp_std::prelude::*; - -/// A feed processor identifier. It is used by the feed processor to derive sovereign account id -#[derive(Clone, Copy, Eq, PartialEq, Encode, Decode, TypeInfo)] -pub struct FeedProcessorId(pub [u8; 8]); - -impl TypeId for FeedProcessorId { - const TYPE_ID: [u8; 4] = *b"feed"; -} - -#[derive(Encode, Decode)] -pub struct FeedProcessorData { - pub sync_committee_update: Option>, - pub finalized_header_update: Option>, - pub header_update: Option>, -} - -impl FeedProcessorData { - /// checks if the feed data we got is valid or not. - /// As of now, only constraint is at least one component need to be `Some` - pub fn is_valid(&self) -> bool { - self.sync_committee_update.is_some() - || self.finalized_header_update.is_some() - || self.header_update.is_some() - } -} - -/// Type representing implementation of the ethereum feed processor -struct EthereumFeedProcessorImpl { - derived_account_id: AccountId, -} - -impl EthereumFeedProcessorImpl { - pub fn new(processor_id: FeedProcessorId) -> EthereumFeedProcessorImpl { - EthereumFeedProcessorImpl { - derived_account_id: processor_id.into_account_truncating(), - } - } -} - -impl FeedProcessor for EthereumFeedProcessorImpl { - fn put(&self, _feed_id: FeedId, object: &[u8]) -> Result, DispatchError> { - let feed_data = FeedProcessorData::::decode(&mut &*object).map_err(|_e| { - DispatchError::Other("unable to decode feed processor data in ethereum feed processor") - })?; - - if !feed_data.is_valid() { - return Err(DispatchError::Other("feed processor data is invalid")); - } - - let mut maybe_metadata: Option = None; - - // Indicating that this feed processor signed the request - let feed_processor_origin = RawOrigin::Signed(self.derived_account_id.clone()); - - if let Some(sync_committee_update) = feed_data.sync_committee_update { - Pallet::::sync_committee_period_update( - feed_processor_origin.clone().into(), - sync_committee_update, - )?; - } - - if let Some(finalized_header_update) = feed_data.finalized_header_update { - Pallet::::import_finalized_header( - feed_processor_origin.clone().into(), - finalized_header_update, - )?; - } - - if let Some(header_update) = feed_data.header_update { - maybe_metadata = Some( - ( - header_update.execution_header.block_hash, - header_update.execution_header.block_number, - ) - .encode(), - ); - - Pallet::::import_execution_header( - feed_processor_origin.into(), - header_update, - )?; - } - - Ok(maybe_metadata) - } - - fn object_mappings(&self, _feed_id: FeedId, object: &[u8]) -> Vec { - let feed_data = match FeedProcessorData::::decode(&mut &*object) { - Ok(feed_data) => feed_data, - // we just return empty if we failed to decode as this is not called in runtime - Err(_) => return vec![], - }; - - let header_update = match feed_data.header_update { - Some(header_update) => header_update, - None => return vec![], // Nothing to index if no header update in feed data. - }; - - // calculating header update offset as per the encoding size hints. - // We are adding one to account for byte pushed at encoding to identify - // `Option` enum variant. - let header_update_offset = feed_data.sync_committee_update.encoded_size() - + feed_data.finalized_header_update.encoded_size() - + 1; - - let header_update_offset = match u32::try_from(header_update_offset) { - Ok(offset) => offset, - // Type conversion failed this would mean size of data structure is too large - // While this is unlikely, We should just return empty vec in that case. - Err(_) => return vec![], - }; - - // we send two mappings pointed to the same object - // block height and block hash - // this would be easier for sync client to crawl through the descendants by block height - // if you already have a block hash, you can fetch the same block with it as well - vec![ - FeedObjectMapping::Custom { - key: header_update.execution_header.block_hash.encode(), - offset: header_update_offset, - }, - FeedObjectMapping::Custom { - key: header_update.execution_header.block_number.encode(), - offset: header_update_offset, - }, - ] - } -} - -/// FeedProcessorId represents the available FeedProcessor impls -#[derive(Default, Debug, Clone, Copy, Encode, Decode, TypeInfo, Eq, PartialEq)] -pub enum FeedProcessorKind { - /// Ethereum execution headers feed processor - #[default] - EthereumLike, -} - -pub(crate) fn feed_processor( - identity: FeedProcessorId, - feed_processor_kind: FeedProcessorKind, -) -> Box> { - match feed_processor_kind { - FeedProcessorKind::EthereumLike => Box::new(EthereumFeedProcessorImpl::new(identity)), - } -} diff --git a/domains/test/runtime/core-eth-relay/src/lib.rs b/domains/test/runtime/core-eth-relay/src/lib.rs deleted file mode 100644 index 130c2c8ff7..0000000000 --- a/domains/test/runtime/core-eth-relay/src/lib.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] - -// Skip in regular `no-std` environment, such that we don't cause conflicts of globally exported -// functions -#[cfg(any(feature = "wasm-builder", feature = "std"))] -mod runtime; - -// Skip in regular `no-std` environment, such that we don't cause conflicts of globally exported -// functions -#[cfg(any(feature = "wasm-builder", feature = "std"))] -pub use runtime::*; -#[cfg(any(feature = "wasm-builder", feature = "std"))] -mod feed_processor; - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); diff --git a/domains/test/runtime/core-eth-relay/src/runtime.rs b/domains/test/runtime/core-eth-relay/src/runtime.rs deleted file mode 100644 index 12321e4cc5..0000000000 --- a/domains/test/runtime/core-eth-relay/src/runtime.rs +++ /dev/null @@ -1,737 +0,0 @@ -use crate::feed_processor::{feed_processor, FeedProcessorId, FeedProcessorKind}; -use codec::{Decode, Encode}; -use domain_runtime_primitives::{opaque, AccountIdConverter, SLOT_DURATION}; -pub use domain_runtime_primitives::{ - AccountId, Address, Balance, BlockNumber, Hash, Index, Signature, -}; -use frame_support::dispatch::DispatchClass; -use frame_support::traits::{ConstU16, ConstU32, ConstU64, Everything}; -use frame_support::weights::constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; -use frame_support::weights::{ConstantMultiplier, IdentityFee, Weight}; -use frame_support::{construct_runtime, parameter_types}; -use frame_system::limits::{BlockLength, BlockWeights}; -use pallet_feeds::feed_processor::FeedProcessor; -use pallet_transporter::EndpointHandler; -use snowbridge_beacon_primitives::{Fork, ForkVersions}; -use snowbridge_ethereum_beacon_client as pallet_ethereum_beacon_client; -use sp_api::impl_runtime_apis; -use sp_core::crypto::KeyTypeId; -use sp_core::OpaqueMetadata; -use sp_domains::DomainId; -use sp_messenger::endpoint::{Endpoint, EndpointHandler as EndpointHandlerT, EndpointId}; -use sp_messenger::messages::{ - ChannelId, CrossDomainMessage, ExtractedStateRootsFromProof, MessageId, - RelayerMessagesWithStorageKey, -}; -use sp_runtime::traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, StaticLookup}; -use sp_runtime::transaction_validity::{TransactionSource, TransactionValidity}; -use sp_runtime::{create_runtime_str, generic, impl_opaque_keys, ApplyExtrinsicResult}; -pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use sp_std::marker::PhantomData; -use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; -use subspace_runtime_primitives::{Moment, SHANNON, SSC}; - -/// Block header type as expected by this runtime. -pub type Header = generic::Header; - -/// Block type as expected by this runtime. -pub type Block = generic::Block; - -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; - -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; - -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckMortality, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, -); - -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; - -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; - -/// Executive: handles dispatch to the various modules. -pub type Executive = domain_pallet_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, - Runtime, ->; - -impl_opaque_keys! { - pub struct SessionKeys { - /// Primarily used for adding the executor authority key into the keystore in the dev mode. - pub executor: sp_domains::ExecutorKey, - } -} - -#[sp_version::runtime_version] -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("subspace-eth-relay-domain"), - impl_name: create_runtime_str!("subspace-eth-relay-domain"), - authoring_version: 0, - spec_version: 0, - impl_version: 0, - apis: RUNTIME_API_VERSIONS, - transaction_version: 0, - state_version: 0, -}; - -/// The existential deposit. Same with the one on primary chain. -pub const EXISTENTIAL_DEPOSIT: Balance = 500 * SHANNON; - -/// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is -/// used to limit the maximal weight of a single extrinsic. -const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); - -/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by -/// `Operational` extrinsics. -const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); - -/// TODO: Proper max block weight -const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::MAX; - -/// The version information used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { - runtime_version: VERSION, - can_author_with: Default::default(), - } -} - -parameter_types! { - pub const Version: RuntimeVersion = VERSION; - pub const BlockHashCount: BlockNumber = 2400; - - // This part is copied from Substrate's `bin/node/runtime/src/lib.rs`. - // The `RuntimeBlockLength` and `RuntimeBlockWeights` exist here because the - // `DeletionWeightLimit` and `DeletionQueueDepth` depend on those to parameterize - // the lazy contract deletion. - pub RuntimeBlockLength: BlockLength = - BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() - .base_block(BlockExecutionWeight::get()) - .for_class(DispatchClass::all(), |weights| { - weights.base_extrinsic = ExtrinsicBaseWeight::get(); - }) - .for_class(DispatchClass::Normal, |weights| { - weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - .for_class(DispatchClass::Operational, |weights| { - weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); - // Operational transactions have some extra reserved space, so that they - // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. - weights.reserved = Some( - MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT - ); - }) - .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) - .build_or_panic(); -} - -// Configure FRAME pallets to include in runtime. - -impl frame_system::Config for Runtime { - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type RuntimeCall = RuntimeCall; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = AccountIdLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - /// The ubiquitous origin type. - type RuntimeOrigin = RuntimeOrigin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Runtime version. - type Version = Version; - /// Converts a module to an index of this module in the runtime. - type PalletInfo = PalletInfo; - /// The data to be stored in an account. - type AccountData = pallet_balances::AccountData; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The weight of database operations that the runtime can invoke. - type DbWeight = RocksDbWeight; - /// The basic call filter to use in dispatchable. - type BaseCallFilter = Everything; - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = (); - /// Block & extrinsics weights: base values and limits. - type BlockWeights = RuntimeBlockWeights; - /// The maximum length of a block (in bytes). - type BlockLength = RuntimeBlockLength; - /// This is used as an identifier of the chain. 42 is the generic substrate prefix. - type SS58Prefix = ConstU16<42>; - /// The action to take on a Runtime Upgrade - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; -} - -impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = Moment; - type OnTimestampSet = (); - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; - type WeightInfo = (); -} - -parameter_types! { - pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; - pub const MaxLocks: u32 = 50; - pub const MaxReserves: u32 = 50; -} - -impl pallet_balances::Config for Runtime { - type MaxLocks = MaxLocks; - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight; - type MaxReserves = MaxReserves; - type ReserveIdentifier = [u8; 8]; - type FreezeIdentifier = (); - type MaxFreezes = (); - type HoldIdentifier = (); - type MaxHolds = (); -} - -parameter_types! { - pub const TransactionByteFee: Balance = 1; - pub const OperationalFeeMultiplier: u8 = 5; -} - -impl pallet_transaction_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; - type WeightToFee = IdentityFee; - type LengthToFee = ConstantMultiplier; - type FeeMultiplierUpdate = (); - type OperationalFeeMultiplier = OperationalFeeMultiplier; -} - -impl domain_pallet_executive::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; -} - -parameter_types! { - pub const StateRootsBound: u32 = 50; - pub const RelayConfirmationDepth: BlockNumber = 1; -} - -parameter_types! { - pub const MaximumRelayers: u32 = 100; - pub const RelayerDeposit: Balance = 100 * SSC; - pub const CoreEthRelayDomainId: DomainId = DomainId::CORE_ETH_RELAY; -} - -impl pallet_messenger::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type SelfDomainId = CoreEthRelayDomainId; - - fn get_endpoint_response_handler( - endpoint: &Endpoint, - ) -> Option>> { - if endpoint == &Endpoint::Id(TransporterEndpointId::get()) { - Some(Box::new(EndpointHandler(PhantomData::))) - } else { - None - } - } - - type Currency = Balances; - type MaximumRelayers = MaximumRelayers; - type RelayerDeposit = RelayerDeposit; - type DomainInfo = (); - type ConfirmationDepth = RelayConfirmationDepth; - type WeightInfo = pallet_messenger::weights::SubstrateWeight; -} - -impl frame_system::offchain::SendTransactionTypes for Runtime -where - RuntimeCall: From, -{ - type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = RuntimeCall; -} - -parameter_types! { - pub const TransporterEndpointId: EndpointId = 1; -} - -impl pallet_transporter::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type SelfDomainId = CoreEthRelayDomainId; - type SelfEndpointId = TransporterEndpointId; - type Currency = Balances; - type Sender = Messenger; - type AccountIdConverter = AccountIdConverter; - type WeightInfo = pallet_transporter::weights::SubstrateWeight; -} - -impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; -} - -// Ethereum mainnet configuration -parameter_types! { - pub const MaxSyncCommitteeSize: u32 = 512; - pub const MaxProofBranchSize: u32 = 20; - pub const MaxExtraDataSize: u32 = 32; - pub const MaxLogsBloomSize: u32 = 256; - pub const MaxFeeRecipientSize: u32 = 20; - pub const MaxPublicKeySize: u32 = 48; - pub const MaxSignatureSize: u32 = 96; - pub const MaxSlotsPerHistoricalRoot: u64 = 8192; - pub const MaxFinalizedHeaderSlotArray: u32 = 1000; - pub const WeakSubjectivityPeriodSeconds: u32 = 97200; - pub const ChainForkVersions: ForkVersions = ForkVersions{ - genesis: Fork { - version: [0, 0, 16, 32], // 0x00001020 - epoch: 0, - }, - altair: Fork { - version: [1, 0, 16, 32], // 0x01001020 - epoch: 36660, - }, - bellatrix: Fork { - version: [2, 0, 16, 32], // 0x02001020 - epoch: 112260, - }, - capella: Fork { - version: [3, 0, 16, 32], // 0x03001020 - epoch: 162304, - }, - }; -} - -impl pallet_ethereum_beacon_client::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type TimeProvider = Timestamp; - type MaxSyncCommitteeSize = MaxSyncCommitteeSize; - type MaxProofBranchSize = MaxProofBranchSize; - type MaxExtraDataSize = MaxExtraDataSize; - type MaxLogsBloomSize = MaxLogsBloomSize; - type MaxFeeRecipientSize = MaxFeeRecipientSize; - type MaxPublicKeySize = MaxPublicKeySize; - type MaxSignatureSize = MaxSignatureSize; - type MaxSlotsPerHistoricalRoot = MaxSlotsPerHistoricalRoot; - type MaxFinalizedHeaderSlotArray = MaxFinalizedHeaderSlotArray; - type ForkVersions = ChainForkVersions; - type WeakSubjectivityPeriodSeconds = WeakSubjectivityPeriodSeconds; - type WeightInfo = pallet_ethereum_beacon_client::weights::SnowbridgeWeight; -} - -pub type FeedId = u64; - -parameter_types! { - // Limit maximum number of feeds per account - pub const MaxFeeds: u32 = 1; - pub const EthereumFeedProcessorId: FeedProcessorId = FeedProcessorId(*b"py/feprx"); -} - -impl pallet_feeds::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type FeedId = FeedId; - type FeedProcessorKind = FeedProcessorKind; - type MaxFeeds = MaxFeeds; - - fn feed_processor( - feed_processor_kind: Self::FeedProcessorKind, - ) -> Box> { - feed_processor(EthereumFeedProcessorId::get(), feed_processor_kind) - } -} - -// Create the runtime by composing the FRAME pallets that were previously configured. -// -// NOTE: Currently domain runtime does not naturally support the pallets with inherent extrinsics. -construct_runtime!( - pub struct Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - // System support stuff. - System: frame_system = 0, - Timestamp: pallet_timestamp = 1, - ExecutivePallet: domain_pallet_executive = 2, - - // Monetary stuff. - Balances: pallet_balances = 20, - TransactionPayment: pallet_transaction_payment = 21, - - // messenger stuff - // Note: Indexes should match the indexes of the System domain runtime - Messenger: pallet_messenger = 60, - Transporter: pallet_transporter = 61, - - // Having beacon client at 90 to have plenty of room for system domain runtime pallets - // (w.r.t future upgrade of system domain runtime) as well as some room for adding light client - // related pallets after 90 - EthereumBeaconClient: pallet_ethereum_beacon_client::{Pallet, Config, Storage, Event} = 90, - Feeds: pallet_feeds = 91, - - // Sudo account - Sudo: pallet_sudo = 100, - } -); - -impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block) - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl sp_block_builder::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl sp_offchain::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { - fn query_info( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment::FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl domain_runtime_primitives::DomainCoreApi for Runtime { - fn extract_signer( - extrinsics: Vec<::Extrinsic>, - ) -> Vec<(Option, ::Extrinsic)> { - use domain_runtime_primitives::Signer; - let lookup = frame_system::ChainContext::::default(); - extrinsics.into_iter().map(|xt| (xt.signer(&lookup).map(|signer| signer.encode()), xt)).collect() - } - - fn intermediate_roots() -> Vec<[u8; 32]> { - ExecutivePallet::intermediate_roots() - } - - fn initialize_block_with_post_state_root(header: &::Header) -> Vec { - Executive::initialize_block(header); - Executive::storage_root() - } - - fn apply_extrinsic_with_post_state_root(extrinsic: ::Extrinsic) -> Vec { - let _ = Executive::apply_extrinsic(extrinsic); - Executive::storage_root() - } - - fn construct_set_code_extrinsic(code: Vec) -> Vec { - use codec::Encode; - let set_code_call = frame_system::Call::set_code { code }; - UncheckedExtrinsic::new_unsigned( - domain_pallet_executive::Call::sudo_unchecked_weight_unsigned { - call: Box::new(set_code_call.into()), - weight: Weight::from_parts(0, 0), - }.into() - ).encode() - } - - fn check_transaction_validity( - uxt: ::Extrinsic, - block_hash: ::Hash, - ) -> Result<(), domain_runtime_primitives::CheckTxValidityError> { - let maybe_address = uxt - .signature - .as_ref() - .map(|(address, _signature, _extra)| address.clone()); - - if let Some(address) = maybe_address { - let sender = ::Lookup::lookup(address)?; - - let tx_validity = - Executive::validate_transaction(TransactionSource::External, uxt, block_hash); - - tx_validity.map(|_| ()).map_err(|tx_validity_error| { - let storage_keys = sp_std::vec![ - frame_system::Account::::hashed_key_for(&sender), - pallet_transaction_payment::NextFeeMultiplier::::hashed_key().to_vec(), - ]; - domain_runtime_primitives::CheckTxValidityError::InvalidTransaction { - error: tx_validity_error, - storage_keys, - } - }) - } else { - Ok(()) - } - } - - fn storage_keys_for_verifying_transaction_validity( - who: opaque::AccountId, - ) -> Result>, domain_runtime_primitives::VerifyTxValidityError> { - let sender = AccountId::decode(&mut who.as_slice()) - .map_err(|_| domain_runtime_primitives::VerifyTxValidityError::FailedToDecodeAccountId)?; - Ok(sp_std::vec![ - frame_system::Account::::hashed_key_for(sender), - pallet_transaction_payment::NextFeeMultiplier::::hashed_key().to_vec(), - ]) - } - } - - impl domain_runtime_primitives::InherentExtrinsicApi for Runtime { - fn construct_inherent_timestamp_extrinsic(moment: Moment) -> Option<::Extrinsic> { - Some( - UncheckedExtrinsic::new_unsigned( - pallet_timestamp::Call::set{ now: moment }.into() - ) - ) - } - } - - impl sp_messenger::MessengerApi for Runtime { - fn extract_xdm_proof_state_roots( - extrinsic: Vec, - ) -> Option::Hash, ::Hash>> { - extract_xdm_proof_state_roots(extrinsic) - } - - fn confirmation_depth() -> BlockNumber { - RelayConfirmationDepth::get() - } - } - - impl sp_messenger::RelayerApi for Runtime { - fn domain_id() -> DomainId { - CoreEthRelayDomainId::get() - } - - fn relay_confirmation_depth() -> BlockNumber { - RelayConfirmationDepth::get() - } - - fn domain_best_number(_domain_id: DomainId) -> Option { - None - } - - fn domain_state_root(_domain_id: DomainId, _number: BlockNumber, _hash: Hash) -> Option{ - None - } - - fn relayer_assigned_messages(relayer_id: AccountId) -> RelayerMessagesWithStorageKey { - Messenger::relayer_assigned_messages(relayer_id) - } - - fn outbox_message_unsigned(msg: CrossDomainMessage::Hash, ::Hash>) -> Option<::Extrinsic> { - Messenger::outbox_message_unsigned(msg) - } - - fn inbox_response_message_unsigned(msg: CrossDomainMessage::Hash, ::Hash>) -> Option<::Extrinsic> { - Messenger::inbox_response_message_unsigned(msg) - } - - fn should_relay_outbox_message(dst_domain_id: DomainId, msg_id: MessageId) -> bool { - Messenger::should_relay_outbox_message(dst_domain_id, msg_id) - } - - fn should_relay_inbox_message_response(dst_domain_id: DomainId, msg_id: MessageId) -> bool { - Messenger::should_relay_inbox_message_response(dst_domain_id, msg_id) - } - } - - impl domain_test_primitives::OnchainStateApi for Runtime { - fn free_balance(account_id: AccountId) -> Balance { - Balances::free_balance(account_id) - } - - fn get_open_channel_for_domain(dst_domain_id: DomainId) -> Option { - Messenger::get_open_channel_for_domain(dst_domain_id).map(|(c, _)| c) - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark for Runtime { - fn benchmark_metadata(extra: bool) -> ( - Vec, - Vec, - ) { - use frame_benchmarking::{Benchmarking, BenchmarkList, list_benchmark}; - use frame_support::traits::StorageInfoTrait; - use frame_system_benchmarking::Pallet as SystemBench; - - let mut list = Vec::::new(); - - list_benchmark!(list, extra, frame_system, SystemBench::); - list_benchmark!(list, extra, ethereum_beacon_client, EthereumBeaconClient); - - let storage_info = AllPalletsWithSystem::storage_info(); - - (list, storage_info) - } - - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, add_benchmark}; - - use frame_system_benchmarking::Pallet as SystemBench; - impl frame_system_benchmarking::Config for Runtime {} - - let whitelist: Vec = vec![ - // Block Number - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), - // Total Issuance - hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), - // Execution Phase - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), - // RuntimeEvent Count - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), - // System Events - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), - ]; - - let mut batches = Vec::::new(); - let params = (&config, &whitelist); - - add_benchmark!(params, batches, frame_system, SystemBench::); - add_benchmark!(params, batches, ethereum_beacon_client, EthereumBeaconClient); - - if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } - Ok(batches) - } - } -} - -fn extract_xdm_proof_state_roots( - encoded_ext: Vec, -) -> Option> { - if let Ok(ext) = UncheckedExtrinsic::decode(&mut encoded_ext.as_slice()) { - match &ext.function { - RuntimeCall::Messenger(pallet_messenger::Call::relay_message { msg }) => { - msg.extract_state_roots_from_proof::() - } - RuntimeCall::Messenger(pallet_messenger::Call::relay_message_response { msg }) => { - msg.extract_state_roots_from_proof::() - } - _ => None, - } - } else { - None - } -} diff --git a/domains/test/runtime/core-payments/Cargo.toml b/domains/test/runtime/core-payments/Cargo.toml index 0dfcfd034f..d680c5f46c 100644 --- a/domains/test/runtime/core-payments/Cargo.toml +++ b/domains/test/runtime/core-payments/Cargo.toml @@ -16,41 +16,41 @@ codec = { package = "parity-scale-codec", version = "3.4.0", 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 = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } hex-literal = { version = '0.4.0', optional = true } log = { version = "0.4.17", default-features = false } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-domain-registry = { version = "0.1.0", path = "../../../pallets/domain-registry", default-features = false } pallet-executor-registry = { version = "0.1.0", path = "../../../pallets/executor-registry", default-features = false } pallet-messenger = { version = "0.1.0", path = "../../../pallets/messenger", default-features = false } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-transporter = { version = "0.1.0", path = "../../../pallets/transporter", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../../crates/sp-domains", default-features = false } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../../primitives/messenger" } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../../crates/subspace-runtime-primitives", default-features = false } [build-dependencies] subspace-wasm-tools = { version = "0.1.0", path = "../../../../crates/subspace-wasm-tools" } -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } [features] default = [ diff --git a/domains/test/runtime/core-payments/src/runtime.rs b/domains/test/runtime/core-payments/src/runtime.rs index 8f89a66179..a3a2aa5fb5 100644 --- a/domains/test/runtime/core-payments/src/runtime.rs +++ b/domains/test/runtime/core-payments/src/runtime.rs @@ -227,7 +227,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -308,6 +308,7 @@ impl pallet_transporter::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type WeightInfo = pallet_sudo::weights::SubstrateWeight; } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/domains/test/runtime/system/Cargo.toml b/domains/test/runtime/system/Cargo.toml index bc14a61eea..a8cb751379 100644 --- a/domains/test/runtime/system/Cargo.toml +++ b/domains/test/runtime/system/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [build-dependencies] sp-domains = { version = "0.1.0", path = "../../../../crates/sp-domains" } subspace-wasm-tools = { version = "0.1.0", path = "../../../../crates/subspace-wasm-tools" } -substrate-wasm-builder = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } +substrate-wasm-builder = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"]} @@ -23,37 +23,37 @@ core-payments-domain-runtime = { version = "0.1.0", path = "../../../runtime/cor 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 = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } hex-literal = { version = '0.4.0', optional = true } log = { version = "0.4.17", default-features = false } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-domain-registry = { version = "0.1.0", path = "../../../pallets/domain-registry", default-features = false } pallet-executor-registry = { version = "0.1.0", path = "../../../pallets/executor-registry", default-features = false } pallet-messenger = { version = "0.1.0", path = "../../../pallets/messenger", default-features = false } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-settlement = { version = "0.1.0", path = "../../../../crates/pallet-settlement", default-features = false } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-transporter = { version = "0.1.0", path = "../../../pallets/transporter", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../../crates/sp-domains", default-features = false } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-messenger = { version = "0.1.0", path = "../../../primitives/messenger", default-features = false } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", path = "../../../../crates/sp-settlement", default-features = false } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } system-runtime-primitives = { version = "0.1.0", path = "../../../primitives/system-runtime", default-features = false } subspace-runtime-primitives = { version = "0.1.0", path = "../../../../crates/subspace-runtime-primitives", default-features = false } diff --git a/domains/test/runtime/system/build.rs b/domains/test/runtime/system/build.rs index 85f456e51a..6a73ae8031 100644 --- a/domains/test/runtime/system/build.rs +++ b/domains/test/runtime/system/build.rs @@ -6,13 +6,6 @@ fn main() { "core_payments_wasm_bundle.rs", ); - subspace_wasm_tools::create_runtime_bundle_inclusion_file( - "core-eth-relay-runtime", - "CORE_ETH_RELAY_WASM_BUNDLE", - Some(&sp_domains::DomainId::CORE_ETH_RELAY.link_section_name()), - "core_eth_relay_wasm_bundle.rs", - ); - subspace_wasm_tools::create_runtime_bundle_inclusion_file( "core-evm-runtime", "CORE_EVM_WASM_BUNDLE", diff --git a/domains/test/runtime/system/src/runtime.rs b/domains/test/runtime/system/src/runtime.rs index d1da833350..342eb67123 100644 --- a/domains/test/runtime/system/src/runtime.rs +++ b/domains/test/runtime/system/src/runtime.rs @@ -250,7 +250,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -400,6 +400,7 @@ where impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type WeightInfo = pallet_sudo::weights::SubstrateWeight; } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/domains/test/service/Cargo.toml b/domains/test/service/Cargo.toml index a69131cc7e..c672d0d5a7 100644 --- a/domains/test/service/Cargo.toml +++ b/domains/test/service/Cargo.toml @@ -13,7 +13,6 @@ include = [ [dependencies] async-trait = "0.1.68" -core-eth-relay-domain-test-runtime = { version = "0.1.0", path = "../runtime/core-eth-relay" } core-payments-domain-test-runtime = { version = "0.1.0", path = "../runtime/core-payments" } domain-client-consensus-relay-chain = { version = "0.1.0", path = "../../client/consensus-relay-chain" } domain-client-executor = { version = "0.1.0", path = "../../client/domain-executor" } @@ -21,38 +20,38 @@ domain-service = { version = "0.1.0", path = "../../service" } domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime", default-features = false } domain-test-primitives = { version = "0.1.0", path = "../../test/primitives", default-features = false } futures = "0.3.28" -frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } rand = "0.8.5" -pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-application-crypto = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-arithmetic = { version = "6.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-application-crypto = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-arithmetic = { version = "16.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } -sp-keyring = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-keyring = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-messenger = { version = "0.1.0", path = "../../../domains/primitives/messenger" } -sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-networking = { path = "../../../crates/subspace-networking" } subspace-proof-of-space = { path = "../../../crates/subspace-proof-of-space" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } @@ -60,8 +59,8 @@ subspace-service = { version = "0.1.0", path = "../../../crates/subspace-service subspace-test-client = { version = "0.1.0", path = "../../../test/subspace-test-client" } subspace-test-runtime = { version = "0.1.0", path = "../../../test/subspace-test-runtime" } subspace-test-service = { version = "0.1.0", path = "../../../test/subspace-test-service" } -substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -substrate-test-client = { version = "2.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +substrate-test-client = { version = "2.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } system-domain-test-runtime = { version = "0.1.0", path = "../runtime/system" } -tokio = { version = "1.27.0", features = ["macros"] } +tokio = { version = "1.28.2", features = ["macros"] } tracing = "0.1.37" diff --git a/domains/test/service/src/chain_spec.rs b/domains/test/service/src/chain_spec.rs index d131583471..03a905c964 100644 --- a/domains/test/service/src/chain_spec.rs +++ b/domains/test/service/src/chain_spec.rs @@ -56,9 +56,6 @@ pub fn get_chain_spec(domain_id: DomainId) -> Box { DomainId::CORE_PAYMENTS => { Box::new(chain_spec_from_genesis!(testnet_core_payments_genesis)) } - DomainId::CORE_ETH_RELAY => { - Box::new(chain_spec_from_genesis!(testnet_core_eth_relay_genesis)) - } _ => panic!("{domain_id:?} unimplemented"), } } @@ -80,33 +77,6 @@ fn endowed_accounts() -> Vec { ] } -fn testnet_core_eth_relay_genesis() -> core_eth_relay_domain_test_runtime::GenesisConfig { - core_eth_relay_domain_test_runtime::GenesisConfig { - system: core_eth_relay_domain_test_runtime::SystemConfig { - code: core_eth_relay_domain_test_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - }, - transaction_payment: Default::default(), - balances: core_eth_relay_domain_test_runtime::BalancesConfig { - balances: endowed_accounts() - .iter() - .cloned() - .map(|k| (k, 1_000_000 * SSC)) - .collect(), - }, - messenger: core_eth_relay_domain_test_runtime::MessengerConfig { - relayers: vec![(Charlie.to_account_id(), Charlie.to_account_id())], - }, - sudo: core_eth_relay_domain_test_runtime::SudoConfig { - key: Some(Charlie.to_account_id()), - }, - ethereum_beacon_client: core_eth_relay_domain_test_runtime::EthereumBeaconClientConfig { - initial_sync: Default::default(), - }, - } -} - fn testnet_core_payments_genesis() -> core_payments_domain_test_runtime::GenesisConfig { core_payments_domain_test_runtime::GenesisConfig { system: core_payments_domain_test_runtime::SystemConfig { diff --git a/domains/test/service/src/core_domain.rs b/domains/test/service/src/core_domain.rs index e3978d94af..2b3ba2707f 100644 --- a/domains/test/service/src/core_domain.rs +++ b/domains/test/service/src/core_domain.rs @@ -376,28 +376,6 @@ impl CoreDomainNodeBuilder { ) .await } - - /// Build a core eth relay domain node - pub async fn build_core_eth_relay_node( - self, - role: Role, - mock_primary_node: &mut MockPrimaryNode, - system_domain_node: &SystemDomainNode, - ) -> CoreEthRelayDomainNode { - CoreDomainNode::build( - DomainId::CORE_ETH_RELAY, - self.tokio_handle, - self.key, - self.base_path, - self.core_domain_nodes, - self.core_domain_nodes_exclusive, - self.run_relayer, - role, - mock_primary_node, - system_domain_node, - ) - .await - } } /// Core payments domain executor instance. @@ -421,25 +399,3 @@ pub type CorePaymentsDomainNode = CoreDomainNode< core_payments_domain_test_runtime::RuntimeApi, CorePaymentsDomainExecutorDispatch, >; - -/// Core eth reply domain executor instance. -pub struct CoreEthRelayDomainExecutorDispatch; - -impl NativeExecutionDispatch for CoreEthRelayDomainExecutorDispatch { - type ExtendHostFunctions = (); - - fn dispatch(method: &str, data: &[u8]) -> Option> { - core_eth_relay_domain_test_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - core_eth_relay_domain_test_runtime::native_version() - } -} - -/// The core paymants domain node -pub type CoreEthRelayDomainNode = CoreDomainNode< - core_eth_relay_domain_test_runtime::Runtime, - core_eth_relay_domain_test_runtime::RuntimeApi, - CoreEthRelayDomainExecutorDispatch, ->; diff --git a/domains/test/service/src/lib.rs b/domains/test/service/src/lib.rs index 8ee0697ad6..f49a6bd831 100644 --- a/domains/test/service/src/lib.rs +++ b/domains/test/service/src/lib.rs @@ -69,7 +69,6 @@ pub fn node_config( let domain_name = match domain_id { DomainId::SYSTEM => "SystemDomain", DomainId::CORE_PAYMENTS => "CorePaymentsDomain", - DomainId::CORE_ETH_RELAY => "CoreEthRelayDomain", _ => panic!("{domain_id:?} unimplemented"), }; @@ -126,18 +125,15 @@ pub fn node_config( offchain_worker: sc_client_api::ExecutionStrategy::NativeWhenPossible, other: sc_client_api::ExecutionStrategy::NativeWhenPossible, }, - rpc_http: None, - rpc_ws: None, - rpc_ipc: None, - rpc_ws_max_connections: None, + 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_max_connections: 0, rpc_cors: None, rpc_methods: Default::default(), - rpc_max_payload: None, - rpc_max_request_size: None, - rpc_max_response_size: None, - rpc_id_provider: None, - rpc_max_subs_per_conn: None, - ws_max_out_buffer_capacity: None, prometheus_config: None, telemetry_endpoints: None, default_heap_pages: None, @@ -152,7 +148,8 @@ pub fn node_config( tracing_receiver: Default::default(), max_runtime_instances: 8, announce_block: true, - base_path: Some(base_path), + data_path: base_path.path().into(), + base_path, informant_output_format: Default::default(), wasm_runtime_overrides: None, runtime_cache_size: 2, diff --git a/orml/vesting/Cargo.toml b/orml/vesting/Cargo.toml index 97ee4ca77f..cbc7672609 100644 --- a/orml/vesting/Cargo.toml +++ b/orml/vesting/Cargo.toml @@ -8,34 +8,39 @@ authors = ["Laminar Developers "] edition = "2021" [dependencies] -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } +serde = { version = "1.0.136", optional = true } -sp-runtime = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-io = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-std = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -frame-support = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -frame-system = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } +frame-support = { default-features = false , git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { default-features = false , git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-io = { default-features = false , git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { default-features = false , git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-std = { default-features = false , git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [dev-dependencies] -sp-core = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-balances = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [features] default = ["std"] std = [ "serde", + "codec/std", + "frame-support/std", + "frame-system/std", "scale-info/std", + "sp-io/std", "sp-runtime/std", "sp-std/std", - "sp-io/std", - "frame-support/std", - "frame-system/std", ] runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", ] -try-runtime = ["frame-support/try-runtime"] diff --git a/orml/vesting/src/default_weight.rs b/orml/vesting/src/default_weight.rs index d716ab7590..42da01846d 100644 --- a/orml/vesting/src/default_weight.rs +++ b/orml/vesting/src/default_weight.rs @@ -8,19 +8,19 @@ use frame_support::weights::{constants::RocksDbWeight as DbWeight, Weight}; impl crate::WeightInfo for () { fn vested_transfer() -> Weight { - Weight::from_ref_time(310_862_000) + Weight::from_parts(310_862_000, 0) .saturating_add(DbWeight::get().reads(4 as u64)) .saturating_add(DbWeight::get().writes(4 as u64)) } fn claim(i: u32) -> Weight { - Weight::from_ref_time(158_614_000) - .saturating_add(Weight::from_ref_time(958_000).saturating_mul(i as u64)) + Weight::from_parts(158_614_000, 0) + .saturating_add(Weight::from_parts(958_000, 0).saturating_mul(i as u64)) .saturating_add(DbWeight::get().reads(3 as u64)) .saturating_add(DbWeight::get().writes(3 as u64)) } fn update_vesting_schedules(i: u32) -> Weight { - Weight::from_ref_time(119_811_000) - .saturating_add(Weight::from_ref_time(2_320_000).saturating_mul(i as u64)) + Weight::from_parts(119_811_000, 0) + .saturating_add(Weight::from_parts(2_320_000, 0).saturating_mul(i as u64)) .saturating_add(DbWeight::get().reads(2 as u64)) .saturating_add(DbWeight::get().writes(3 as u64)) } diff --git a/orml/vesting/src/lib.rs b/orml/vesting/src/lib.rs index 3018354368..9edb4f26dc 100644 --- a/orml/vesting/src/lib.rs +++ b/orml/vesting/src/lib.rs @@ -28,21 +28,22 @@ #![allow(clippy::unused_unit)] use codec::{HasCompact, MaxEncodedLen}; -use frame_support::pallet_prelude::*; -use frame_support::traits::{ - Currency, EnsureOrigin, ExistenceRequirement, Get, LockIdentifier, LockableCurrency, - WithdrawReasons, +use frame_support::{ + ensure, + pallet_prelude::*, + traits::{Currency, EnsureOrigin, ExistenceRequirement, Get, LockIdentifier, LockableCurrency, WithdrawReasons}, + BoundedVec, }; -use frame_support::{ensure, BoundedVec}; -use frame_system::pallet_prelude::*; -use frame_system::{ensure_root, ensure_signed}; +use frame_system::{ensure_root, ensure_signed, pallet_prelude::*}; use scale_info::TypeInfo; -use sp_runtime::traits::{ - AtLeast32Bit, BlockNumberProvider, CheckedAdd, Saturating, StaticLookup, Zero, +use sp_runtime::{ + traits::{AtLeast32Bit, BlockNumberProvider, CheckedAdd, Saturating, StaticLookup, Zero}, + ArithmeticError, DispatchResult, RuntimeDebug, +}; +use sp_std::{ + cmp::{Eq, PartialEq}, + vec::Vec, }; -use sp_runtime::{ArithmeticError, DispatchResult, RuntimeDebug}; -use sp_std::cmp::{Eq, PartialEq}; -use sp_std::vec::Vec; mod mock; mod tests; @@ -59,389 +60,351 @@ pub const VESTING_LOCK_ID: LockIdentifier = *b"ormlvest"; /// of blocks after `start`. #[derive(Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)] pub struct VestingSchedule { - /// Vesting starting block - pub start: BlockNumber, - /// Number of blocks between vest - pub period: BlockNumber, - /// Number of vest - pub period_count: u32, - /// Amount of tokens to release per vest - #[codec(compact)] - pub per_period: Balance, + /// Vesting starting block + pub start: BlockNumber, + /// Number of blocks between vest + pub period: BlockNumber, + /// Number of vest + pub period_count: u32, + /// Amount of tokens to release per vest + #[codec(compact)] + pub per_period: Balance, } impl - VestingSchedule + VestingSchedule { - /// Returns the end of all periods, `None` if calculation overflows. - pub fn end(&self) -> Option { - // period * period_count + start - self.period - .checked_mul(&self.period_count.into())? - .checked_add(&self.start) - } - - /// Returns all locked amount, `None` if calculation overflows. - pub fn total_amount(&self) -> Option { - self.per_period.checked_mul(&self.period_count.into()) - } - - /// Returns locked amount for a given `time`. - /// - /// Note this func assumes schedule is a valid one(non-zero period and - /// non-overflow total amount), and it should be guaranteed by callers. - pub fn locked_amount(&self, time: BlockNumber) -> Balance { - // full = (time - start) / period - // unrealized = period_count - full - // per_period * unrealized - let full = time - .saturating_sub(self.start) - .checked_div(&self.period) - .expect("ensured non-zero period; qed"); - let unrealized = self - .period_count - .saturating_sub(full.unique_saturated_into()); - self.per_period - .checked_mul(&unrealized.into()) - .expect("ensured non-overflow total amount; qed") - } + /// Returns the end of all periods, `None` if calculation overflows. + pub fn end(&self) -> Option { + // period * period_count + start + self.period + .checked_mul(&self.period_count.into())? + .checked_add(&self.start) + } + + /// Returns all locked amount, `None` if calculation overflows. + pub fn total_amount(&self) -> Option { + self.per_period.checked_mul(&self.period_count.into()) + } + + /// Returns locked amount for a given `time`. + /// + /// Note this func assumes schedule is a valid one(non-zero period and + /// non-overflow total amount), and it should be guaranteed by callers. + pub fn locked_amount(&self, time: BlockNumber) -> Balance { + // full = (time - start) / period + // unrealized = period_count - full + // per_period * unrealized + let full = time + .saturating_sub(self.start) + .checked_div(&self.period) + .expect("ensured non-zero period; qed"); + let unrealized = self.period_count.saturating_sub(full.unique_saturated_into()); + self.per_period + .checked_mul(&unrealized.into()) + .expect("ensured non-overflow total amount; qed") + } } #[frame_support::pallet] pub mod module { - use super::*; - - pub(crate) type BalanceOf = - <::Currency as Currency<::AccountId>>::Balance; - pub(crate) type VestingScheduleOf = - VestingSchedule<::BlockNumber, BalanceOf>; - pub type ScheduledItem = ( - ::AccountId, - ::BlockNumber, - ::BlockNumber, - u32, - BalanceOf, - ); - - #[pallet::config] - pub trait Config: frame_system::Config { - type RuntimeEvent: From> + IsType<::RuntimeEvent>; - - type Currency: LockableCurrency; - - #[pallet::constant] - /// The minimum amount transferred to call `vested_transfer`. - type MinVestedTransfer: Get>; - - /// Required origin for vested transfer. - type VestedTransferOrigin: EnsureOrigin; - - /// Weight information for extrinsics in this module. - type WeightInfo: WeightInfo; - - /// The maximum vesting schedules - type MaxVestingSchedules: Get; - - // The block number provider - type BlockNumberProvider: BlockNumberProvider; - } - - #[pallet::error] - pub enum Error { - /// Vesting period is zero - ZeroVestingPeriod, - /// Number of vests is zero - ZeroVestingPeriodCount, - /// Insufficient amount of balance to lock - InsufficientBalanceToLock, - /// This account have too many vesting schedules - TooManyVestingSchedules, - /// The vested transfer amount is too low - AmountLow, - /// Failed because the maximum vesting schedules was exceeded - MaxVestingSchedulesExceeded, - } - - #[pallet::event] - #[pallet::generate_deposit(fn deposit_event)] - pub enum Event { - /// Added new vesting schedule. - VestingScheduleAdded { - from: T::AccountId, - to: T::AccountId, - vesting_schedule: VestingScheduleOf, - }, - /// Claimed vesting. - Claimed { - who: T::AccountId, - amount: BalanceOf, - }, - /// Updated vesting schedules. - VestingSchedulesUpdated { who: T::AccountId }, - } - - /// Vesting schedules of an account. - /// - /// VestingSchedules: map AccountId => Vec\ - #[pallet::storage] - #[pallet::getter(fn vesting_schedules)] - pub type VestingSchedules = StorageMap< - _, - Blake2_128Concat, - T::AccountId, - BoundedVec, T::MaxVestingSchedules>, - ValueQuery, - >; - - #[pallet::genesis_config] - pub struct GenesisConfig { - pub vesting: Vec>, - } - - #[cfg(feature = "std")] - impl Default for GenesisConfig { - #[inline] - fn default() -> Self { - GenesisConfig { vesting: vec![] } - } - } - - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { - fn build(&self) { - self.vesting - .iter() - .for_each(|(who, start, period, period_count, per_period)| { - let mut bounded_schedules = VestingSchedules::::get(who); - bounded_schedules - .try_push(VestingSchedule { - start: *start, - period: *period, - period_count: *period_count, - per_period: *per_period, - }) - .expect("Max vesting schedules exceeded"); - let total_amount = bounded_schedules - .iter() - .try_fold::<_, _, Result, DispatchError>>( - Zero::zero(), - |acc_amount, schedule| { - let amount = ensure_valid_vesting_schedule::(schedule)?; - acc_amount - .checked_add(&amount) - .ok_or_else(|| ArithmeticError::Overflow.into()) - }, - ) - .expect("Invalid vesting schedule"); - - assert!( - T::Currency::free_balance(who) >= total_amount, - "Account do not have enough balance" - ); - - T::Currency::set_lock( - VESTING_LOCK_ID, - who, - total_amount, - WithdrawReasons::all(), - ); - VestingSchedules::::insert(who, bounded_schedules); - }); - } - } - - #[pallet::pallet] - pub struct Pallet(_); - - #[pallet::hooks] - impl Hooks for Pallet {} - - #[pallet::call] - impl Pallet { - #[pallet::call_index(0)] - #[pallet::weight(T::WeightInfo::claim(::MaxVestingSchedules::get() / 2))] - pub fn claim(origin: OriginFor) -> DispatchResult { - let who = ensure_signed(origin)?; - let locked_amount = Self::do_claim(&who); - - Self::deposit_event(Event::Claimed { - who, - amount: locked_amount, - }); - Ok(()) - } - - #[pallet::call_index(1)] - #[pallet::weight(T::WeightInfo::vested_transfer())] - pub fn vested_transfer( - origin: OriginFor, - dest: ::Source, - schedule: VestingScheduleOf, - ) -> DispatchResult { - let from = T::VestedTransferOrigin::ensure_origin(origin)?; - let to = T::Lookup::lookup(dest)?; - - if to == from { - ensure!( - T::Currency::free_balance(&from) - >= schedule.total_amount().ok_or(ArithmeticError::Overflow)?, - Error::::InsufficientBalanceToLock, - ); - } - - Self::do_vested_transfer(&from, &to, schedule.clone())?; - - Self::deposit_event(Event::VestingScheduleAdded { - from, - to, - vesting_schedule: schedule, - }); - Ok(()) - } - - #[pallet::call_index(2)] - #[pallet::weight(T::WeightInfo::update_vesting_schedules(vesting_schedules.len() as u32))] - pub fn update_vesting_schedules( - origin: OriginFor, - who: ::Source, - vesting_schedules: Vec>, - ) -> DispatchResult { - ensure_root(origin)?; - - let account = T::Lookup::lookup(who)?; - Self::do_update_vesting_schedules(&account, vesting_schedules)?; - - Self::deposit_event(Event::VestingSchedulesUpdated { who: account }); - Ok(()) - } - - #[pallet::call_index(3)] - #[pallet::weight(T::WeightInfo::claim(::MaxVestingSchedules::get() / 2))] - pub fn claim_for( - origin: OriginFor, - dest: ::Source, - ) -> DispatchResult { - let _ = ensure_signed(origin)?; - let who = T::Lookup::lookup(dest)?; - let locked_amount = Self::do_claim(&who); - - Self::deposit_event(Event::Claimed { - who, - amount: locked_amount, - }); - Ok(()) - } - } + use super::*; + use sp_std::vec; + + pub(crate) type BalanceOf = + <::Currency as Currency<::AccountId>>::Balance; + pub(crate) type VestingScheduleOf = VestingSchedule<::BlockNumber, BalanceOf>; + pub type ScheduledItem = ( + ::AccountId, + ::BlockNumber, + ::BlockNumber, + u32, + BalanceOf, + ); + + #[pallet::config] + pub trait Config: frame_system::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + + type Currency: LockableCurrency; + + #[pallet::constant] + /// The minimum amount transferred to call `vested_transfer`. + type MinVestedTransfer: Get>; + + /// Required origin for vested transfer. + type VestedTransferOrigin: EnsureOrigin; + + /// Weight information for extrinsics in this module. + type WeightInfo: WeightInfo; + + /// The maximum vesting schedules + type MaxVestingSchedules: Get; + + // The block number provider + type BlockNumberProvider: BlockNumberProvider; + } + + #[pallet::error] + pub enum Error { + /// Vesting period is zero + ZeroVestingPeriod, + /// Number of vests is zero + ZeroVestingPeriodCount, + /// Insufficient amount of balance to lock + InsufficientBalanceToLock, + /// This account have too many vesting schedules + TooManyVestingSchedules, + /// The vested transfer amount is too low + AmountLow, + /// Failed because the maximum vesting schedules was exceeded + MaxVestingSchedulesExceeded, + } + + #[pallet::event] + #[pallet::generate_deposit(fn deposit_event)] + pub enum Event { + /// Added new vesting schedule. + VestingScheduleAdded { + from: T::AccountId, + to: T::AccountId, + vesting_schedule: VestingScheduleOf, + }, + /// Claimed vesting. + Claimed { who: T::AccountId, amount: BalanceOf }, + /// Updated vesting schedules. + VestingSchedulesUpdated { who: T::AccountId }, + } + + /// Vesting schedules of an account. + /// + /// VestingSchedules: map AccountId => Vec + #[pallet::storage] + #[pallet::getter(fn vesting_schedules)] + pub type VestingSchedules = StorageMap< + _, + Blake2_128Concat, + T::AccountId, + BoundedVec, T::MaxVestingSchedules>, + ValueQuery, + >; + + #[pallet::genesis_config] + pub struct GenesisConfig { + pub vesting: Vec>, + } + + impl Default for GenesisConfig { + fn default() -> Self { + GenesisConfig { vesting: vec![] } + } + } + + #[pallet::genesis_build] + impl GenesisBuild for GenesisConfig { + fn build(&self) { + self.vesting + .iter() + .for_each(|(who, start, period, period_count, per_period)| { + let mut bounded_schedules = VestingSchedules::::get(who); + bounded_schedules + .try_push(VestingSchedule { + start: *start, + period: *period, + period_count: *period_count, + per_period: *per_period, + }) + .expect("Max vesting schedules exceeded"); + let total_amount = bounded_schedules + .iter() + .try_fold::<_, _, Result, DispatchError>>(Zero::zero(), |acc_amount, schedule| { + let amount = ensure_valid_vesting_schedule::(schedule)?; + acc_amount + .checked_add(&amount) + .ok_or_else(|| ArithmeticError::Overflow.into()) + }) + .expect("Invalid vesting schedule"); + + assert!( + T::Currency::free_balance(who) >= total_amount, + "Account do not have enough balance" + ); + + T::Currency::set_lock(VESTING_LOCK_ID, who, total_amount, WithdrawReasons::all()); + VestingSchedules::::insert(who, bounded_schedules); + }); + } + } + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::hooks] + impl Hooks for Pallet {} + + #[pallet::call] + impl Pallet { + #[pallet::call_index(0)] + #[pallet::weight(T::WeightInfo::claim(::MaxVestingSchedules::get() / 2))] + pub fn claim(origin: OriginFor) -> DispatchResult { + let who = ensure_signed(origin)?; + let locked_amount = Self::do_claim(&who); + + Self::deposit_event(Event::Claimed { + who, + amount: locked_amount, + }); + Ok(()) + } + + #[pallet::call_index(1)] + #[pallet::weight(T::WeightInfo::vested_transfer())] + pub fn vested_transfer( + origin: OriginFor, + dest: ::Source, + schedule: VestingScheduleOf, + ) -> DispatchResult { + let from = T::VestedTransferOrigin::ensure_origin(origin)?; + let to = T::Lookup::lookup(dest)?; + + if to == from { + ensure!( + T::Currency::free_balance(&from) >= schedule.total_amount().ok_or(ArithmeticError::Overflow)?, + Error::::InsufficientBalanceToLock, + ); + } + + Self::do_vested_transfer(&from, &to, schedule.clone())?; + + Self::deposit_event(Event::VestingScheduleAdded { + from, + to, + vesting_schedule: schedule, + }); + Ok(()) + } + + #[pallet::call_index(2)] + #[pallet::weight(T::WeightInfo::update_vesting_schedules(vesting_schedules.len() as u32))] + pub fn update_vesting_schedules( + origin: OriginFor, + who: ::Source, + vesting_schedules: Vec>, + ) -> DispatchResult { + ensure_root(origin)?; + + let account = T::Lookup::lookup(who)?; + Self::do_update_vesting_schedules(&account, vesting_schedules)?; + + Self::deposit_event(Event::VestingSchedulesUpdated { who: account }); + Ok(()) + } + + #[pallet::call_index(3)] + #[pallet::weight(T::WeightInfo::claim(::MaxVestingSchedules::get() / 2))] + pub fn claim_for(origin: OriginFor, dest: ::Source) -> DispatchResult { + let _ = ensure_signed(origin)?; + let who = T::Lookup::lookup(dest)?; + let locked_amount = Self::do_claim(&who); + + Self::deposit_event(Event::Claimed { + who, + amount: locked_amount, + }); + Ok(()) + } + } } impl Pallet { - fn do_claim(who: &T::AccountId) -> BalanceOf { - let locked = Self::locked_balance(who); - if locked.is_zero() { - // cleanup the storage and unlock the fund - >::remove(who); - T::Currency::remove_lock(VESTING_LOCK_ID, who); - } else { - T::Currency::set_lock(VESTING_LOCK_ID, who, locked, WithdrawReasons::all()); - } - locked - } - - /// Returns locked balance based on current block number. - fn locked_balance(who: &T::AccountId) -> BalanceOf { - let now = T::BlockNumberProvider::current_block_number(); - >::mutate_exists(who, |maybe_schedules| { - let total = if let Some(schedules) = maybe_schedules.as_mut() { - let mut total: BalanceOf = Zero::zero(); - schedules.retain(|s| { - let amount = s.locked_amount(now); - total = total.saturating_add(amount); - !amount.is_zero() - }); - total - } else { - Zero::zero() - }; - if total.is_zero() { - *maybe_schedules = None; - } - total - }) - } - - fn do_vested_transfer( - from: &T::AccountId, - to: &T::AccountId, - schedule: VestingScheduleOf, - ) -> DispatchResult { - let schedule_amount = ensure_valid_vesting_schedule::(&schedule)?; - - let total_amount = Self::locked_balance(to) - .checked_add(&schedule_amount) - .ok_or(ArithmeticError::Overflow)?; - - T::Currency::transfer(from, to, schedule_amount, ExistenceRequirement::AllowDeath)?; - T::Currency::set_lock(VESTING_LOCK_ID, to, total_amount, WithdrawReasons::all()); - >::try_append(to, schedule) - .map_err(|_| Error::::MaxVestingSchedulesExceeded)?; - Ok(()) - } - - fn do_update_vesting_schedules( - who: &T::AccountId, - schedules: Vec>, - ) -> DispatchResult { - let bounded_schedules: BoundedVec, T::MaxVestingSchedules> = schedules - .try_into() - .map_err(|_| Error::::MaxVestingSchedulesExceeded)?; - - // empty vesting schedules cleanup the storage and unlock the fund - if bounded_schedules.len().is_zero() { - >::remove(who); - T::Currency::remove_lock(VESTING_LOCK_ID, who); - return Ok(()); - } - - let total_amount = bounded_schedules - .iter() - .try_fold::<_, _, Result, DispatchError>>( - Zero::zero(), - |acc_amount, schedule| { - let amount = ensure_valid_vesting_schedule::(schedule)?; - acc_amount - .checked_add(&amount) - .ok_or_else(|| ArithmeticError::Overflow.into()) - }, - )?; - ensure!( - T::Currency::free_balance(who) >= total_amount, - Error::::InsufficientBalanceToLock, - ); - - T::Currency::set_lock(VESTING_LOCK_ID, who, total_amount, WithdrawReasons::all()); - >::insert(who, bounded_schedules); - - Ok(()) - } + fn do_claim(who: &T::AccountId) -> BalanceOf { + let locked = Self::locked_balance(who); + if locked.is_zero() { + // cleanup the storage and unlock the fund + >::remove(who); + T::Currency::remove_lock(VESTING_LOCK_ID, who); + } else { + T::Currency::set_lock(VESTING_LOCK_ID, who, locked, WithdrawReasons::all()); + } + locked + } + + /// Returns locked balance based on current block number. + fn locked_balance(who: &T::AccountId) -> BalanceOf { + let now = T::BlockNumberProvider::current_block_number(); + >::mutate_exists(who, |maybe_schedules| { + let total = if let Some(schedules) = maybe_schedules.as_mut() { + let mut total: BalanceOf = Zero::zero(); + schedules.retain(|s| { + let amount = s.locked_amount(now); + total = total.saturating_add(amount); + !amount.is_zero() + }); + total + } else { + Zero::zero() + }; + if total.is_zero() { + *maybe_schedules = None; + } + total + }) + } + + fn do_vested_transfer(from: &T::AccountId, to: &T::AccountId, schedule: VestingScheduleOf) -> DispatchResult { + let schedule_amount = ensure_valid_vesting_schedule::(&schedule)?; + + let total_amount = Self::locked_balance(to) + .checked_add(&schedule_amount) + .ok_or(ArithmeticError::Overflow)?; + + T::Currency::transfer(from, to, schedule_amount, ExistenceRequirement::AllowDeath)?; + T::Currency::set_lock(VESTING_LOCK_ID, to, total_amount, WithdrawReasons::all()); + >::try_append(to, schedule).map_err(|_| Error::::MaxVestingSchedulesExceeded)?; + Ok(()) + } + + fn do_update_vesting_schedules(who: &T::AccountId, schedules: Vec>) -> DispatchResult { + let bounded_schedules: BoundedVec, T::MaxVestingSchedules> = schedules + .try_into() + .map_err(|_| Error::::MaxVestingSchedulesExceeded)?; + + // empty vesting schedules cleanup the storage and unlock the fund + if bounded_schedules.len().is_zero() { + >::remove(who); + T::Currency::remove_lock(VESTING_LOCK_ID, who); + return Ok(()); + } + + let total_amount = bounded_schedules + .iter() + .try_fold::<_, _, Result, DispatchError>>(Zero::zero(), |acc_amount, schedule| { + let amount = ensure_valid_vesting_schedule::(schedule)?; + acc_amount + .checked_add(&amount) + .ok_or_else(|| ArithmeticError::Overflow.into()) + })?; + ensure!( + T::Currency::free_balance(who) >= total_amount, + Error::::InsufficientBalanceToLock, + ); + + T::Currency::set_lock(VESTING_LOCK_ID, who, total_amount, WithdrawReasons::all()); + >::insert(who, bounded_schedules); + + Ok(()) + } } /// Returns `Ok(total_total)` if valid schedule, or error. -fn ensure_valid_vesting_schedule( - schedule: &VestingScheduleOf, -) -> Result, DispatchError> { - ensure!(!schedule.period.is_zero(), Error::::ZeroVestingPeriod); - ensure!( - !schedule.period_count.is_zero(), - Error::::ZeroVestingPeriodCount - ); - ensure!(schedule.end().is_some(), ArithmeticError::Overflow); - - let total_total = schedule.total_amount().ok_or(ArithmeticError::Overflow)?; - - ensure!( - total_total >= T::MinVestedTransfer::get(), - Error::::AmountLow - ); - - Ok(total_total) +fn ensure_valid_vesting_schedule(schedule: &VestingScheduleOf) -> Result, DispatchError> { + ensure!(!schedule.period.is_zero(), Error::::ZeroVestingPeriod); + ensure!(!schedule.period_count.is_zero(), Error::::ZeroVestingPeriodCount); + ensure!(schedule.end().is_some(), ArithmeticError::Overflow); + + let total_total = schedule.total_amount().ok_or(ArithmeticError::Overflow)?; + + ensure!(total_total >= T::MinVestedTransfer::get(), Error::::AmountLow); + + Ok(total_total) } diff --git a/orml/vesting/src/mock.rs b/orml/vesting/src/mock.rs index c8c7cfebde..5f55123805 100644 --- a/orml/vesting/src/mock.rs +++ b/orml/vesting/src/mock.rs @@ -53,10 +53,10 @@ impl pallet_balances::Config for Runtime { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - type FreezeIdentifier = (); - type MaxFreezes = (); - type HoldIdentifier = (); - type MaxHolds = (); + type RuntimeHoldReason = [u8; 8]; + type FreezeIdentifier = [u8; 8]; + type MaxHolds = (); + type MaxFreezes = (); } pub struct EnsureAliceOrBob; diff --git a/orml/vesting/src/tests.rs b/orml/vesting/src/tests.rs index 5a308666fa..e105e7b6b8 100644 --- a/orml/vesting/src/tests.rs +++ b/orml/vesting/src/tests.rs @@ -6,8 +6,8 @@ use super::*; use frame_support::{assert_noop, assert_ok, error::BadOrigin}; use mock::*; use pallet_balances::{BalanceLock, Reasons}; -use sp_runtime::TokenError; use sp_runtime::traits::Dispatchable; +use sp_runtime::TokenError; #[test] fn vesting_from_chain_spec_works() { @@ -215,7 +215,7 @@ fn vested_transfer_fails_if_transfer_err() { }; assert_noop!( Vesting::vested_transfer(RuntimeOrigin::signed(BOB), ALICE, schedule), - DispatchError::Token(TokenError::FundsUnavailable), + TokenError::FundsUnavailable, ); }); } @@ -519,7 +519,7 @@ fn cliff_vesting_works() { assert_eq!(PalletBalances::locks(BOB), vec![balance_lock.clone()]); assert_noop!( PalletBalances::transfer(RuntimeOrigin::signed(BOB), CHARLIE, VESTING_AMOUNT), - DispatchError::Token(TokenError::Frozen), + TokenError::Frozen, ); } diff --git a/orml/vesting/src/weights.rs b/orml/vesting/src/weights.rs index dee57ab4d2..be6eb9ac0a 100644 --- a/orml/vesting/src/weights.rs +++ b/orml/vesting/src/weights.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for orml_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-05-04, STEPS: \[50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] +//! DATE: 2021-05-04, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 // Executed Command: diff --git a/test/subspace-test-client/Cargo.toml b/test/subspace-test-client/Cargo.toml index 443dbf39e4..a0461945dd 100644 --- a/test/subspace-test-client/Cargo.toml +++ b/test/subspace-test-client/Cargo.toml @@ -17,15 +17,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] futures = "0.3.28" schnorrkel = "0.9.1" -sc-chain-spec = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-client-api = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-chain-spec = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-client-api = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sc-consensus-subspace = { version = "0.1.0", path = "../../crates/sc-consensus-subspace" } -sc-executor = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sp-api = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-executor = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-service = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sp-api = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-consensus-subspace = { version = "0.1.0", path = "../../crates/sp-consensus-subspace" } -sp-core = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-core = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-archiving = { path = "../../crates/subspace-archiving" } subspace-core-primitives = { path = "../../crates/subspace-core-primitives" } subspace-erasure-coding = { path = "../../crates/subspace-erasure-coding" } diff --git a/test/subspace-test-runtime/Cargo.toml b/test/subspace-test-runtime/Cargo.toml index e2430115da..02760d3493 100644 --- a/test/subspace-test-runtime/Cargo.toml +++ b/test/subspace-test-runtime/Cargo.toml @@ -18,12 +18,12 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } -frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } hex-literal = { version = "0.4.0", optional = true } orml-vesting = { version = "0.4.1-dev", default-features = false, path = "../../orml/vesting" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-domains = { version = "0.1.0", default-features = false, path = "../../crates/pallet-domains" } pallet-feeds = { version = "0.1.0", default-features = false, path = "../../crates/pallet-feeds" } pallet-grandpa-finality-verifier = { version = "0.1.0", default-features = false, path = "../../crates/pallet-grandpa-finality-verifier" } @@ -31,39 +31,40 @@ pallet-object-store = { version = "0.1.0", default-features = false, path = "../ pallet-offences-subspace = { version = "0.1.0", default-features = false, path = "../../crates/pallet-offences-subspace" } pallet-settlement = { version = "0.1.0", default-features = false, path = "../../crates/pallet-settlement" } pallet-rewards = { version = "0.1.0", default-features = false, path = "../../crates/pallet-rewards" } -pallet-subspace = { version = "0.1.0", default-features = false, path = "../../crates/pallet-subspace" } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +pallet-subspace = { version = "0.1.0", default-features = false, features = ["serde"], path = "../../crates/pallet-subspace" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } pallet-transaction-fees = { version = "0.1.0", default-features = false, path = "../../crates/pallet-transaction-fees" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-block-builder = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false, version = "4.0.0-dev"} +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-block-builder = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false, version = "4.0.0-dev"} +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../../crates/sp-consensus-subspace" } -sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", default-features = false, path = "../../crates/sp-domains" } -sp-inherents = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false, version = "4.0.0-dev"} +sp-inherents = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false, version = "4.0.0-dev"} sp-objects = { version = "0.1.0", default-features = false, path = "../../crates/sp-objects" } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-settlement = { version = "0.1.0", default-features = false, path = "../../crates/sp-settlement" } -sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } 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-verification = { version = "0.1.0", default-features = false, path = "../../crates/subspace-verification" } system-domain-test-runtime = { version = "0.1.0", default-features = false, path = "../../domains/test/runtime/system" } # Used for the node template's RPCs -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } [build-dependencies] subspace-wasm-tools = { version = "0.1.0", path = "../../crates/subspace-wasm-tools" } -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", optional = true } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", optional = true } [features] default = ["std"] @@ -94,6 +95,7 @@ std = [ "scale-info/std", "sp-api/std", "sp-block-builder/std", + "sp-consensus-slots/std", "sp-consensus-subspace/std", "sp-core/std", "sp-domains/std", diff --git a/test/subspace-test-runtime/src/lib.rs b/test/subspace-test-runtime/src/lib.rs index d91950bfe7..05b18c5403 100644 --- a/test/subspace-test-runtime/src/lib.rs +++ b/test/subspace-test-runtime/src/lib.rs @@ -30,7 +30,6 @@ include!(concat!( include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); use codec::{Compact, CompactLen, Encode}; -use core::time::Duration; use frame_support::traits::{ ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Currency, ExistenceRequirement, Get, Imbalance, WithdrawReasons, @@ -45,6 +44,7 @@ use pallet_feeds::feed_processor::{FeedMetadata, FeedObjectMapping, FeedProcesso use pallet_grandpa_finality_verifier::chain::Chain; pub use pallet_subspace::AllowAuthoringBy; use sp_api::{impl_runtime_apis, BlockT, HashT, HeaderT}; +use sp_consensus_slots::SlotDuration; use sp_consensus_subspace::digests::CompatibleDigestItem; use sp_consensus_subspace::{ ChainConstants, EquivocationProof, FarmerPublicKey, GlobalRandomnesses, SignedVote, @@ -287,7 +287,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = pallet_balances::weights::SubstrateWeight; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type MaxHolds = (); } @@ -459,6 +459,7 @@ impl pallet_utility::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type WeightInfo = pallet_sudo::weights::SubstrateWeight; } impl frame_system::offchain::SendTransactionTypes for Runtime @@ -1072,8 +1073,8 @@ impl_runtime_apis! { MAX_PIECES_IN_SECTOR } - fn slot_duration() -> Duration { - Duration::from_millis(Subspace::slot_duration()) + fn slot_duration() -> SlotDuration { + SlotDuration::from_millis(Subspace::slot_duration()) } fn global_randomnesses() -> GlobalRandomnesses { diff --git a/test/subspace-test-service/Cargo.toml b/test/subspace-test-service/Cargo.toml index 88082e4b1e..a8a8a14745 100644 --- a/test/subspace-test-service/Cargo.toml +++ b/test/subspace-test-service/Cargo.toml @@ -24,30 +24,30 @@ jsonrpsee = { version = "0.16.2", features = ["server"] } rand = "0.8.5" pallet-domains = { version = "0.1.0", path = "../../crates/pallet-domains" } parking_lot = "0.12.1" -sc-block-builder = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-client-api = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-executor = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-block-builder = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-client-api = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-executor = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sc-consensus-fraud-proof = { version = "0.1.0", path = "../../crates/sc-consensus-fraud-proof" } -sc-network = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-service = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae", default-features = false } -sc-tracing = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-application-crypto = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-blockchain = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-consensus = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sc-network = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-service = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f", default-features = false } +sc-tracing = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-application-crypto = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-blockchain = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-consensus = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-consensus-subspace = { version = "0.1.0", path = "../../crates/sp-consensus-subspace" } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } sp-domains = { version = "0.1.0", path = "../../crates/sp-domains" } -sp-keyring = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } -sp-runtime = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-keyring = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } +sp-runtime = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../../crates/subspace-core-primitives" } subspace-fraud-proof = { path = "../../crates/subspace-fraud-proof" } subspace-runtime-primitives = { path = "../../crates/subspace-runtime-primitives" } @@ -55,8 +55,8 @@ subspace-service = { path = "../../crates/subspace-service" } subspace-test-client = { path = "../subspace-test-client" } subspace-test-runtime = { version = "0.1.0", features = ["do-not-enforce-cost-of-storage"], path = "../subspace-test-runtime" } subspace-transaction-pool = { path = "../../crates/subspace-transaction-pool" } -tokio = "1.27.0" +tokio = "1.28.2" tracing = "0.1.37" [dev-dependencies] -sp-keyring = { git = "https://github.com/subspace/substrate", rev = "88bb945975301f9b29bad96dc4590c33f1029eae" } +sp-keyring = { git = "https://github.com/subspace/substrate", rev = "28e33f78a3aa8ac4c6753108bc0471273ff6bf6f" } diff --git a/test/subspace-test-service/src/lib.rs b/test/subspace-test-service/src/lib.rs index 77b4fe4541..53b379e84e 100644 --- a/test/subspace-test-service/src/lib.rs +++ b/test/subspace-test-service/src/lib.rs @@ -149,17 +149,15 @@ pub fn node_config( offchain_worker: sc_client_api::ExecutionStrategy::NativeWhenPossible, other: sc_client_api::ExecutionStrategy::NativeWhenPossible, }, - rpc_http: None, - rpc_ws: None, - rpc_ipc: None, - rpc_max_payload: None, - rpc_max_request_size: None, - rpc_max_response_size: None, + rpc_addr: None, + rpc_max_request_size: 0, + rpc_max_response_size: 0, rpc_id_provider: None, - rpc_ws_max_connections: None, + rpc_max_subs_per_conn: 0, + rpc_port: 0, + rpc_max_connections: 0, rpc_cors: None, rpc_methods: Default::default(), - ws_max_out_buffer_capacity: None, prometheus_config: None, telemetry_endpoints: None, default_heap_pages: None, @@ -171,10 +169,10 @@ pub fn node_config( tracing_receiver: Default::default(), max_runtime_instances: 8, announce_block: true, - base_path: Some(base_path), + data_path: base_path.path().into(), + base_path, informant_output_format: Default::default(), runtime_cache_size: 2, - rpc_max_subs_per_conn: None, } } @@ -246,12 +244,7 @@ impl MockPrimaryNode { ); let _enter = span.enter(); - let executor = NativeElseWasmExecutor::::new( - config.wasm_method, - config.default_heap_pages, - config.max_runtime_instances, - config.runtime_cache_size, - ); + let executor = sc_service::new_native_or_wasm_executor(&config); let (client, backend, keystore_container, mut task_manager) = sc_service::new_full_parts::(&config, None, executor.clone()) @@ -276,7 +269,6 @@ impl MockPrimaryNode { let invalid_state_transition_proof_verifier = InvalidStateTransitionProofVerifier::new( client.clone(), executor.clone(), - task_manager.spawn_handle(), VerifierClient::new(client.clone()), domain_extrinsics_builder, ); @@ -305,9 +297,12 @@ impl MockPrimaryNode { let mut block_import = MockBlockImport::<_, _, _>::new(fraud_proof_block_import); + let net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); + let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(),