From de3a0710cdea5aaad28fa23cca3bb4cdd399a8d4 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Tue, 16 Jan 2024 16:27:26 +0200 Subject: [PATCH 1/6] Upgrade to latest git versions of Substrate and Frontier forks, just make things compile, there are some warnings --- Cargo.lock | 2389 +++++++---------- Cargo.toml | 79 +- crates/pallet-domains/Cargo.toml | 28 +- crates/pallet-domains/src/lib.rs | 4 +- crates/pallet-domains/src/runtime_registry.rs | 2 + crates/pallet-domains/src/tests.rs | 16 +- crates/pallet-feeds/Cargo.toml | 12 +- crates/pallet-feeds/src/mock.rs | 7 +- .../Cargo.toml | 20 +- .../src/tests/mock.rs | 4 +- crates/pallet-object-store/Cargo.toml | 12 +- crates/pallet-object-store/src/mock.rs | 7 +- crates/pallet-offences-subspace/Cargo.toml | 12 +- crates/pallet-offences-subspace/src/mock.rs | 8 +- crates/pallet-rewards/Cargo.toml | 4 +- crates/pallet-runtime-configs/Cargo.toml | 12 +- crates/pallet-subspace/Cargo.toml | 24 +- crates/pallet-subspace/src/mock.rs | 5 +- crates/pallet-transaction-fees/Cargo.toml | 4 +- crates/sc-consensus-subspace-rpc/Cargo.toml | 16 +- crates/sc-consensus-subspace/Cargo.toml | 28 +- .../sc-consensus-subspace/src/block_import.rs | 4 +- crates/sc-consensus-subspace/src/lib.rs | 2 +- .../sc-consensus-subspace/src/slot_worker.rs | 4 +- crates/sc-consensus-subspace/src/verifier.rs | 4 +- crates/sc-proof-of-time/Cargo.toml | 20 +- crates/sc-proof-of-time/src/source.rs | 6 +- crates/sc-proof-of-time/src/source/gossip.rs | 29 +- crates/sc-subspace-block-relay/Cargo.toml | 16 +- .../src/consensus/relay.rs | 6 +- crates/sc-subspace-block-relay/src/utils.rs | 3 +- crates/sc-subspace-chain-specs/Cargo.toml | 12 +- crates/sc-subspace-chain-specs/src/utils.rs | 5 + crates/sp-consensus-subspace/Cargo.toml | 22 +- crates/sp-consensus-subspace/src/digests.rs | 3 +- crates/sp-consensus-subspace/src/lib.rs | 2 +- crates/sp-domains-fraud-proof/Cargo.toml | 52 +- .../src/bundle_equivocation.rs | 3 +- .../src/host_functions.rs | 4 +- crates/sp-domains-fraud-proof/src/lib.rs | 5 +- crates/sp-domains/Cargo.toml | 26 +- .../src/bundle_producer_election.rs | 12 +- crates/sp-domains/src/lib.rs | 10 +- crates/sp-lightclient/Cargo.toml | 12 +- crates/sp-objects/Cargo.toml | 4 +- crates/subspace-archiving/Cargo.toml | 2 +- crates/subspace-core-primitives/Cargo.toml | 4 +- crates/subspace-farmer-components/Cargo.toml | 2 +- crates/subspace-farmer/Cargo.toml | 4 +- crates/subspace-malicious-operator/Cargo.toml | 54 +- .../src/bin/subspace-malicious-operator.rs | 9 +- .../src/chain_spec.rs | 18 +- .../src/malicious_bundle_tamper.rs | 4 +- crates/subspace-networking/Cargo.toml | 4 +- crates/subspace-node/Cargo.toml | 52 +- crates/subspace-node/src/chain_spec.rs | 30 +- crates/subspace-node/src/commands/run.rs | 12 +- .../subspace-node/src/commands/run/domain.rs | 2 + crates/subspace-node/src/domain/cli.rs | 11 +- .../src/domain/evm_chain_spec.rs | 16 +- crates/subspace-rpc-primitives/Cargo.toml | 2 +- crates/subspace-runtime-primitives/Cargo.toml | 16 +- crates/subspace-runtime/Cargo.toml | 52 +- crates/subspace-runtime/src/domains.rs | 2 +- crates/subspace-runtime/src/lib.rs | 24 +- crates/subspace-service/Cargo.toml | 71 +- crates/subspace-service/src/config.rs | 5 +- crates/subspace-service/src/lib.rs | 18 +- crates/subspace-service/src/sync_from_dsn.rs | 22 +- .../subspace-service/src/transaction_pool.rs | 39 +- crates/subspace-verification/Cargo.toml | 2 +- domains/client/block-builder/Cargo.toml | 18 +- domains/client/block-preprocessor/Cargo.toml | 25 +- domains/client/block-preprocessor/src/lib.rs | 4 +- .../src/stateless_runtime.rs | 7 +- .../block-preprocessor/src/xdm_verifier.rs | 12 +- .../client/consensus-relay-chain/Cargo.toml | 12 +- .../cross-domain-message-gossip/Cargo.toml | 14 +- .../src/gossip_worker.rs | 16 +- .../src/message_listener.rs | 5 +- domains/client/domain-operator/Cargo.toml | 52 +- .../domain-operator/src/bundle_processor.rs | 4 +- .../src/bundle_producer_election_solver.rs | 2 +- .../src/domain_block_processor.rs | 4 +- .../src/domain_bundle_producer.rs | 4 +- .../src/domain_bundle_proposer.rs | 4 +- .../domain-operator/src/domain_worker.rs | 4 +- .../src/domain_worker_starter.rs | 4 +- .../src/fetch_domain_bootstrap_info.rs | 4 +- .../client/domain-operator/src/operator.rs | 2 +- domains/client/domain-operator/src/tests.rs | 5 +- domains/client/eth-service/Cargo.toml | 47 +- domains/client/eth-service/src/provider.rs | 5 +- domains/client/eth-service/src/service.rs | 4 +- domains/client/relayer/Cargo.toml | 15 +- domains/client/relayer/src/lib.rs | 2 +- domains/client/subnet-gossip/Cargo.toml | 12 +- domains/client/subnet-gossip/src/lib.rs | 19 +- domains/pallets/block-fees/Cargo.toml | 10 +- domains/pallets/domain-id/Cargo.toml | 10 +- domains/pallets/domain-id/src/tests.rs | 8 +- domains/pallets/executive/Cargo.toml | 24 +- domains/pallets/executive/src/lib.rs | 6 +- domains/pallets/executive/src/mock.rs | 8 +- domains/pallets/executive/src/tests.rs | 1 + domains/pallets/messenger/Cargo.toml | 18 +- domains/pallets/messenger/src/mock.rs | 8 +- domains/pallets/transporter/Cargo.toml | 16 +- domains/pallets/transporter/src/mock.rs | 8 +- domains/primitives/block-fees/Cargo.toml | 4 +- domains/primitives/digests/Cargo.toml | 2 +- domains/primitives/executive/Cargo.toml | 4 +- domains/primitives/executive/src/lib.rs | 5 +- domains/primitives/messenger/Cargo.toml | 14 +- domains/primitives/messenger/src/messages.rs | 7 +- domains/primitives/runtime/Cargo.toml | 14 +- domains/runtime/evm/Cargo.toml | 66 +- domains/runtime/evm/src/lib.rs | 9 +- domains/service/Cargo.toml | 65 +- domains/service/src/config.rs | 5 +- domains/service/src/domain.rs | 9 +- domains/service/src/lib.rs | 54 +- domains/service/src/transaction_pool.rs | 22 +- domains/test/primitives/Cargo.toml | 2 +- domains/test/runtime/evm/Cargo.toml | 58 +- domains/test/runtime/evm/src/lib.rs | 9 +- domains/test/service/Cargo.toml | 54 +- domains/test/service/src/chain_spec.rs | 3 +- domains/test/service/src/domain.rs | 4 +- orml/vesting/Cargo.toml | 16 +- orml/vesting/src/mock.rs | 8 +- test/subspace-test-client/Cargo.toml | 16 +- test/subspace-test-client/src/chain_spec.rs | 27 +- .../src/domain_chain_spec.rs | 7 +- test/subspace-test-runtime/Cargo.toml | 44 +- test/subspace-test-runtime/src/lib.rs | 22 +- test/subspace-test-service/Cargo.toml | 46 +- test/subspace-test-service/src/lib.rs | 40 +- 138 files changed, 1996 insertions(+), 2499 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f4dfb9e537..3fad6ba5d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,7 +75,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -188,7 +188,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -215,25 +215,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", -] - [[package]] name = "aead" version = "0.5.2" @@ -244,29 +225,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher 0.3.0", - "cpufeatures", - "opaque-debug 0.3.0", -] - [[package]] name = "aes" version = "0.8.3" @@ -278,52 +236,18 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", - "ghash 0.4.4", - "subtle", -] - [[package]] name = "aes-gcm" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" dependencies = [ - "aead 0.5.2", - "aes 0.8.3", + "aead", + "aes", "cipher 0.4.4", - "ctr 0.9.2", - "ghash 0.5.0", - "subtle", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", + "ctr", + "ghash", + "subtle 2.4.1", ] [[package]] @@ -411,9 +335,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "4cd2405b3ac1faab2990b74d728624cd9fd115651fcecc7c2d8daf01376275ba" dependencies = [ "anstyle", "anstyle-parse", @@ -449,12 +373,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -474,23 +398,40 @@ dependencies = [ [[package]] name = "aquamarine" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ "include_dir", "itertools", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] -name = "arc-swap" -version = "1.6.0" +name = "ark-bls12-377" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-models-ext", + "ark-std", +] [[package]] name = "ark-bls12-381" @@ -504,6 +445,45 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ec" version = "0.4.2" @@ -518,9 +498,35 @@ dependencies = [ "hashbrown 0.13.2", "itertools", "num-traits", + "rayon", "zeroize", ] +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ed-on-bls12-381-bandersnatch" version = "0.4.0" @@ -533,6 +539,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ff" version = "0.4.2" @@ -576,6 +595,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-models-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", +] + [[package]] name = "ark-poly" version = "0.4.2" @@ -591,21 +623,22 @@ dependencies = [ [[package]] name = "ark-scale" -version = "0.0.10" +version = "0.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" dependencies = [ "ark-ec", "ark-ff", "ark-serialize", "ark-std", "parity-scale-codec", + "scale-info", ] [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", "ark-ff", @@ -613,7 +646,7 @@ dependencies = [ "ark-std", "ark-transcript", "digest 0.10.7", - "rand_core 0.6.4", + "getrandom_or_panic", "zeroize", ] @@ -648,12 +681,13 @@ checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", "rand 0.8.5", + "rayon", ] [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ff", "ark-serialize", @@ -663,6 +697,12 @@ dependencies = [ "sha3", ] +[[package]] +name = "array-bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + [[package]] name = "array-bytes" version = "6.1.0" @@ -687,29 +727,13 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "asn1-rs" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" -dependencies = [ - "asn1-rs-derive 0.1.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time", -] - [[package]] name = "asn1-rs" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ - "asn1-rs-derive 0.4.0", + "asn1-rs-derive", "asn1-rs-impl", "displaydoc", "nom", @@ -719,18 +743,6 @@ dependencies = [ "time", ] -[[package]] -name = "asn1-rs-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "asn1-rs-derive" version = "0.4.0" @@ -954,7 +966,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -1015,17 +1027,6 @@ dependencies = [ "url", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "auto_impl" version = "1.1.0" @@ -1084,8 +1085,8 @@ dependencies = [ [[package]] name = "bandersnatch_vrfs" -version = "0.0.1" -source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +version = "0.0.4" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-bls12-381", "ark-ec", @@ -1100,6 +1101,8 @@ dependencies = [ "rand_core 0.6.4", "ring 0.1.0", "sha2 0.10.8", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", "zeroize", ] @@ -1109,12 +1112,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -1163,6 +1160,25 @@ dependencies = [ "serde", ] +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + [[package]] name = "bitflags" version = "1.3.2" @@ -1187,6 +1203,18 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" +dependencies = [ + "byte-tools", + "crypto-mac 0.7.0", + "digest 0.8.1", + "opaque-debug 0.2.3", +] + [[package]] name = "blake2" version = "0.10.6" @@ -1263,16 +1291,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding 0.2.1", - "cipher 0.2.5", -] - [[package]] name = "block-padding" version = "0.1.5" @@ -1282,12 +1300,6 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "block-padding" version = "0.3.3" @@ -1444,6 +1456,16 @@ dependencies = [ "bytes", ] +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher 0.2.5", + "ppv-lite86", +] + [[package]] name = "camino" version = "1.1.6" @@ -1492,17 +1514,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ccm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" -dependencies = [ - "aead 0.3.2", - "cipher 0.2.5", - "subtle", -] - [[package]] name = "cfg-expr" version = "0.15.5" @@ -1524,6 +1535,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862" +dependencies = [ + "byteorder", + "keystream", +] + [[package]] name = "chacha20" version = "0.9.1" @@ -1541,7 +1562,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.5.2", + "aead", "chacha20", "cipher 0.4.4", "poly1305", @@ -1550,9 +1571,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.30" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1611,15 +1632,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "cipher" version = "0.4.4" @@ -1633,9 +1645,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.3" +version = "4.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" +checksum = "80932e03c33999b9235edb8655bc9df3204adc9887c2f95b50cb1deb9fd54253" dependencies = [ "clap_builder", "clap_derive", @@ -1643,33 +1655,34 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "d6c0db58c659eef1c73e444d298c27322a1b52f6927d2ad470c0c0f96fa7b8fa" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "cmake" @@ -1710,7 +1723,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof?rev=8657210#86572101f4210647984ab4efedba6b3fcc890895" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" dependencies = [ "ark-ec", "ark-ff", @@ -1718,6 +1731,7 @@ dependencies = [ "ark-serialize", "ark-std", "fflonk", + "getrandom_or_panic", "merlin 3.0.0", "rand_chacha 0.3.1", ] @@ -1737,6 +1751,19 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -1771,6 +1798,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + [[package]] name = "convert_case" version = "0.4.0" @@ -1940,21 +1973,6 @@ dependencies = [ "wasmtime-types", ] -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - [[package]] name = "crc32fast" version = "1.3.2" @@ -2064,18 +2082,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - [[package]] name = "crypto-bigint" version = "0.5.3" @@ -2084,7 +2090,7 @@ checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2101,31 +2107,32 @@ dependencies = [ [[package]] name = "crypto-mac" -version = "0.8.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" dependencies = [ - "generic-array 0.14.7", - "subtle", + "generic-array 0.12.4", + "subtle 1.0.0", ] [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] -name = "ctr" -version = "0.8.0" +name = "crypto-mac" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "cipher 0.3.0", + "generic-array 0.14.7", + "subtle 2.4.1", ] [[package]] @@ -2152,7 +2159,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2165,7 +2172,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2182,7 +2189,7 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2194,7 +2201,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -2221,7 +2228,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -2238,42 +2245,7 @@ checksum = "2fa16a70dd58129e4dfffdff535fb1bce66673f7bbeec4a5a1765a504e1ccd84" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", -] - -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -2302,17 +2274,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", -] - [[package]] name = "der" version = "0.7.8" @@ -2323,27 +2284,13 @@ dependencies = [ "zeroize", ] -[[package]] -name = "der-parser" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" -dependencies = [ - "asn1-rs 0.3.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - [[package]] name = "der-parser" version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "displaydoc", "nom", "num-bigint", @@ -2379,37 +2326,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core", - "syn 1.0.109", -] - [[package]] name = "derive_more" version = "0.99.17" @@ -2456,16 +2372,16 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] name = "directories" -version = "4.0.1" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ - "dirs-sys 0.3.7", + "dirs-sys", ] [[package]] @@ -2484,18 +2400,7 @@ version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "dirs-sys 0.4.1", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", + "dirs-sys", ] [[package]] @@ -2529,13 +2434,13 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", "ark-ff", @@ -2545,24 +2450,23 @@ dependencies = [ "ark-std", "ark-transcript", "arrayvec 0.7.4", - "rand_core 0.6.4", "zeroize", ] [[package]] name = "docify" -version = "0.2.1" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029de870d175d11969524d91a3fb2cbf6d488b853bff99d41cf65e533ac7d9d2" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.1" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac43324656a1b05eb0186deb51f27d2d891c704c37f34de281ef6297ba193e5" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" dependencies = [ "common-path", "derive-syn-parse", @@ -2570,9 +2474,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.39", + "syn 2.0.48", "termcolor", - "toml 0.7.8", + "toml 0.8.8", "walkdir", ] @@ -2615,6 +2519,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-timestamp", + "sp-version", "subspace-core-primitives", "subspace-runtime-primitives", "tracing", @@ -2644,6 +2549,7 @@ dependencies = [ "sc-client-api", "sc-state-db", "sc-utils", + "scale-info", "sp-api", "sp-blockchain", "sp-consensus", @@ -2741,6 +2647,7 @@ dependencies = [ "futures", "jsonrpsee", "pallet-transaction-payment-rpc", + "parity-scale-codec", "sc-client-api", "sc-executor", "sc-network-sync", @@ -2802,7 +2709,6 @@ name = "domain-service" version = "0.1.0" dependencies = [ "async-trait", - "atomic", "cross-domain-message-gossip", "domain-block-preprocessor", "domain-client-consensus-relay-chain", @@ -2951,30 +2857,18 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" -[[package]] -name = "ecdsa" -version = "0.14.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] - [[package]] name = "ecdsa" version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.8", + "der", "digest 0.10.7", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", - "signature 2.1.0", - "spki 0.7.2", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] [[package]] @@ -2983,8 +2877,8 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ - "pkcs8 0.10.2", - "signature 2.1.0", + "pkcs8", + "signature", ] [[package]] @@ -2998,7 +2892,7 @@ dependencies = [ "rand_core 0.6.4", "serde", "sha2 0.10.8", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -3024,44 +2918,28 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" -version = "0.12.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", + "base16ct", + "crypto-bigint", "digest 0.10.7", - "ff 0.12.1", + "ff", "generic-array 0.14.7", - "group 0.12.1", - "hkdf", - "pem-rfc7468", - "pkcs8 0.9.0", + "group", + "pkcs8", "rand_core 0.6.4", - "sec1 0.3.0", - "subtle", + "sec1", + "subtle 2.4.1", "zeroize", ] [[package]] -name = "elliptic-curve" -version = "0.13.5" +name = "encode_unicode" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" -dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.3", - "digest 0.10.7", - "ff 0.13.0", - "generic-array 0.14.7", - "group 0.13.0", - "pkcs8 0.10.2", - "rand_core 0.6.4", - "sec1 0.7.3", - "subtle", - "zeroize", -] +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" @@ -3093,7 +2971,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -3159,20 +3037,20 @@ dependencies = [ [[package]] name = "ethereum" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a89fb87a9e103f71b903b80b670200b54cc67a07578f070681f1fffb7396fb7" +checksum = "2e04d24d20b8ff2235cffbf242d5092de3aa45f77c5270ddbfadd2778ca13fea" dependencies = [ "bytes", "ethereum-types", - "hash-db 0.15.2", + "hash-db", "hash256-std-hasher", "parity-scale-codec", "rlp", "scale-info", "serde", "sha3", - "triehash", + "trie-root", ] [[package]] @@ -3231,8 +3109,9 @@ dependencies = [ [[package]] name = "evm" -version = "0.39.1" -source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +version = "0.41.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "767f43e9630cc36cf8ff2777cbb0121b055f0d1fd6eaaa13b46a1808f0d0e7e9" dependencies = [ "auto_impl", "environmental", @@ -3251,8 +3130,9 @@ dependencies = [ [[package]] name = "evm-core" -version = "0.39.0" -source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1da6cedc5cedb4208e59467106db0d1f50db01b920920589f8e672c02fdc04f" dependencies = [ "parity-scale-codec", "primitive-types", @@ -3361,8 +3241,9 @@ dependencies = [ [[package]] name = "evm-gasometer" -version = "0.39.0" -source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dc0eb591abc5cd7b05bef6a036c2bb6c66ab6c5e0c5ce94bfe377ab670b1fd7" dependencies = [ "environmental", "evm-core", @@ -3372,8 +3253,9 @@ dependencies = [ [[package]] name = "evm-runtime" -version = "0.39.0" -source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84bbe09b64ae13a29514048c1bb6fda6374ac0b4f6a1f15a443348ab88ef42cd" dependencies = [ "auto_impl", "environmental", @@ -3397,11 +3279,11 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ - "blake2", + "blake2 0.10.6", "fs-err", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -3434,7 +3316,7 @@ checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "async-trait", "fp-storage", @@ -3446,7 +3328,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "async-trait", "fp-consensus", @@ -3462,7 +3344,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "async-trait", "fc-api", @@ -3481,7 +3363,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "fc-db", "fc-storage", @@ -3502,7 +3384,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "ethereum", "ethereum-types", @@ -3542,6 +3424,7 @@ dependencies = [ "sp-consensus", "sp-consensus-aura", "sp-core", + "sp-externalities", "sp-inherents", "sp-io", "sp-runtime", @@ -3556,7 +3439,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "ethereum", "ethereum-types", @@ -3569,7 +3452,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "ethereum", "ethereum-types", @@ -3594,16 +3477,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "ff" version = "0.13.0" @@ -3611,7 +3484,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3718,7 +3591,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "parity-scale-codec", ] @@ -3735,7 +3608,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "hex", "impl-serde", @@ -3754,7 +3627,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "ethereum", "parity-scale-codec", @@ -3766,7 +3639,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "ethereum", "ethereum-types", @@ -3779,11 +3652,11 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "evm", "frame-support", - "num_enum 0.6.1", + "num_enum", "parity-scale-codec", "scale-info", "serde", @@ -3795,7 +3668,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "ethereum", "ethereum-types", @@ -3812,7 +3685,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "frame-support", "parity-scale-codec", @@ -3824,7 +3697,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "parity-scale-codec", "serde", @@ -3839,7 +3712,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-support", "frame-support-procedural", @@ -3864,10 +3737,10 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "Inflector", - "array-bytes", + "array-bytes 6.1.0", "chrono", "clap", "comfy-table", @@ -3912,7 +3785,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-support", "frame-system", @@ -3942,9 +3815,10 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "aquamarine", + "array-bytes 6.1.0", "bitflags 1.3.2", "docify", "environmental", @@ -3982,7 +3856,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "Inflector", "cfg-expr", @@ -3994,37 +3868,39 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.39", + "sp-core-hashing", + "syn 2.0.48", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "cfg-if", + "docify", "frame-support", "log", "parity-scale-codec", @@ -4041,7 +3917,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4056,7 +3932,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "parity-scale-codec", "sp-api", @@ -4065,7 +3941,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-support", "parity-scale-codec", @@ -4090,16 +3966,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fs4" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" -dependencies = [ - "rustix 0.38.13", - "windows-sys 0.48.0", -] - [[package]] name = "fs4" version = "0.7.0" @@ -4118,9 +3984,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -4142,9 +4008,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -4152,15 +4018,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -4170,9 +4036,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -4201,13 +4067,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4227,7 +4093,7 @@ checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", "rustls 0.20.9", - "webpki 0.22.1", + "webpki", ] [[package]] @@ -4242,15 +4108,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-ticker" @@ -4275,9 +4141,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -4353,13 +4219,13 @@ dependencies = [ ] [[package]] -name = "ghash" -version = "0.4.4" +name = "getrandom_or_panic" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.5.3", + "rand 0.8.5", + "rand_core 0.6.4", ] [[package]] @@ -4369,7 +4235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug 0.3.0", - "polyval 0.6.1", + "polyval", ] [[package]] @@ -4453,26 +4319,15 @@ dependencies = [ "web-sys", ] -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff 0.12.1", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -4514,12 +4369,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "hash-db" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" - [[package]] name = "hash-db" version = "0.16.0" @@ -4564,19 +4413,19 @@ dependencies = [ ] [[package]] -name = "heck" -version = "0.4.1" +name = "hashlink" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.0", +] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "heck" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -4784,7 +4633,7 @@ dependencies = [ "errno", "hwlocality-sys", "libc", - "num_enum 0.7.1", + "num_enum", "thiserror", ] @@ -4870,12 +4719,6 @@ dependencies = [ "cc", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.2.3" @@ -5052,32 +4895,13 @@ dependencies = [ "num-traits", ] -[[package]] -name = "interceptor" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" -dependencies = [ - "async-trait", - "bytes", - "log", - "rand 0.8.5", - "rtcp", - "rtp", - "thiserror", - "tokio", - "waitgroup", - "webrtc-srtp", - "webrtc-util", -] - [[package]] name = "io-lifetimes" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi", "libc", "windows-sys 0.48.0", ] @@ -5112,7 +4936,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi", "rustix 0.38.13", "windows-sys 0.48.0", ] @@ -5253,7 +5077,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -5325,8 +5149,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", - "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "ecdsa", + "elliptic-curve", "once_cell", "sha2 0.10.8", ] @@ -5340,6 +5164,12 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "keystream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" + [[package]] name = "kv-log-macro" version = "1.0.7" @@ -5395,6 +5225,12 @@ version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libmimalloc-sys" version = "0.1.35" @@ -5408,9 +5244,9 @@ dependencies = [ [[package]] name = "libp2p" -version = "0.51.3" +version = "0.51.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" +checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" dependencies = [ "bytes", "futures", @@ -5433,7 +5269,6 @@ dependencies = [ "libp2p-swarm 0.42.2", "libp2p-tcp 0.39.0", "libp2p-wasm-ext", - "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux 0.43.1", "multiaddr 0.17.1", @@ -6109,7 +5944,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -6177,7 +6012,7 @@ dependencies = [ "ring 0.16.20", "rustls 0.20.9", "thiserror", - "webpki 0.22.1", + "webpki", "x509-parser 0.14.0", "yasna", ] @@ -6229,37 +6064,6 @@ dependencies = [ "wasm-bindgen-futures", ] -[[package]] -name = "libp2p-webrtc" -version = "0.4.0-alpha.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" -dependencies = [ - "async-trait", - "asynchronous-codec 0.6.2", - "bytes", - "futures", - "futures-timer", - "hex", - "if-watch", - "libp2p-core 0.39.2", - "libp2p-identity 0.1.3", - "libp2p-noise 0.42.2", - "log", - "multihash 0.17.0", - "quick-protobuf", - "quick-protobuf-codec 0.1.0", - "rand 0.8.5", - "rcgen 0.9.3", - "serde", - "stun", - "thiserror", - "tinytemplate", - "tokio", - "tokio-util", - "webrtc", -] - [[package]] name = "libp2p-websocket" version = "0.41.0" @@ -6331,7 +6135,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -6414,6 +6218,18 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +[[package]] +name = "lioness" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" +dependencies = [ + "arrayref", + "blake2 0.8.1", + "chacha", + "keystream", +] + [[package]] name = "local-channel" version = "0.1.3" @@ -6518,50 +6334,50 @@ dependencies = [ [[package]] name = "macro_magic" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "macro_magic_core" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ "const-random", "derive-syn-parse", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "macro_magic_core_macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" +checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "macro_magic_macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -6604,15 +6420,6 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "md-5" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "memchr" version = "2.6.3" @@ -6646,15 +6453,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.8.0" @@ -6679,7 +6477,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ - "hash-db 0.16.0", + "hash-db", ] [[package]] @@ -6748,6 +6546,31 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mixnet" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bitflags 1.3.2", + "blake2 0.10.6", + "c2-chacha", + "curve25519-dalek 4.1.1", + "either", + "hashlink", + "lioness", + "log", + "parking_lot 0.12.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_distr", + "subtle 2.4.1", + "thiserror", + "zeroize", +] + [[package]] name = "mockall" version = "0.11.4" @@ -6858,7 +6681,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro-error", "proc-macro2", "quote", @@ -6928,9 +6751,9 @@ dependencies = [ [[package]] name = "names" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" +checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ "rand 0.8.5", ] @@ -7011,7 +6834,6 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.6.5", ] [[package]] @@ -7125,11 +6947,12 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -7138,38 +6961,17 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi", "libc", ] -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", -] - [[package]] name = "num_enum" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" dependencies = [ - "num_enum_derive 0.7.1", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.39", + "num_enum_derive", ] [[package]] @@ -7178,9 +6980,10 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" dependencies = [ + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -7204,22 +7007,13 @@ dependencies = [ "memchr", ] -[[package]] -name = "oid-registry" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" -dependencies = [ - "asn1-rs 0.3.1", -] - [[package]] name = "oid-registry" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", ] [[package]] @@ -7284,32 +7078,10 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "p256" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - -[[package]] -name = "p384" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-support", "frame-system", @@ -7323,7 +7095,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-benchmarking", "frame-support", @@ -7347,7 +7119,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-benchmarking", "frame-support", @@ -7362,7 +7134,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "fp-evm", "frame-support", @@ -7435,7 +7207,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "ethereum", "ethereum-types", @@ -7458,7 +7230,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "environmental", "evm", @@ -7467,6 +7239,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "hash-db", "hex", "hex-literal", "impl-trait-for-tuples", @@ -7483,19 +7256,18 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime", ] [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "fp-evm", "num", @@ -7504,7 +7276,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "fp-evm", "tiny-keccak", @@ -7513,7 +7285,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/subspace/frontier?rev=1c667eb43c3d087ac66dc9ed0aa44128373f5b0a#1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" +source = "git+https://github.com/subspace/frontier?rev=7627e61d80275a4cf24d06f27491f6c31eadb7b7#7627e61d80275a4cf24d06f27491f6c31eadb7b7" dependencies = [ "fp-evm", "ripemd", @@ -7603,7 +7375,7 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "sp-consensus-subspace", "sp-core", "sp-io", @@ -7639,7 +7411,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-support", "frame-system", @@ -7673,7 +7445,7 @@ dependencies = [ "parity-scale-codec", "rand 0.8.5", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "sp-consensus-slots", "sp-consensus-subspace", @@ -7694,7 +7466,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "docify", "frame-benchmarking", @@ -7710,8 +7482,9 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7740,7 +7513,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-support", "frame-system", @@ -7756,7 +7529,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7772,7 +7545,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7802,7 +7575,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-benchmarking", "frame-support", @@ -7821,7 +7594,7 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ - "blake2", + "blake2 0.10.6", "crc32fast", "fs2", "hex", @@ -7857,7 +7630,7 @@ version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -7950,15 +7723,6 @@ dependencies = [ "crypto-mac 0.11.1", ] -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "pem" version = "1.1.1" @@ -7978,15 +7742,6 @@ dependencies = [ "serde", ] -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", -] - [[package]] name = "percent-encoding" version = "2.3.0" @@ -8024,7 +7779,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -8065,7 +7820,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -8086,24 +7841,14 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "der 0.6.1", - "spki 0.6.0", -] - [[package]] name = "pkcs8" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.8", - "spki 0.7.2", + "der", + "spki", ] [[package]] @@ -8178,25 +7923,13 @@ dependencies = [ [[package]] name = "poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" -dependencies = [ - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.5.1", -] - -[[package]] -name = "polyval" -version = "0.5.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ - "cfg-if", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "universal-hash", ] [[package]] @@ -8208,7 +7941,7 @@ dependencies = [ "cfg-if", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.5.1", + "universal-hash", ] [[package]] @@ -8281,6 +8014,15 @@ dependencies = [ "toml 0.5.11", ] +[[package]] +name = "proc-macro-crate" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b2685dd208a3771337d8d386a89840f0f43cd68be8dae90a5f8c2384effc9cd" +dependencies = [ + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -8313,20 +8055,20 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro-warning" -version = "0.4.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] @@ -8377,7 +8119,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -8527,7 +8269,7 @@ dependencies = [ "thiserror", "tinyvec", "tracing", - "webpki 0.22.1", + "webpki", ] [[package]] @@ -8562,9 +8304,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -8637,6 +8379,16 @@ dependencies = [ "getrandom 0.2.11", ] +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -8681,19 +8433,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "rcgen" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" -dependencies = [ - "pem 1.1.1", - "ring 0.16.20", - "time", - "x509-parser 0.13.2", - "yasna", -] - [[package]] name = "rcgen" version = "0.10.0" @@ -8764,7 +8503,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -8873,17 +8612,6 @@ dependencies = [ "quick-error", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac 0.12.1", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -8891,20 +8619,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle", + "subtle 2.4.1", ] [[package]] name = "ring" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof?rev=8657210#86572101f4210647984ab4efedba6b3fcc890895" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" dependencies = [ "ark-ec", "ark-ff", "ark-poly", "ark-serialize", "ark-std", - "blake2", + "blake2 0.10.6", "common", "fflonk", "merlin 3.0.0", @@ -8990,17 +8718,6 @@ dependencies = [ "sha2 0.10.8", ] -[[package]] -name = "rtcp" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" -dependencies = [ - "bytes", - "thiserror", - "webrtc-util", -] - [[package]] name = "rtnetlink" version = "0.10.1" @@ -9027,20 +8744,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rtp" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" -dependencies = [ - "async-trait", - "bytes", - "rand 0.8.5", - "serde", - "thiserror", - "webrtc-util", -] - [[package]] name = "rust-kzg-blst" version = "0.1.0" @@ -9134,19 +8837,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.1", - "log", - "ring 0.16.20", - "sct 0.6.1", - "webpki 0.21.4", -] - [[package]] name = "rustls" version = "0.20.9" @@ -9155,8 +8845,8 @@ checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring 0.16.20", - "sct 0.7.0", - "webpki 0.22.1", + "sct", + "webpki", ] [[package]] @@ -9168,7 +8858,7 @@ dependencies = [ "log", "ring 0.17.5", "rustls-webpki 0.101.7", - "sct 0.7.0", + "sct", ] [[package]] @@ -9266,7 +8956,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "log", "sp-core", @@ -9277,14 +8967,13 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "futures", "futures-timer", "log", "parity-scale-codec", "sc-block-builder", - "sc-client-api", "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", @@ -9300,24 +8989,28 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "parity-scale-codec", - "sc-client-api", "sp-api", "sp-block-builder", "sp-blockchain", "sp-core", "sp-inherents", "sp-runtime", + "sp-trie", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ + "array-bytes 6.1.0", + "docify", + "log", "memmap2 0.5.10", + "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", "sc-executor", @@ -9327,6 +9020,8 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core", + "sp-genesis-builder", + "sp-io", "sp-runtime", "sp-state-machine", ] @@ -9334,25 +9029,26 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", - "atomic", + "array-bytes 6.1.0", + "bip39", "chrono", "clap", "fdlimit", "futures", + "itertools", "libp2p-identity 0.1.3", "log", "names", @@ -9363,6 +9059,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-keystore", + "sc-mixnet", "sc-network", "sc-service", "sc-telemetry", @@ -9378,14 +9075,13 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror", - "tiny-bip39", "tokio", ] [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "fnv", "futures", @@ -9405,15 +9101,16 @@ dependencies = [ "sp-state-machine", "sp-statement-store", "sp-storage", + "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "hash-db 0.16.0", + "hash-db", "kvdb", "kvdb-memorydb", "linked-hash-map", @@ -9436,7 +9133,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-lock 2.8.0", "async-trait", @@ -9463,7 +9160,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "futures", @@ -9492,7 +9189,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "futures", @@ -9531,7 +9228,7 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool-api", "sc-utils", - "schnorrkel", + "schnorrkel 0.9.1", "sp-api", "sp-block-builder", "sp-blockchain", @@ -9584,7 +9281,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -9606,7 +9303,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9618,12 +9315,13 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "anyhow", "cfg-if", "libc", "log", + "parking_lot 0.12.1", "rustix 0.36.15", "sc-allocator", "sc-executor-common", @@ -9635,7 +9333,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "ansi_term", "futures", @@ -9644,6 +9342,7 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", + "sc-network-sync", "sp-blockchain", "sp-runtime", ] @@ -9651,9 +9350,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -9662,23 +9361,51 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-mixnet" +version = "0.1.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "bytes", + "futures", + "futures-timer", + "libp2p-identity 0.1.3", + "log", + "mixnet", + "multiaddr 0.17.1", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-network", + "sc-transaction-pool-api", + "sp-api", + "sp-consensus", + "sp-core", + "sp-keystore", + "sp-mixnet", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "async-trait", "asynchronous-codec 0.6.2", - "atomic", "bytes", "either", "fnv", "futures", "futures-timer", "ip_network", - "libp2p 0.51.3", + "libp2p 0.51.4", "linked_hash_set", "log", "mockall", @@ -9699,6 +9426,8 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", + "tokio-stream", "unsigned-varint 0.7.2", "wasm-timer", "zeroize", @@ -9707,7 +9436,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-channel", "cid", @@ -9727,7 +9456,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -9744,15 +9473,16 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "ahash 0.8.3", "futures", "futures-timer", - "libp2p 0.51.3", + "libp2p 0.51.4", "log", "sc-network", "sc-network-common", + "sc-network-sync", "schnellru", "sp-runtime", "substrate-prometheus-endpoint", @@ -9762,9 +9492,9 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "futures", "libp2p-identity 0.1.3", @@ -9783,16 +9513,15 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "async-trait", - "atomic", "fork-tree", "futures", "futures-timer", - "libp2p 0.51.3", + "libp2p 0.51.4", "log", "mockall", "parity-scale-codec", @@ -9813,20 +9542,23 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", + "tokio-stream", ] [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "futures", - "libp2p 0.51.3", + "libp2p 0.51.4", "log", "parity-scale-codec", "sc-network", "sc-network-common", + "sc-network-sync", "sc-utils", "sp-consensus", "sp-runtime", @@ -9836,16 +9568,16 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "bytes", "fnv", "futures", "futures-timer", "hyper", "hyper-rustls", - "libp2p 0.51.3", + "libp2p 0.51.4", "log", "num_cpus", "once_cell", @@ -9898,7 +9630,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9907,7 +9639,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "futures", "jsonrpsee", @@ -9917,6 +9649,7 @@ dependencies = [ "sc-block-builder", "sc-chain-spec", "sc-client-api", + "sc-mixnet", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", @@ -9938,11 +9671,12 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "jsonrpsee", "parity-scale-codec", "sc-chain-spec", + "sc-mixnet", "sc-transaction-pool-api", "scale-info", "serde", @@ -9957,7 +9691,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "http", "jsonrpsee", @@ -9972,9 +9706,9 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "futures", "futures-util", "hex", @@ -9990,6 +9724,7 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-core", + "sp-rpc", "sp-runtime", "sp-version", "thiserror", @@ -10000,7 +9735,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "directories", @@ -10013,7 +9748,6 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -10064,7 +9798,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "log", "parity-scale-codec", @@ -10075,12 +9809,11 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "clap", - "fs4 0.6.6", + "fs4", "log", - "sc-client-db", "sp-core", "thiserror", "tokio", @@ -10125,8 +9858,9 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ + "derive_more", "futures", "libc", "log", @@ -10144,11 +9878,11 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "chrono", "futures", - "libp2p 0.51.3", + "libp2p 0.51.4", "log", "parking_lot 0.12.1", "pin-project", @@ -10163,14 +9897,15 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "ansi_term", - "atty", "chrono", + "is-terminal", "lazy_static", "libc", "log", + "parity-scale-codec", "parking_lot 0.12.1", "regex", "rustc-hash", @@ -10192,18 +9927,18 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "futures", @@ -10229,7 +9964,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "futures", @@ -10245,7 +9980,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-channel", "futures", @@ -10259,9 +9994,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ "bitvec", "cfg-if", @@ -10273,11 +10008,11 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -10317,7 +10052,26 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "aead", + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.1", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.8", + "subtle 2.4.1", "zeroize", ] @@ -10333,16 +10087,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "sct" version = "0.7.0" @@ -10353,60 +10097,34 @@ dependencies = [ "untrusted 0.7.1", ] -[[package]] -name = "sdp" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" -dependencies = [ - "rand 0.8.5", - "substring", - "thiserror", - "url", -] - -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array 0.14.7", - "pkcs8 0.9.0", - "subtle", - "zeroize", -] - [[package]] name = "sec1" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct 0.2.0", - "der 0.7.8", + "base16ct", + "der", "generic-array 0.14.7", - "pkcs8 0.10.2", - "subtle", + "pkcs8", + "subtle 2.4.1", "zeroize", ] [[package]] name = "secp256k1" -version = "0.24.3" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" dependencies = [ "cc", ] @@ -10481,9 +10199,9 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] @@ -10497,22 +10215,31 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_bytes" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.106" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -10521,9 +10248,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -10638,16 +10365,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - [[package]] name = "signature" version = "2.1.0" @@ -10671,6 +10388,11 @@ dependencies = [ "wide", ] +[[package]] +name = "simple-mermaid" +version = "0.1.0" +source = "git+https://github.com/kianenigma/simple-mermaid.git?rev=e48b187bcfd5cc75111acd9d241f1bd36604344b#e48b187bcfd5cc75111acd9d241f1bd36604344b" + [[package]] name = "siphasher" version = "0.3.11" @@ -10727,15 +10449,15 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" dependencies = [ - "aes-gcm 0.10.2", - "blake2", + "aes-gcm", + "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.1.1", "rand_core 0.6.4", "ring 0.17.5", "rustc_version", "sha2 0.10.8", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -10778,9 +10500,9 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "hash-db 0.16.0", + "hash-db", "log", "parity-scale-codec", "scale-info", @@ -10799,21 +10521,21 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "Inflector", - "blake2", + "blake2 0.10.6", "expander", - "proc-macro-crate", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sp-application-crypto" version = "23.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "parity-scale-codec", "scale-info", @@ -10826,7 +10548,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "integer-sqrt", "num-traits", @@ -10837,10 +10559,28 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-ark-bls12-381" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-bls12-381-ext", + "sp-crypto-ec-utils", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils", +] + [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "sp-api", "sp-inherents", @@ -10862,7 +10602,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "futures", "log", @@ -10880,7 +10620,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "futures", @@ -10895,7 +10635,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "parity-scale-codec", @@ -10912,7 +10652,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "parity-scale-codec", @@ -10931,7 +10671,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "finality-grandpa", "log", @@ -10949,7 +10689,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "parity-scale-codec", "scale-info", @@ -10966,7 +10706,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "sp-api", "sp-application-crypto", "sp-consensus-slots", @@ -10987,32 +10727,32 @@ dependencies = [ [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "bandersnatch_vrfs", + "bip39", "bitflags 1.3.2", - "blake2", + "blake2 0.10.6", "bounded-collections", "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", "futures", - "hash-db 0.16.0", + "hash-db", "hash256-std-hasher", "impl-serde", - "lazy_static", + "itertools", "libsecp256k1", "log", - "merlin 2.0.1", + "merlin 3.0.0", "parity-scale-codec", "parking_lot 0.12.1", "paste", "primitive-types", "rand 0.8.5", - "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", @@ -11025,15 +10765,15 @@ dependencies = [ "ss58-registry", "substrate-bip39", "thiserror", - "tiny-bip39", "tracing", + "w3f-bls", "zeroize", ] [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "blake2b_simd", "byteorder", @@ -11046,17 +10786,38 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.39", + "syn 2.0.48", +] + +[[package]] +name = "sp-crypto-ec-utils" +version = "0.4.1" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface", + "sp-std", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11065,11 +10826,11 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -11084,10 +10845,10 @@ dependencies = [ name = "sp-domains" version = "0.1.0" dependencies = [ - "blake2", + "blake2 0.10.6", "domain-runtime-primitives", "frame-support", - "hash-db 0.16.0", + "hash-db", "hexlit", "memory-db", "num-traits", @@ -11105,6 +10866,7 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-trie", + "sp-version", "sp-weights", "subspace-core-primitives", "subspace-runtime-primitives", @@ -11125,7 +10887,7 @@ dependencies = [ "frame-support", "frame-system", "futures", - "hash-db 0.16.0", + "hash-db", "libsecp256k1", "log", "pallet-balances", @@ -11175,7 +10937,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "environmental", "parity-scale-codec", @@ -11186,7 +10948,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.1.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "serde_json", "sp-api", @@ -11197,7 +10959,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11211,7 +10973,7 @@ dependencies = [ [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "bytes", "ed25519-dalek", @@ -11235,9 +10997,8 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "lazy_static", "sp-core", "sp-runtime", "strum", @@ -11246,7 +11007,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -11258,7 +11019,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "thiserror", "zstd 0.12.4", @@ -11269,7 +11030,7 @@ name = "sp-messenger" version = "0.1.0" dependencies = [ "frame-support", - "hash-db 0.16.0", + "hash-db", "log", "parity-scale-codec", "scale-info", @@ -11285,7 +11046,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -11293,6 +11054,18 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-mixnet" +version = "0.1.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-std", +] + [[package]] name = "sp-objects" version = "0.1.0" @@ -11306,7 +11079,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "sp-api", "sp-core", @@ -11316,7 +11089,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "backtrace", "lazy_static", @@ -11326,7 +11099,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "rustc-hash", "serde", @@ -11336,8 +11109,9 @@ dependencies = [ [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ + "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", @@ -11347,6 +11121,7 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", + "simple-mermaid", "sp-application-crypto", "sp-arithmetic", "sp-core", @@ -11358,7 +11133,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11376,19 +11151,20 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "Inflector", - "proc-macro-crate", + "expander", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "parity-scale-codec", "scale-info", @@ -11403,7 +11179,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -11417,9 +11193,9 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "hash-db 0.16.0", + "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11438,9 +11214,9 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "aes-gcm 0.10.2", + "aes-gcm", "curve25519-dalek 4.1.1", "ed25519-dalek", "hkdf", @@ -11462,12 +11238,12 @@ dependencies = [ [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11480,7 +11256,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "parity-scale-codec", @@ -11493,7 +11269,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "parity-scale-codec", "sp-std", @@ -11505,7 +11281,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "sp-api", "sp-runtime", @@ -11514,7 +11290,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "async-trait", "parity-scale-codec", @@ -11529,19 +11305,20 @@ dependencies = [ [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "ahash 0.8.3", - "hash-db 0.16.0", - "hashbrown 0.13.2", + "hash-db", "lazy_static", "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", + "rand 0.8.5", "scale-info", "schnellru", "sp-core", + "sp-externalities", "sp-std", "thiserror", "tracing", @@ -11552,7 +11329,7 @@ dependencies = [ [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11569,18 +11346,18 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11593,14 +11370,14 @@ dependencies = [ [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ + "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", "sp-arithmetic", - "sp-core", "sp-debug-derive", "sp-std", ] @@ -11620,16 +11397,6 @@ dependencies = [ "lock_api", ] -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.1", -] - [[package]] name = "spki" version = "0.7.2" @@ -11637,7 +11404,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.8", + "der", ] [[package]] @@ -11725,34 +11492,15 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.39", -] - -[[package]] -name = "stun" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" -dependencies = [ - "base64 0.13.1", - "crc", - "lazy_static", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "subtle", - "thiserror", - "tokio", - "url", - "webrtc-util", +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.48", ] [[package]] @@ -11823,7 +11571,7 @@ dependencies = [ "async-trait", "atomic", "base58", - "blake2", + "blake2 0.10.6", "blake3", "bytesize", "clap", @@ -11831,7 +11579,7 @@ dependencies = [ "derive_more", "event-listener-primitives", "fdlimit", - "fs4 0.7.0", + "fs4", "futures", "hex", "hwlocality", @@ -11846,7 +11594,7 @@ dependencies = [ "prometheus-client 0.22.0", "rand 0.8.5", "rayon", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "serde_json", "ss58-registry", @@ -11888,7 +11636,7 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "rayon", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "static_assertions", "subspace-archiving", @@ -12101,7 +11849,7 @@ dependencies = [ name = "subspace-proof-of-time" version = "0.1.0" dependencies = [ - "aes 0.8.3", + "aes", "core_affinity", "criterion", "rand 0.8.5", @@ -12193,7 +11941,6 @@ name = "subspace-service" version = "0.1.0" dependencies = [ "async-trait", - "atomic", "cross-domain-message-gossip", "domain-runtime-primitives", "frame-system-rpc-runtime-api", @@ -12227,7 +11974,7 @@ dependencies = [ "sc-tracing", "sc-transaction-pool", "sc-transaction-pool-api", - "schnorrkel", + "schnorrkel 0.9.1", "sp-api", "sp-block-builder", "sp-blockchain", @@ -12271,7 +12018,7 @@ dependencies = [ "sc-consensus-subspace", "sc-executor", "sc-service", - "schnorrkel", + "schnorrkel 0.9.1", "sp-api", "sp-consensus-subspace", "sp-core", @@ -12389,7 +12136,7 @@ name = "subspace-verification" version = "0.1.0" dependencies = [ "parity-scale-codec", - "schnorrkel", + "schnorrkel 0.9.1", "sp-arithmetic", "subspace-archiving", "subspace-core-primitives", @@ -12404,8 +12151,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" dependencies = [ "hmac 0.11.0", - "pbkdf2 0.8.0", - "schnorrkel", + "pbkdf2", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] @@ -12413,12 +12160,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12437,7 +12184,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "hyper", "log", @@ -12449,9 +12196,9 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-trait", "futures", "parity-scale-codec", @@ -12475,9 +12222,9 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "frame-executive", "frame-support", "frame-system", @@ -12489,8 +12236,6 @@ dependencies = [ "parity-scale-codec", "sc-service", "scale-info", - "serde", - "serde_json", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -12518,7 +12263,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "futures", "sc-block-builder", @@ -12536,29 +12281,26 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/subspace/polkadot-sdk?rev=0831dfc3c54b10ab46e82acf98603b4af1a47bd5#0831dfc3c54b10ab46e82acf98603b4af1a47bd5" +source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ - "ansi_term", "build-helper", "cargo_metadata", + "console", "filetime", "parity-wasm", "sp-maybe-compressed-blob", "strum", "tempfile", - "toml 0.7.8", + "toml 0.8.8", "walkdir", "wasm-opt", ] [[package]] -name = "substring" -version = "1.4.5" +name = "subtle" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" -dependencies = [ - "autocfg", -] +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" @@ -12589,9 +12331,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -12676,6 +12418,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix 0.38.13", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.1" @@ -12699,7 +12451,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -12755,25 +12507,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-bip39" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" -dependencies = [ - "anyhow", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", - "rustc-hash", - "sha2 0.10.8", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -12835,7 +12568,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -12886,9 +12619,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", @@ -12898,18 +12631,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ "indexmap 2.0.0", "serde", @@ -12980,14 +12713,14 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -13071,7 +12804,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" dependencies = [ - "hash-db 0.16.0", + "hash-db", "hashbrown 0.13.2", "log", "rustc-hex", @@ -13084,17 +12817,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ - "hash-db 0.16.0", -] - -[[package]] -name = "triehash" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" -dependencies = [ - "hash-db 0.15.2", - "rlp", + "hash-db", ] [[package]] @@ -13155,25 +12878,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" -[[package]] -name = "turn" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" -dependencies = [ - "async-trait", - "base64 0.13.1", - "futures", - "log", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "stun", - "thiserror", - "tokio", - "webrtc-util", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -13182,7 +12886,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] @@ -13253,16 +12957,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.7", - "subtle", -] - [[package]] name = "universal-hash" version = "0.5.1" @@ -13270,7 +12964,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -13324,15 +13018,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" -dependencies = [ - "getrandom 0.2.11", -] - [[package]] name = "valuable" version = "0.1.0" @@ -13364,12 +13049,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "waitgroup" -version = "0.1.2" +name = "w3f-bls" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" dependencies = [ - "atomic-waker", + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", ] [[package]] @@ -13430,7 +13130,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", "wasm-bindgen-shared", ] @@ -13464,7 +13164,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -13486,9 +13186,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d005a95f934878a1fb446a816d51c3601a0120ff929005ba3bab3c749cfd1c7" +checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" dependencies = [ "anyhow", "libc", @@ -13502,9 +13202,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d04e240598162810fad3b2e96fa0dec6dba1eb65a03f3bd99a9248ab8b56caa" +checksum = "8c57b28207aa724318fcec6575fe74803c23f6f266fce10cbc9f3f116762f12e" dependencies = [ "anyhow", "cxx", @@ -13514,9 +13214,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efd2aaca519d64098c4faefc8b7433a97ed511caf4c9e516384eb6aef1ff4f9" +checksum = "8a1cce564dc768dacbdb718fc29df2dba80bd21cb47d8f77ae7e3d95ceb98cbe" dependencies = [ "anyhow", "cc", @@ -13754,16 +13454,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "webpki" version = "0.22.1" @@ -13780,7 +13470,7 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.1", + "webpki", ] [[package]] @@ -13798,214 +13488,6 @@ version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" -[[package]] -name = "webrtc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "hex", - "interceptor", - "lazy_static", - "log", - "rand 0.8.5", - "rcgen 0.9.3", - "regex", - "ring 0.16.20", - "rtcp", - "rtp", - "rustls 0.19.1", - "sdp", - "serde", - "serde_json", - "sha2 0.10.8", - "stun", - "thiserror", - "time", - "tokio", - "turn", - "url", - "waitgroup", - "webrtc-data", - "webrtc-dtls", - "webrtc-ice", - "webrtc-mdns", - "webrtc-media", - "webrtc-sctp", - "webrtc-srtp", - "webrtc-util", -] - -[[package]] -name = "webrtc-data" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" -dependencies = [ - "bytes", - "derive_builder", - "log", - "thiserror", - "tokio", - "webrtc-sctp", - "webrtc-util", -] - -[[package]] -name = "webrtc-dtls" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" -dependencies = [ - "aes 0.6.0", - "aes-gcm 0.10.2", - "async-trait", - "bincode", - "block-modes", - "byteorder", - "ccm", - "curve25519-dalek 3.2.0", - "der-parser 8.2.0", - "elliptic-curve 0.12.3", - "hkdf", - "hmac 0.12.1", - "log", - "p256", - "p384", - "rand 0.8.5", - "rand_core 0.6.4", - "rcgen 0.10.0", - "ring 0.16.20", - "rustls 0.19.1", - "sec1 0.3.0", - "serde", - "sha1", - "sha2 0.10.8", - "signature 1.6.4", - "subtle", - "thiserror", - "tokio", - "webpki 0.21.4", - "webrtc-util", - "x25519-dalek 2.0.0", - "x509-parser 0.13.2", -] - -[[package]] -name = "webrtc-ice" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" -dependencies = [ - "arc-swap", - "async-trait", - "crc", - "log", - "rand 0.8.5", - "serde", - "serde_json", - "stun", - "thiserror", - "tokio", - "turn", - "url", - "uuid", - "waitgroup", - "webrtc-mdns", - "webrtc-util", -] - -[[package]] -name = "webrtc-mdns" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" -dependencies = [ - "log", - "socket2 0.4.9", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-media" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" -dependencies = [ - "byteorder", - "bytes", - "rand 0.8.5", - "rtp", - "thiserror", -] - -[[package]] -name = "webrtc-sctp" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "crc", - "log", - "rand 0.8.5", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-srtp" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "aes-gcm 0.9.4", - "async-trait", - "byteorder", - "bytes", - "ctr 0.8.0", - "hmac 0.11.0", - "log", - "rtcp", - "rtp", - "sha-1", - "subtle", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-util" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" -dependencies = [ - "async-trait", - "bitflags 1.3.2", - "bytes", - "cc", - "ipnet", - "lazy_static", - "libc", - "log", - "nix", - "rand 0.8.5", - "thiserror", - "tokio", - "winapi", -] - [[package]] name = "which" version = "4.4.2" @@ -14342,38 +13824,19 @@ dependencies = [ "zeroize", ] -[[package]] -name = "x509-parser" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" -dependencies = [ - "asn1-rs 0.3.1", - "base64 0.13.1", - "data-encoding", - "der-parser 7.0.0", - "lazy_static", - "nom", - "oid-registry 0.4.0", - "ring 0.16.20", - "rusticata-macros", - "thiserror", - "time", -] - [[package]] name = "x509-parser" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "base64 0.13.1", "data-encoding", - "der-parser 8.2.0", + "der-parser", "lazy_static", "nom", - "oid-registry 0.6.1", + "oid-registry", "rusticata-macros", "thiserror", "time", @@ -14385,12 +13848,12 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "data-encoding", - "der-parser 8.2.0", + "der-parser", "lazy_static", "nom", - "oid-registry 0.6.1", + "oid-registry", "rusticata-macros", "thiserror", "time", @@ -14475,7 +13938,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e968f6ea05..f2cae873be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,42 +92,43 @@ lto = "fat" # Reason: We need to patch substrate dependency of frontier to our fork # TODO: Remove if/when we are using upstream substrate instead of fork [patch."https://github.com/paritytech/polkadot-sdk.git"] -frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-block-builder = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-client-db = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-application-crypto = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-database = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime-interface = { version = "17.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-storage = { version = "13.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-trie = { version = "22.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -substrate-prometheus-endpoint = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-block-builder = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-client-db = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-application-crypto = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-crypto-ec-utils = { version = "0.4.1", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-database = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime-interface = { version = "17.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-storage = { version = "13.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-trie = { version = "22.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +substrate-prometheus-endpoint = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } diff --git a/crates/pallet-domains/Cargo.toml b/crates/pallet-domains/Cargo.toml index 101cbe8c1a..47d27c2354 100644 --- a/crates/pallet-domains/Cargo.toml +++ b/crates/pallet-domains/Cargo.toml @@ -14,30 +14,30 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", default-features = false, path = "../sp-domains-fraud-proof" } -sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", features = ["serde"] } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", features = ["serde"] } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } [dev-dependencies] domain-pallet-executive = { version = "0.1.0", default-features = false, path = "../../domains/pallets/executive" } -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-block-fees = { version = "0.1.0", default-features = false, path = "../../domains/pallets/block-fees" } -sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-trie = { version = "22.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-trie = { version = "22.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/crates/pallet-domains/src/lib.rs b/crates/pallet-domains/src/lib.rs index ff9efe818a..58d5d94169 100644 --- a/crates/pallet-domains/src/lib.rs +++ b/crates/pallet-domains/src/lib.rs @@ -16,9 +16,7 @@ //! Pallet Domains #![cfg_attr(not(feature = "std"), no_std)] -#![feature(array_windows)] -#![feature(associated_type_bounds)] -#![feature(let_chains)] +#![feature(array_windows, associated_type_bounds, let_chains, variant_count)] #[cfg(feature = "runtime-benchmarks")] mod benchmarking; diff --git a/crates/pallet-domains/src/runtime_registry.rs b/crates/pallet-domains/src/runtime_registry.rs index 4b8582d5e8..240efbb0f4 100644 --- a/crates/pallet-domains/src/runtime_registry.rs +++ b/crates/pallet-domains/src/runtime_registry.rs @@ -268,6 +268,7 @@ mod tests { apis: Default::default(), transaction_version: 1, state_version: 0, + extrinsic_state_version: 0, }; let read_runtime_version = ReadRuntimeVersion(version.encode()); @@ -435,6 +436,7 @@ mod tests { apis: Default::default(), transaction_version: 1, state_version: 0, + extrinsic_state_version: 0, }; ext.execute_with(|| { diff --git a/crates/pallet-domains/src/tests.rs b/crates/pallet-domains/src/tests.rs index 9591d17865..02b0016256 100644 --- a/crates/pallet-domains/src/tests.rs +++ b/crates/pallet-domains/src/tests.rs @@ -8,10 +8,11 @@ use crate::{ OperatorStatus, Operators, ReceiptHashFor, }; use codec::{Decode, Encode, MaxEncodedLen}; +use core::mem; use domain_runtime_primitives::opaque::Header as DomainHeader; use domain_runtime_primitives::BlockNumber as DomainBlockNumber; use frame_support::dispatch::{DispatchInfo, RawOrigin}; -use frame_support::traits::{ConstU16, ConstU32, ConstU64, Currency, Hooks}; +use frame_support::traits::{ConstU16, ConstU32, ConstU64, Currency, Hooks, VariantCount}; use frame_support::weights::constants::RocksDbWeight; use frame_support::weights::{IdentityFee, Weight}; use frame_support::{assert_err, assert_ok, parameter_types, PalletId}; @@ -75,11 +76,6 @@ frame_support::construct_runtime!( type BlockNumber = u64; type Hash = H256; type AccountId = u64; - -parameter_types! { - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -87,6 +83,7 @@ impl frame_system::Config for Test { type DbWeight = RocksDbWeight; type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Hash = Hash; type Hashing = BlakeTwo256; @@ -104,7 +101,6 @@ impl frame_system::Config for Test { type SS58Prefix = ConstU16<42>; type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } parameter_types! { @@ -159,12 +155,17 @@ impl pallet_domains::HoldIdentifier for HoldIdentifier { } } +impl VariantCount for HoldIdentifier { + const VARIANT_COUNT: u32 = mem::variant_count::() as u32; +} + parameter_types! { pub const MaxHolds: u32 = 10; pub const ExistentialDeposit: Balance = 1; } impl pallet_balances::Config for Test { + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -391,6 +392,7 @@ pub(crate) fn new_test_ext_with_extensions() -> sp_io::TestExternalities { apis: Default::default(), transaction_version: 1, state_version: 0, + extrinsic_state_version: 0, }; let mut ext = new_test_ext(); diff --git a/crates/pallet-feeds/Cargo.toml b/crates/pallet-feeds/Cargo.toml index abb55e11b9..7685e1459a 100644 --- a/crates/pallet-feeds/Cargo.toml +++ b/crates/pallet-feeds/Cargo.toml @@ -14,16 +14,16 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } [dev-dependencies] -sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/crates/pallet-feeds/src/mock.rs b/crates/pallet-feeds/src/mock.rs index c84b1ab640..9d259cc95a 100644 --- a/crates/pallet-feeds/src/mock.rs +++ b/crates/pallet-feeds/src/mock.rs @@ -4,7 +4,6 @@ use codec::{Compact, CompactLen, Decode, Encode}; use frame_support::parameter_types; use frame_support::traits::{ConstU16, ConstU32, ConstU64}; use scale_info::TypeInfo; -use sp_core::storage::StateVersion; use sp_core::H256; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use sp_runtime::BuildStorage; @@ -19,10 +18,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -30,6 +25,7 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; @@ -47,7 +43,6 @@ impl frame_system::Config for Test { type SS58Prefix = ConstU16<42>; type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } parameter_types! { diff --git a/crates/pallet-grandpa-finality-verifier/Cargo.toml b/crates/pallet-grandpa-finality-verifier/Cargo.toml index e45ea3ade2..ba0846269c 100644 --- a/crates/pallet-grandpa-finality-verifier/Cargo.toml +++ b/crates/pallet-grandpa-finality-verifier/Cargo.toml @@ -13,23 +13,23 @@ readme = "README.md" codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false } finality-grandpa = { version = "0.16.1", default-features = false } log = { version = "0.4.20", default-features = false } -num-traits = { version = "0.2.16", default-features = false } +num-traits = { version = "0.2.17", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.183", optional = true } +serde = { version = "1.0.195", optional = true } # Substrate Dependencies -frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sp-consensus-grandpa = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sp-std = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } +frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sp-std = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } [dev-dependencies] ed25519-dalek = { version = "2.1.0", default-features = false } -sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-application-crypto = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-application-crypto = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/crates/pallet-grandpa-finality-verifier/src/tests/mock.rs b/crates/pallet-grandpa-finality-verifier/src/tests/mock.rs index 29ccefc422..daae291fa6 100644 --- a/crates/pallet-grandpa-finality-verifier/src/tests/mock.rs +++ b/crates/pallet-grandpa-finality-verifier/src/tests/mock.rs @@ -1,6 +1,5 @@ use frame_support::weights::Weight; use frame_support::{construct_runtime, parameter_types}; -use sp_core::storage::StateVersion; use sp_runtime::testing::H256; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use sp_runtime::Perbill; @@ -23,13 +22,13 @@ parameter_types! { pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; } impl frame_system::Config for TestRuntime { type RuntimeOrigin = RuntimeOrigin; type Nonce = u64; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; @@ -50,7 +49,6 @@ impl frame_system::Config for TestRuntime { type SS58Prefix = (); type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } impl grandpa::Config for TestRuntime { diff --git a/crates/pallet-object-store/Cargo.toml b/crates/pallet-object-store/Cargo.toml index 430135cf26..bceb2a2635 100644 --- a/crates/pallet-object-store/Cargo.toml +++ b/crates/pallet-object-store/Cargo.toml @@ -14,18 +14,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } hex = { version = "0.4.3", default-features = false, features = ["alloc"] } log = { version = "0.4.20", default-features = false } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } [dev-dependencies] -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/crates/pallet-object-store/src/mock.rs b/crates/pallet-object-store/src/mock.rs index 05c515e308..1d591d2764 100644 --- a/crates/pallet-object-store/src/mock.rs +++ b/crates/pallet-object-store/src/mock.rs @@ -1,6 +1,5 @@ use frame_support::parameter_types; use frame_support::traits::{ConstU16, ConstU32, ConstU64}; -use sp_core::storage::StateVersion; use sp_core::H256; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use sp_runtime::BuildStorage; @@ -14,10 +13,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -25,6 +20,7 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; @@ -42,7 +38,6 @@ impl frame_system::Config for Test { type SS58Prefix = ConstU16<42>; type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } parameter_types! { diff --git a/crates/pallet-offences-subspace/Cargo.toml b/crates/pallet-offences-subspace/Cargo.toml index 8e621d9e52..73da917d77 100644 --- a/crates/pallet-offences-subspace/Cargo.toml +++ b/crates/pallet-offences-subspace/Cargo.toml @@ -14,16 +14,16 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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 = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [dev-dependencies] -sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } schnorrkel = "0.9.1" [features] diff --git a/crates/pallet-offences-subspace/src/mock.rs b/crates/pallet-offences-subspace/src/mock.rs index 78b8b0f4b9..0f7b10106d 100644 --- a/crates/pallet-offences-subspace/src/mock.rs +++ b/crates/pallet-offences-subspace/src/mock.rs @@ -21,13 +21,11 @@ use crate as pallet_offences_subspace; use crate::Config; use codec::Encode; -use frame_support::parameter_types; use frame_support::traits::{ConstU32, ConstU64}; use frame_support::weights::constants::RocksDbWeight; use frame_support::weights::Weight; use sp_consensus_subspace::offence::{self, Kind, OffenceDetails}; use sp_consensus_subspace::FarmerPublicKey; -use sp_core::storage::StateVersion; use sp_core::H256; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use sp_runtime::{BuildStorage, Perbill}; @@ -61,10 +59,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; -} - impl frame_system::Config for Runtime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -73,6 +67,7 @@ impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type Nonce = u64; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; @@ -89,7 +84,6 @@ impl frame_system::Config for Runtime { type SS58Prefix = (); type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } impl Config for Runtime { diff --git a/crates/pallet-rewards/Cargo.toml b/crates/pallet-rewards/Cargo.toml index 431d1d7e67..19305e2ff5 100644 --- a/crates/pallet-rewards/Cargo.toml +++ b/crates/pallet-rewards/Cargo.toml @@ -19,8 +19,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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" } diff --git a/crates/pallet-runtime-configs/Cargo.toml b/crates/pallet-runtime-configs/Cargo.toml index 98cd841a32..b2bb9e6176 100644 --- a/crates/pallet-runtime-configs/Cargo.toml +++ b/crates/pallet-runtime-configs/Cargo.toml @@ -17,13 +17,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } [features] default = ["std"] diff --git a/crates/pallet-subspace/Cargo.toml b/crates/pallet-subspace/Cargo.toml index 9e4985146b..9e24a571aa 100644 --- a/crates/pallet-subspace/Cargo.toml +++ b/crates/pallet-subspace/Cargo.toml @@ -14,18 +14,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } log = { version = "0.4.20", default-features = false } 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.183", optional = true, default-features = false, features = ["derive"] } +serde = { version = "1.0.195", 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } subspace-verification = { version = "0.1.0", path = "../subspace-verification", default-features = false } @@ -33,12 +33,12 @@ subspace-verification = { version = "0.1.0", path = "../subspace-verification", [dev-dependencies] env_logger = "0.10.0" futures = "0.3.29" -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-offences-subspace = { version = "0.1.0", path = "../pallet-offences-subspace" } rand = { version = "0.8.5", features = ["min_const_gen"] } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-weights = { version = "20.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-weights = { version = "20.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/mock.rs b/crates/pallet-subspace/src/mock.rs index a443d25c39..2e0714d1d9 100644 --- a/crates/pallet-subspace/src/mock.rs +++ b/crates/pallet-subspace/src/mock.rs @@ -32,7 +32,6 @@ use sp_consensus_subspace::{ FarmerSignature, KzgExtension, PosExtension, PotExtension, SignedVote, Vote, }; use sp_core::crypto::UncheckedFrom; -use sp_core::storage::StateVersion; use sp_core::H256; use sp_io::TestExternalities; use sp_runtime::testing::{Digest, DigestItem, Header, TestXt}; @@ -100,7 +99,6 @@ parameter_types! { pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(16); pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, 0)); - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; } impl frame_system::Config for Test { @@ -111,6 +109,7 @@ impl frame_system::Config for Test { type RuntimeOrigin = RuntimeOrigin; type Nonce = u64; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Hash = H256; type Version = (); type Hashing = sp_runtime::traits::BlakeTwo256; @@ -127,7 +126,6 @@ impl frame_system::Config for Test { type SS58Prefix = (); type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } impl frame_system::offchain::SendTransactionTypes for Test @@ -139,6 +137,7 @@ where } impl pallet_balances::Config for Test { + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; diff --git a/crates/pallet-transaction-fees/Cargo.toml b/crates/pallet-transaction-fees/Cargo.toml index b7853f5f0e..588519c6d2 100644 --- a/crates/pallet-transaction-fees/Cargo.toml +++ b/crates/pallet-transaction-fees/Cargo.toml @@ -19,8 +19,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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" } diff --git a/crates/sc-consensus-subspace-rpc/Cargo.toml b/crates/sc-consensus-subspace-rpc/Cargo.toml index e9646e6318..e7e02d103d 100644 --- a/crates/sc-consensus-subspace-rpc/Cargo.toml +++ b/crates/sc-consensus-subspace-rpc/Cargo.toml @@ -20,17 +20,17 @@ jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } lru = "0.11.0" parity-scale-codec = "3.6.5" parking_lot = "0.12.1" -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-objects = { version = "0.1.0", path = "../sp-objects" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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 1987de8ad5..0776d08faf 100644 --- a/crates/sc-consensus-subspace/Cargo.toml +++ b/crates/sc-consensus-subspace/Cargo.toml @@ -22,23 +22,23 @@ rand = "0.8.5" rand_chacha = "0.3.1" rayon = "1.8.0" schnorrkel = "0.9.1" -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-proof-of-time = { version = "0.1.0", path = "../sc-proof-of-time" } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-objects = { version = "0.1.0", path = "../sp-objects" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/block_import.rs b/crates/sc-consensus-subspace/src/block_import.rs index eeb48a84b0..e09fd86f7f 100644 --- a/crates/sc-consensus-subspace/src/block_import.rs +++ b/crates/sc-consensus-subspace/src/block_import.rs @@ -38,7 +38,7 @@ use sc_consensus::block_import::{ BlockCheckParams, BlockImport, BlockImportParams, ForkChoiceStrategy, ImportResult, }; use sc_proof_of_time::verifier::PotVerifier; -use sp_api::{ApiError, ApiExt, BlockT, HeaderT, ProvideRuntimeApi}; +use sp_api::{ApiError, ApiExt, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_blockchain::HeaderBackend; use sp_consensus_slots::Slot; @@ -49,7 +49,7 @@ use sp_consensus_subspace::{ FarmerPublicKey, FarmerSignature, PotNextSlotInput, SubspaceApi, SubspaceJustification, }; use sp_inherents::{CreateInherentDataProviders, InherentDataProvider}; -use sp_runtime::traits::{NumberFor, One}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor, One}; use sp_runtime::Justifications; use std::marker::PhantomData; use std::sync::Arc; diff --git a/crates/sc-consensus-subspace/src/lib.rs b/crates/sc-consensus-subspace/src/lib.rs index 4a8b2adad3..308f46df43 100644 --- a/crates/sc-consensus-subspace/src/lib.rs +++ b/crates/sc-consensus-subspace/src/lib.rs @@ -41,8 +41,8 @@ use crate::notification::{SubspaceNotificationSender, SubspaceNotificationStream use crate::slot_worker::{NewSlotNotification, RewardSigningNotification}; use lru::LruCache; use parking_lot::Mutex; -use sp_api::{BlockT, NumberFor}; use sp_consensus_subspace::ChainConstants; +use sp_runtime::traits::{Block as BlockT, NumberFor}; use std::sync::Arc; use subspace_core_primitives::crypto::kzg::Kzg; use subspace_core_primitives::SegmentHeader; diff --git a/crates/sc-consensus-subspace/src/slot_worker.rs b/crates/sc-consensus-subspace/src/slot_worker.rs index 47e5594dde..5ed6a6960e 100644 --- a/crates/sc-consensus-subspace/src/slot_worker.rs +++ b/crates/sc-consensus-subspace/src/slot_worker.rs @@ -47,7 +47,7 @@ use sc_telemetry::TelemetryHandle; use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedSender}; use schnorrkel::context::SigningContext; -use sp_api::{ApiError, ApiExt, NumberFor, ProvideRuntimeApi}; +use sp_api::{ApiError, ApiExt, ProvideRuntimeApi}; use sp_blockchain::{Error as ClientError, HeaderBackend, HeaderMetadata}; use sp_consensus::{BlockOrigin, Environment, Error as ConsensusError, Proposer, SyncOracle}; use sp_consensus_slots::Slot; @@ -60,7 +60,7 @@ use sp_consensus_subspace::{ }; use sp_core::crypto::ByteArray; use sp_core::H256; -use sp_runtime::traits::{Block as BlockT, Header, One, Saturating, Zero}; +use sp_runtime::traits::{Block as BlockT, Header, NumberFor, One, Saturating, Zero}; use sp_runtime::{DigestItem, Justification, Justifications}; use std::collections::BTreeMap; use std::future::Future; diff --git a/crates/sc-consensus-subspace/src/verifier.rs b/crates/sc-consensus-subspace/src/verifier.rs index 308aae11ac..68762a416d 100644 --- a/crates/sc-consensus-subspace/src/verifier.rs +++ b/crates/sc-consensus-subspace/src/verifier.rs @@ -24,7 +24,7 @@ use sc_proof_of_time::verifier::PotVerifier; use sc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_TRACE}; use sc_transaction_pool_api::OffchainTransactionPoolFactory; use schnorrkel::context::SigningContext; -use sp_api::{ApiExt, BlockT, HeaderT, ProvideRuntimeApi}; +use sp_api::{ApiExt, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_blockchain::HeaderBackend; use sp_consensus::BlockOrigin; @@ -36,7 +36,7 @@ use sp_consensus_subspace::{ ChainConstants, FarmerPublicKey, FarmerSignature, PotNextSlotInput, SubspaceApi, SubspaceJustification, }; -use sp_runtime::traits::NumberFor; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; use sp_runtime::{DigestItem, Justifications}; use std::iter; use std::marker::PhantomData; diff --git a/crates/sc-proof-of-time/Cargo.toml b/crates/sc-proof-of-time/Cargo.toml index 8516a3f1de..386f66a58e 100644 --- a/crates/sc-proof-of-time/Cargo.toml +++ b/crates/sc-proof-of-time/Cargo.toml @@ -17,17 +17,17 @@ derive_more = "0.99.17" futures = "0.3.29" lru = "0.11.0" parity-scale-codec = { version = "3.6.1", features = ["derive"] } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-proof-of-time = { version = "0.1.0", path = "../subspace-proof-of-time" } parking_lot = "0.12.1" diff --git a/crates/sc-proof-of-time/src/source.rs b/crates/sc-proof-of-time/src/source.rs index 9a3f1557ec..b51b487e77 100644 --- a/crates/sc-proof-of-time/src/source.rs +++ b/crates/sc-proof-of-time/src/source.rs @@ -11,7 +11,7 @@ use derive_more::{Deref, DerefMut}; use futures::channel::mpsc; use futures::{select, StreamExt}; use sc_client_api::BlockchainEvents; -use sc_network::PeerId; +use sc_network::{NotificationService, PeerId}; use sc_network_gossip::{Network as GossipNetwork, Syncing as GossipSyncing}; use sp_api::{ApiError, ProvideRuntimeApi}; use sp_blockchain::HeaderBackend; @@ -73,12 +73,15 @@ where Client::Api: SubspaceRuntimeApi, SO: SyncOracle + Clone + Send + Sync + 'static, { + // TODO: Struct for arguments + #[allow(clippy::too_many_arguments)] pub fn new( is_timekeeper: bool, timekeeper_cpu_cores: HashSet, client: Arc, pot_verifier: PotVerifier, network: Network, + notification_service: Box, sync: Arc, sync_oracle: SO, ) -> Result<(Self, PotGossipWorker, PotSlotInfoStream), ApiError> @@ -166,6 +169,7 @@ where pot_verifier, Arc::clone(&state), network, + notification_service, sync, sync_oracle.clone(), ); diff --git a/crates/sc-proof-of-time/src/source/gossip.rs b/crates/sc-proof-of-time/src/source/gossip.rs index 6df5084f52..a811ba219e 100644 --- a/crates/sc-proof-of-time/src/source/gossip.rs +++ b/crates/sc-proof-of-time/src/source/gossip.rs @@ -8,7 +8,7 @@ use lru::LruCache; use parity_scale_codec::{Decode, Encode}; use parking_lot::Mutex; use sc_network::config::NonDefaultSetConfig; -use sc_network::{NetworkPeers, PeerId}; +use sc_network::{NetworkPeers, NotificationService, PeerId}; use sc_network_gossip::{ GossipEngine, MessageIntent, Network as GossipNetwork, Syncing as GossipSyncing, ValidationResult, Validator, ValidatorContext, @@ -73,10 +73,19 @@ mod rep { const GOSSIP_PROTOCOL: &str = "/subspace/subspace-proof-of-time/1"; /// Returns the network configuration for PoT gossip. -pub fn pot_gossip_peers_set_config() -> NonDefaultSetConfig { - let mut cfg = NonDefaultSetConfig::new(GOSSIP_PROTOCOL.into(), 1024); +pub fn pot_gossip_peers_set_config() -> ( + NonDefaultSetConfig, + Box, +) { + let (mut cfg, notification_service) = NonDefaultSetConfig::new( + GOSSIP_PROTOCOL.into(), + Vec::new(), + 1024, + None, + Default::default(), + ); cfg.allow_non_reserved(25, 25); - cfg + (cfg, notification_service) } #[derive(Debug, Copy, Clone, Eq, PartialEq, Encode, Decode)] @@ -128,12 +137,15 @@ where Block: BlockT, { /// Instantiate gossip worker + // TODO: Struct for arguments + #[allow(clippy::too_many_arguments)] pub(super) fn new( to_gossip_receiver: mpsc::Receiver, from_gossip_sender: mpsc::Sender<(PeerId, GossipProof)>, pot_verifier: PotVerifier, state: Arc, network: Network, + notification_service: Box, sync: Arc, sync_oracle: SO, ) -> Self @@ -150,7 +162,14 @@ where sync_oracle, network.clone(), )); - let engine = GossipEngine::new(network.clone(), sync, GOSSIP_PROTOCOL, validator, None); + let engine = GossipEngine::new( + network.clone(), + sync, + notification_service, + GOSSIP_PROTOCOL, + validator, + None, + ); Self { engine: Arc::new(Mutex::new(engine)), diff --git a/crates/sc-subspace-block-relay/Cargo.toml b/crates/sc-subspace-block-relay/Cargo.toml index d345cbb10b..f0736cc303 100644 --- a/crates/sc-subspace-block-relay/Cargo.toml +++ b/crates/sc-subspace-block-relay/Cargo.toml @@ -17,16 +17,16 @@ codec = { package = "parity-scale-codec", version = "3.6.5", default-features = derive_more = "0.99.17" futures = "0.3.29" parking_lot = "0.12.1" -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } strum_macros = "0.25.2" -substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } thiserror = "1.0.48" tracing = "0.1.37" diff --git a/crates/sc-subspace-block-relay/src/consensus/relay.rs b/crates/sc-subspace-block-relay/src/consensus/relay.rs index aaaeed9ef6..7b2519159d 100644 --- a/crates/sc-subspace-block-relay/src/consensus/relay.rs +++ b/crates/sc-subspace-block-relay/src/consensus/relay.rs @@ -222,11 +222,11 @@ where Block: BlockT, Pool: TransactionPool + 'static, { - async fn download_block( + async fn download_blocks( &self, who: PeerId, request: BlockRequest, - ) -> Result, RequestFailure>, oneshot::Canceled> { + ) -> Result, ProtocolName), RequestFailure>, oneshot::Canceled> { let full_download = request.max.map_or(false, |max_blocks| max_blocks > 1); let ret = if full_download { self.full_download(who, request.clone()).await @@ -236,7 +236,7 @@ where match ret { Ok(blocks) => { self.metrics.on_download::(&blocks); - Ok(Ok(blocks.encode())) + Ok(Ok((blocks.encode(), self.protocol_name.clone()))) } Err(error) => { debug!( diff --git a/crates/sc-subspace-block-relay/src/utils.rs b/crates/sc-subspace-block-relay/src/utils.rs index 2aa795f114..b4569557e9 100644 --- a/crates/sc-subspace-block-relay/src/utils.rs +++ b/crates/sc-subspace-block-relay/src/utils.rs @@ -80,11 +80,12 @@ impl NetworkPeerHandle { self.who, self.protocol_name.clone(), request.encode(), + None, tx, IfDisconnected::ImmediateError, ); - let response_bytes = rx + let (response_bytes, _protocol_name) = rx .await .map_err(|_cancelled| RequestResponseErr::Canceled)? .map_err(RequestResponseErr::RequestFailure)?; diff --git a/crates/sc-subspace-chain-specs/Cargo.toml b/crates/sc-subspace-chain-specs/Cargo.toml index f12243d91c..fe48eeff9b 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -serde = "1.0.183" -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +serde = "1.0.195" +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } diff --git a/crates/sc-subspace-chain-specs/src/utils.rs b/crates/sc-subspace-chain-specs/src/utils.rs index 838f758160..fad5169490 100644 --- a/crates/sc-subspace-chain-specs/src/utils.rs +++ b/crates/sc-subspace-chain-specs/src/utils.rs @@ -48,6 +48,7 @@ where impl<'de, GenesisConfig, Extensions> Deserialize<'de> for SerializableChainSpec where + GenesisConfig: de::DeserializeOwned, Extensions: de::DeserializeOwned, { fn deserialize(deserializer: D) -> Result @@ -60,6 +61,7 @@ where impl<'de, GenesisConfig, Extensions> Visitor<'de> for StringVisitor where + GenesisConfig: de::DeserializeOwned, Extensions: de::DeserializeOwned, { type Value = SerializableChainSpec; @@ -237,6 +239,7 @@ where fork_id: Option<&str>, properties: Option, extensions: Extensions, + code: &[u8], ) -> Self { Self { chain_spec: GenericChainSpec::from_genesis( @@ -250,6 +253,7 @@ where fork_id, properties, extensions, + code, ), } } @@ -257,6 +261,7 @@ where impl SerializableChainSpec where + GenesisConfig: de::DeserializeOwned, Extensions: de::DeserializeOwned, { /// Parse json content into a `ChainSpec` diff --git a/crates/sp-consensus-subspace/Cargo.toml b/crates/sp-consensus-subspace/Cargo.toml index f06dc31ee2..a654d233a8 100644 --- a/crates/sp-consensus-subspace/Cargo.toml +++ b/crates/sp-consensus-subspace/Cargo.toml @@ -18,17 +18,17 @@ codec = { package = "parity-scale-codec", version = "3.6.5", default-features = log = { version = "0.4.20", default-features = false } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-application-crypto = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-externalities = { version = "0.19.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime-interface = { version = "17.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-application-crypto = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-externalities = { version = "0.19.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime-interface = { version = "17.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space", default-features = false } subspace-verification = { version = "0.1.0", path = "../subspace-verification", default-features = false } diff --git a/crates/sp-consensus-subspace/src/digests.rs b/crates/sp-consensus-subspace/src/digests.rs index 3444d81782..28492965d2 100644 --- a/crates/sp-consensus-subspace/src/digests.rs +++ b/crates/sp-consensus-subspace/src/digests.rs @@ -21,10 +21,9 @@ use crate::{ }; use codec::{Decode, Encode}; use log::trace; -use sp_api::HeaderT; use sp_consensus_slots::Slot; use sp_core::crypto::UncheckedFrom; -use sp_runtime::traits::{One, Zero}; +use sp_runtime::traits::{Header as HeaderT, One, Zero}; use sp_runtime::DigestItem; use sp_std::collections::btree_map::{BTreeMap, Entry}; use sp_std::fmt; diff --git a/crates/sp-consensus-subspace/src/lib.rs b/crates/sp-consensus-subspace/src/lib.rs index 6918056556..144862e23a 100644 --- a/crates/sp-consensus-subspace/src/lib.rs +++ b/crates/sp-consensus-subspace/src/lib.rs @@ -33,11 +33,11 @@ use alloc::borrow::Cow; use alloc::string::String; use codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -use sp_api::{BlockT, HeaderT}; use sp_consensus_slots::{Slot, SlotDuration}; use sp_core::crypto::KeyTypeId; use sp_core::H256; use sp_io::hashing; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; use sp_runtime::{ConsensusEngineId, Justification}; use sp_runtime_interface::pass_by::PassBy; use sp_runtime_interface::{pass_by, runtime_interface}; diff --git a/crates/sp-domains-fraud-proof/Cargo.toml b/crates/sp-domains-fraud-proof/Cargo.toml index 6652d6f6d7..daab1cbece 100644 --- a/crates/sp-domains-fraud-proof/Cargo.toml +++ b/crates/sp-domains-fraud-proof/Cargo.toml @@ -14,24 +14,24 @@ include = [ codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } domain-block-preprocessor = { version = "0.1.0", default-features = false, path = "../../domains/client/block-preprocessor", optional = true } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } hash-db = { version = "0.16.0", default-features = false } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false, optional = true } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false, optional = true } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domain-digests = { version = "0.1.0", default-features = false, path = "../../domains/primitives/digests" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } -sp-externalities = { version = "0.19.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime-interface = { version = "17.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-state-machine = { version = "0.28.0", optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-externalities = { version = "0.19.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime-interface = { version = "17.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-state-machine = { version = "0.28.0", optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } trie-db = { version = "0.28.0", default-features = false } @@ -41,26 +41,26 @@ thiserror = { version = "1.0.48", optional = true } domain-block-builder = { version = "0.1.0", path = "../../domains/client/block-builder" } domain-block-preprocessor = { version = "0.1.0", path = "../../domains/client/block-preprocessor" } domain-test-service = { version = "0.1.0", path = "../../domains/test/service" } -ethereum = "0.14.0" -fp-rpc = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a", features = ['default'] } -fp-self-contained = { version = "1.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a", features = ['default'] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +ethereum = "0.15.0" +fp-rpc = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7", features = ['default'] } +fp-self-contained = { version = "1.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7", features = ['default'] } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } futures = "0.3.29" libsecp256k1 = { version = "0.7.1", features = ["static-context", "hmac"] } -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-ethereum = { version = "4.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a", features = ['default'] } -pallet-evm = { version = "6.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a", default-features = false } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-ethereum = { version = "4.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7", features = ['default'] } +pallet-evm = { version = "6.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7", default-features = false } rand = { version = "0.8.5", features = ["min_const_gen"] } rlp = "0.5.2" -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } subspace-test-client = { version = "0.1.0", path = "../../test/subspace-test-client" } subspace-test-service = { version = "0.1.0", path = "../../test/subspace-test-service" } subspace-runtime-primitives = { version = "0.1.0", path = "../../crates/subspace-runtime-primitives" } -substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } tempfile = "3.8.0" tokio = "1.34.0" diff --git a/crates/sp-domains-fraud-proof/src/bundle_equivocation.rs b/crates/sp-domains-fraud-proof/src/bundle_equivocation.rs index 80b7eb4640..bf950b16b7 100644 --- a/crates/sp-domains-fraud-proof/src/bundle_equivocation.rs +++ b/crates/sp-domains-fraud-proof/src/bundle_equivocation.rs @@ -5,11 +5,10 @@ use crate::fraud_proof::{BundleEquivocationProof, FraudProof}; use codec::{Decode, Encode}; use sc_client_api::backend::AuxStore; -use sp_api::{BlockT, HeaderT}; use sp_blockchain::{Error as ClientError, Result as ClientResult}; use sp_consensus_slots::Slot; use sp_domains::SealedBundleHeader; -use sp_runtime::traits::NumberFor; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; use std::sync::Arc; use subspace_runtime_primitives::Balance; diff --git a/crates/sp-domains-fraud-proof/src/host_functions.rs b/crates/sp-domains-fraud-proof/src/host_functions.rs index 65452f206e..f010c09b5b 100644 --- a/crates/sp-domains-fraud-proof/src/host_functions.rs +++ b/crates/sp-domains-fraud-proof/src/host_functions.rs @@ -9,13 +9,13 @@ use domain_runtime_primitives::{ }; use sc_client_api::BlockBackend; use sc_executor::RuntimeVersionOf; -use sp_api::{BlockT, HashT, ProvideRuntimeApi}; +use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_core::traits::{CodeExecutor, FetchRuntimeCode, RuntimeCode}; use sp_core::H256; use sp_domains::bundle_producer_election::BundleProducerElectionParams; use sp_domains::{BundleProducerElectionApi, DomainId, DomainsApi, OperatorId}; -use sp_runtime::traits::Header as HeaderT; +use sp_runtime::traits::{Block as BlockT, Hash as HashT, Header as HeaderT}; use sp_runtime::OpaqueExtrinsic; use sp_std::vec::Vec; use sp_trie::StorageProof; diff --git a/crates/sp-domains-fraud-proof/src/lib.rs b/crates/sp-domains-fraud-proof/src/lib.rs index c3c80f0656..d5886f7b5b 100644 --- a/crates/sp-domains-fraud-proof/src/lib.rs +++ b/crates/sp-domains-fraud-proof/src/lib.rs @@ -42,11 +42,10 @@ pub use host_functions::{ pub use runtime_interface::fraud_proof_runtime_interface; #[cfg(feature = "std")] pub use runtime_interface::fraud_proof_runtime_interface::HostFunctions; -use sp_api::scale_info::TypeInfo; -use sp_api::HeaderT; +use scale_info::TypeInfo; use sp_core::H256; use sp_domains::{DomainId, OperatorId}; -use sp_runtime::traits::NumberFor; +use sp_runtime::traits::{Header as HeaderT, NumberFor}; use sp_runtime::transaction_validity::{InvalidTransaction, TransactionValidity}; use sp_runtime::OpaqueExtrinsic; use sp_runtime_interface::pass_by; diff --git a/crates/sp-domains/Cargo.toml b/crates/sp-domains/Cargo.toml index 46cfe21111..f4e1a10e9c 100644 --- a/crates/sp-domains/Cargo.toml +++ b/crates/sp-domains/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] blake2 = { version = "0.10.6", default-features = false } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } hash-db = { version = "0.16.0", default-features = false } memory-db = { version = "0.32.0", default-features = false } hexlit = "0.5.5" @@ -23,22 +23,23 @@ rand = { version = "0.8.5", default-features = false } rand_chacha = { version = "0.3.1", default-features = false } rs_merkle = { version = "1.4.1", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.183", default-features = false, features = ["alloc", "derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-application-crypto = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime-interface = { version = "17.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-state-machine = { version = "0.28.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-weights = { version = "20.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +serde = { version = "1.0.195", default-features = false, features = ["alloc", "derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-application-crypto = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime-interface = { version = "17.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-state-machine = { version = "0.28.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-weights = { version = "20.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } trie-db = { version = "0.28.0", default-features = false } [dev-dependencies] -num-traits = "0.2.16" +num-traits = "0.2.17" rand = { version = "0.8.5", features = ["min_const_gen"] } [features] @@ -62,6 +63,7 @@ std = [ "sp-state-machine/std", "sp-std/std", "sp-trie/std", + "sp-version/std", "sp-weights/std", "subspace-core-primitives/std", "subspace-runtime-primitives/std", diff --git a/crates/sp-domains/src/bundle_producer_election.rs b/crates/sp-domains/src/bundle_producer_election.rs index b70c68ea75..78fac33e0b 100644 --- a/crates/sp-domains/src/bundle_producer_election.rs +++ b/crates/sp-domains/src/bundle_producer_election.rs @@ -2,7 +2,7 @@ use crate::{DomainId, OperatorPublicKey, ProofOfElection, StakeWeight}; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; use sp_core::crypto::{VrfPublic, Wraps}; -use sp_core::sr25519::vrf::{VrfOutput, VrfSignature, VrfTranscript}; +use sp_core::sr25519::vrf::{VrfPreOutput, VrfSignature, VrfTranscript}; use subspace_core_primitives::Blake3Hash; const VRF_TRANSCRIPT_LABEL: &[u8] = b"bundle_producer_election"; @@ -37,18 +37,18 @@ pub fn calculate_threshold( * operator_stake } -pub fn is_below_threshold(vrf_output: &VrfOutput, threshold: u128) -> bool { - let vrf_output = u128::from_le_bytes( +pub fn is_below_threshold(vrf_output: &VrfPreOutput, threshold: u128) -> bool { + let vrf_pre_output = u128::from_le_bytes( vrf_output .0 .to_bytes() .split_at(core::mem::size_of::()) .0 .try_into() - .expect("Slice splitted from VrfOutput must fit into u128; qed"), + .expect("Slice splitted from VrfPreOutput must fit into u128; qed"), ); - vrf_output < threshold + vrf_pre_output < threshold } #[derive(Debug, Decode, Encode, TypeInfo, PartialEq, Eq, Clone)] @@ -94,7 +94,7 @@ pub fn check_proof_of_election( let threshold = calculate_threshold(operator_stake, total_domain_stake, bundle_slot_probability); - if !is_below_threshold(&proof_of_election.vrf_signature.output, threshold) { + if !is_below_threshold(&proof_of_election.vrf_signature.pre_output, threshold) { return Err(ProofOfElectionError::ThresholdUnsatisfied); } diff --git a/crates/sp-domains/src/lib.rs b/crates/sp-domains/src/lib.rs index 015fca3955..d5659b49f1 100644 --- a/crates/sp-domains/src/lib.rs +++ b/crates/sp-domains/src/lib.rs @@ -39,12 +39,11 @@ use hexlit::hex; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; -use sp_api::RuntimeVersion; use sp_application_crypto::sr25519; use sp_core::crypto::KeyTypeId; use sp_core::sr25519::vrf::VrfSignature; #[cfg(any(feature = "std", feature = "runtime-benchmarks"))] -use sp_core::sr25519::vrf::{VrfOutput, VrfProof}; +use sp_core::sr25519::vrf::{VrfPreOutput, VrfProof}; use sp_core::H256; use sp_runtime::generic::OpaqueDigestItemId; use sp_runtime::traits::{ @@ -58,6 +57,7 @@ use sp_std::collections::btree_set::BTreeSet; use sp_std::fmt::{Display, Formatter}; use sp_std::vec::Vec; use sp_trie::TrieLayout; +use sp_version::RuntimeVersion; use sp_weights::Weight; use subspace_core_primitives::crypto::blake3_hash; use subspace_core_primitives::{bidirectional_distance, Blake3Hash, Randomness, U256}; @@ -579,7 +579,7 @@ impl ProofOfElection { /// Computes the VRF hash. pub fn vrf_hash(&self) -> Blake3Hash { - let mut bytes = self.vrf_signature.output.encode(); + let mut bytes = self.vrf_signature.pre_output.encode(); bytes.append(&mut self.vrf_signature.proof.encode()); blake3_hash(&bytes) } @@ -588,10 +588,10 @@ impl ProofOfElection { impl ProofOfElection { #[cfg(any(feature = "std", feature = "runtime-benchmarks"))] pub fn dummy(domain_id: DomainId, operator_id: OperatorId) -> Self { - let output_bytes = sp_std::vec![0u8; VrfOutput::max_encoded_len()]; + let output_bytes = sp_std::vec![0u8; VrfPreOutput::max_encoded_len()]; let proof_bytes = sp_std::vec![0u8; VrfProof::max_encoded_len()]; let vrf_signature = VrfSignature { - output: VrfOutput::decode(&mut output_bytes.as_slice()).unwrap(), + pre_output: VrfPreOutput::decode(&mut output_bytes.as_slice()).unwrap(), proof: VrfProof::decode(&mut proof_bytes.as_slice()).unwrap(), }; Self { diff --git a/crates/sp-lightclient/Cargo.toml b/crates/sp-lightclient/Cargo.toml index 234f3e9486..f0f1ba4700 100644 --- a/crates/sp-lightclient/Cargo.toml +++ b/crates/sp-lightclient/Cargo.toml @@ -19,20 +19,20 @@ include = [ codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false } 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 = "16.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-arithmetic = { version = "16.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace", default-features = false } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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-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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } futures = "0.3.29" rand = { version = "0.8.5", features = ["min_const_gen"] } -sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/sp-objects/Cargo.toml b/crates/sp-objects/Cargo.toml index 0e54991540..c68bfe93ef 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } diff --git a/crates/subspace-archiving/Cargo.toml b/crates/subspace-archiving/Cargo.toml index 9d49aee1a2..312ea32fcb 100644 --- a/crates/subspace-archiving/Cargo.toml +++ b/crates/subspace-archiving/Cargo.toml @@ -19,7 +19,7 @@ bench = false [dependencies] parity-scale-codec = { version = "3.6.5", default-features = false, features = ["derive"] } rayon = { version = "1.8.0", optional = true } -serde = { version = "1.0.183", optional = true, features = ["derive"] } +serde = { version = "1.0.195", optional = true, features = ["derive"] } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } subspace-erasure-coding = { version = "0.1.0", path = "../subspace-erasure-coding", default-features = false } thiserror = { version = "1.0.48", optional = true } diff --git a/crates/subspace-core-primitives/Cargo.toml b/crates/subspace-core-primitives/Cargo.toml index f43e11e8a1..0b718bfd3b 100644 --- a/crates/subspace-core-primitives/Cargo.toml +++ b/crates/subspace-core-primitives/Cargo.toml @@ -20,13 +20,13 @@ blake3 = { version = "1.4.1", default-features = false } derive_more = "0.99.17" hex = { version = "0.4.3", default-features = false, features = ["alloc"] } kzg = { git = "https://github.com/sifraitech/rust-kzg", rev = "c34b73916af9b8a699a74bd0186f82f25e72861c", default-features = false } -num-traits = { version = "0.2.16", default-features = false } +num-traits = { version = "0.2.17", default-features = false } parity-scale-codec = { version = "3.6.5", default-features = false, features = ["derive", "max-encoded-len"] } parking_lot = { version = "0.12.1", optional = true } rayon = { version = "1.8.0", optional = true } rust-kzg-blst = { git = "https://github.com/sifraitech/rust-kzg", rev = "c34b73916af9b8a699a74bd0186f82f25e72861c", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.183", optional = true, features = ["alloc", "derive"] } +serde = { version = "1.0.195", optional = true, features = ["alloc", "derive"] } serde_arrays = { version = "0.1.0", optional = true } # Replacement for `parking_lot` in `no_std` environment spin = "0.9.7" diff --git a/crates/subspace-farmer-components/Cargo.toml b/crates/subspace-farmer-components/Cargo.toml index b81e82ae67..673fcd3023 100644 --- a/crates/subspace-farmer-components/Cargo.toml +++ b/crates/subspace-farmer-components/Cargo.toml @@ -28,7 +28,7 @@ parity-scale-codec = "3.6.5" rand = "0.8.5" rayon = "1.8.0" schnorrkel = "0.9.1" -serde = { version = "1.0.183", features = ["derive"] } +serde = { version = "1.0.195", features = ["derive"] } static_assertions = "1.1.0" subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } diff --git a/crates/subspace-farmer/Cargo.toml b/crates/subspace-farmer/Cargo.toml index fdbc69213c..41e631b409 100644 --- a/crates/subspace-farmer/Cargo.toml +++ b/crates/subspace-farmer/Cargo.toml @@ -40,8 +40,8 @@ prometheus-client = "0.22.0" rand = "0.8.5" rayon = "1.8.0" schnorrkel = "0.9.1" -serde = { version = "1.0.183", features = ["derive"] } -serde_json = "1.0.106" +serde = { version = "1.0.195", features = ["derive"] } +serde_json = "1.0.111" static_assertions = "1.1.0" ss58-registry = "1.43.0" subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } diff --git a/crates/subspace-malicious-operator/Cargo.toml b/crates/subspace-malicious-operator/Cargo.toml index 9843583b28..04861f65a8 100644 --- a/crates/subspace-malicious-operator/Cargo.toml +++ b/crates/subspace-malicious-operator/Cargo.toml @@ -27,44 +27,44 @@ domain-eth-service = { version = "0.1.0", path = "../../domains/client/eth-servi domain-service = { version = "0.1.0", path = "../../domains/service" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } evm-domain-runtime = { version = "0.1.0", path = "../../domains/runtime/evm" } -fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } futures = "0.3.29" hex-literal = "0.4.1" log = "0.4.20" mimalloc = "0.1.39" pallet-domains = { version = "0.1.0", default-features = false, path = "../pallet-domains" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } parity-scale-codec = "3.6.5" -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } sc-subspace-chain-specs = { version = "0.1.0", path = "../sc-subspace-chain-specs" } -sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -serde_json = "1.0.106" -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false, version = "4.0.0-dev" } +sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +serde_json = "1.0.111" +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false, version = "4.0.0-dev" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../sp-domains" } sp-domain-digests = { version = "0.1.0", path = "../../domains/primitives/digests" } -sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space" } @@ -77,7 +77,7 @@ rand = "0.8.5" tracing = "0.1.37" [build-dependencies] -substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = [] diff --git a/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs b/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs index d0b93f7bed..58fea6b262 100644 --- a/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs +++ b/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs @@ -90,9 +90,7 @@ fn set_default_ss58_version>(chain_spec: C) { } fn main() -> Result<(), Error> { - let mut cli = Cli::from_args(); - // Force UTC logs for Subspace node - cli.run.shared_params.use_utc_log_time = true; + let cli = Cli::from_args(); let runner = cli.create_runner(&cli.run)?; set_default_ss58_version(&runner.config().chain_spec); @@ -364,8 +362,9 @@ fn main() -> Result<(), Error> { let cross_domain_message_gossip_worker = xdm_gossip_worker_builder .build::( - consensus_chain_node.network_service.clone(), - consensus_chain_node.sync_service.clone(), + consensus_chain_node.network_service, + consensus_chain_node.cdm_gossip_notification_service, + consensus_chain_node.sync_service, ); consensus_chain_node diff --git a/crates/subspace-malicious-operator/src/chain_spec.rs b/crates/subspace-malicious-operator/src/chain_spec.rs index 4332861d39..835ba514f8 100644 --- a/crates/subspace-malicious-operator/src/chain_spec.rs +++ b/crates/subspace-malicious-operator/src/chain_spec.rs @@ -44,12 +44,7 @@ pub fn domain_dev_config() -> ExecutionChainSpec ExecutionChainSpec Result Result, // who, start, period, period_count, per_period @@ -235,11 +231,7 @@ fn subspace_genesis_config( } = genesis_params; subspace_runtime::RuntimeGenesisConfig { - system: subspace_runtime::SystemConfig { - // Add Wasm runtime to storage. - code: wasm_binary.to_vec(), - ..Default::default() - }, + system: subspace_runtime::SystemConfig::default(), balances: subspace_runtime::BalancesConfig { balances }, transaction_payment: Default::default(), sudo: subspace_runtime::SudoConfig { diff --git a/crates/subspace-malicious-operator/src/malicious_bundle_tamper.rs b/crates/subspace-malicious-operator/src/malicious_bundle_tamper.rs index c18fad4ec1..5855653a64 100644 --- a/crates/subspace-malicious-operator/src/malicious_bundle_tamper.rs +++ b/crates/subspace-malicious-operator/src/malicious_bundle_tamper.rs @@ -2,14 +2,14 @@ use domain_client_operator::{ExecutionReceiptFor, OpaqueBundleFor}; use domain_runtime_primitives::{BlockFees, DomainCoreApi}; use parity_scale_codec::{Decode, Encode}; use sc_client_api::HeaderBackend; -use sp_api::{HashT, HeaderT, ProvideRuntimeApi}; +use sp_api::ProvideRuntimeApi; use sp_domain_digests::AsPredigest; use sp_domains::merkle_tree::MerkleTree; use sp_domains::{ BundleValidity, HeaderHashingFor, InvalidBundleType, OperatorPublicKey, OperatorSignature, }; use sp_keystore::KeystorePtr; -use sp_runtime::traits::{Block as BlockT, NumberFor, One, Zero}; +use sp_runtime::traits::{Block as BlockT, Hash as HashT, Header as HeaderT, NumberFor, One, Zero}; use sp_runtime::{DigestItem, OpaqueExtrinsic, RuntimeAppPublic}; use std::collections::{BTreeMap, HashMap}; use std::error::Error; diff --git a/crates/subspace-networking/Cargo.toml b/crates/subspace-networking/Cargo.toml index 24e8c49a9f..6ce8911228 100644 --- a/crates/subspace-networking/Cargo.toml +++ b/crates/subspace-networking/Cargo.toml @@ -37,8 +37,8 @@ parking_lot = "0.12.1" pin-project = "1.1.3" prometheus-client = "0.22.0" rand = "0.8.5" -serde = { version = "1.0.183", features = ["derive"] } -serde_json = "1.0.106" +serde = { version = "1.0.195", features = ["derive"] } +serde_json = "1.0.111" subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-metrics = { version = "0.1.0", path = "../../shared/subspace-metrics" } thiserror = "1.0.48" diff --git a/crates/subspace-node/Cargo.toml b/crates/subspace-node/Cargo.toml index b6f88241de..84a7910da1 100644 --- a/crates/subspace-node/Cargo.toml +++ b/crates/subspace-node/Cargo.toml @@ -30,43 +30,43 @@ domain-service = { version = "0.1.0", path = "../../domains/service" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } evm-domain-runtime = { version = "0.1.0", path = "../../domains/runtime/evm" } fdlimit = "0.3.0" -fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } futures = "0.3.29" hex = "0.4.3" hex-literal = "0.4.1" mimalloc = "0.1.39" parity-scale-codec = "3.6.5" -sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-informant = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-keystore = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-informant = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-keystore = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-subspace-chain-specs = { version = "0.1.0", path = "../sc-subspace-chain-specs" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -serde_json = "1.0.106" -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +serde_json = "1.0.111" +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../sp-domains" } sp-domain-digests = { version = "0.1.0", path = "../../domains/primitives/digests" } sp-domains-fraud-proof = { version = "0.1.0", path = "../sp-domains-fraud-proof" } -sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-wasm-interface = { version = "14.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-wasm-interface = { version = "14.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space" } @@ -81,7 +81,7 @@ tracing = "0.1.37" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } [build-dependencies] -substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = [] diff --git a/crates/subspace-node/src/chain_spec.rs b/crates/subspace-node/src/chain_spec.rs index 82e03d75f9..d1572190b1 100644 --- a/crates/subspace-node/src/chain_spec.rs +++ b/crates/subspace-node/src/chain_spec.rs @@ -163,7 +163,6 @@ pub fn gemini_3g_compiled() -> Result, .collect::>(); subspace_genesis_config( SpecId::Gemini, - WASM_BINARY.expect("Wasm binary must be built for Gemini"), sudo_account.clone(), balances, vesting_schedules, @@ -214,6 +213,8 @@ pub fn gemini_3g_compiled() -> Result, }), // Extensions NoExtension::None, + // Code + WASM_BINARY.expect("Wasm binary must be built for Gemini"), )) } @@ -276,7 +277,6 @@ pub fn devnet_config_compiled() -> Result>(); subspace_genesis_config( SpecId::DevNet, - WASM_BINARY.expect("Wasm binary must be built for Gemini"), sudo_account, balances, vesting_schedules, @@ -319,6 +319,8 @@ pub fn devnet_config_compiled() -> Result Result, String> || { subspace_genesis_config( SpecId::Dev, - wasm_binary, // Sudo account get_account_id_from_seed("Alice"), // Pre-funded accounts @@ -379,13 +380,14 @@ pub fn dev_config() -> Result, String> }), // Extensions NoExtension::None, + // Code + wasm_binary, )) } /// Configure initial storage state for FRAME modules. fn subspace_genesis_config( spec_id: SpecId, - wasm_binary: &[u8], sudo_account: AccountId, balances: Vec<(AccountId, Balance)>, // who, start, period, period_count, per_period @@ -404,8 +406,18 @@ fn subspace_genesis_config( } = genesis_params; let raw_genesis_storage = { - let domain_genesis_config = evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id); - let storage = domain_genesis_config + let domain_chain_spec = match spec_id { + SpecId::Dev => evm_chain_spec::development_config(move || { + evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id) + }), + SpecId::Gemini => evm_chain_spec::gemini_3g_config(move || { + evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id) + }), + SpecId::DevNet => evm_chain_spec::devnet_config(move || { + evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id) + }), + }; + let storage = domain_chain_spec .build_storage() .expect("Failed to build genesis storage from genesis runtime config"); let raw_genesis = RawGenesis::from_storage(storage); @@ -413,11 +425,7 @@ fn subspace_genesis_config( }; RuntimeGenesisConfig { - system: SystemConfig { - // Add Wasm runtime to storage. - code: wasm_binary.to_vec(), - ..Default::default() - }, + system: SystemConfig::default(), balances: BalancesConfig { balances }, transaction_payment: Default::default(), sudo: SudoConfig { diff --git a/crates/subspace-node/src/commands/run.rs b/crates/subspace-node/src/commands/run.rs index 9c26351f5e..8833abe81d 100644 --- a/crates/subspace-node/src/commands/run.rs +++ b/crates/subspace-node/src/commands/run.rs @@ -97,6 +97,8 @@ pub async fn run(run_options: RunOptions) -> Result<(), Error> { set_default_ss58_version(subspace_configuration.chain_spec.as_ref()); + let base_path = subspace_configuration.base_path.path().to_path_buf(); + info!("Subspace"); info!("✌️ version {}", env!("SUBSTRATE_CLI_IMPL_VERSION")); info!("❤️ by {}", env!("CARGO_PKG_AUTHORS")); @@ -105,14 +107,9 @@ pub async fn run(run_options: RunOptions) -> Result<(), Error> { subspace_configuration.chain_spec.name() ); info!("🏷 Node name: {}", subspace_configuration.network.node_name); - info!( - "💾 Node path: {}", - subspace_configuration.base_path.path().display() - ); + info!("💾 Node path: {}", base_path.display()); let mut task_manager = { - let database_source = subspace_configuration.database.clone(); - let consensus_state_pruning_mode = subspace_configuration .state_pruning .clone() @@ -148,7 +145,7 @@ pub async fn run(run_options: RunOptions) -> Result<(), Error> { StorageMonitorService::try_spawn( storage_monitor, - database_source, + base_path, &consensus_chain_node.task_manager.spawn_essential_handle(), ) .map_err(|error| { @@ -214,6 +211,7 @@ pub async fn run(run_options: RunOptions) -> Result<(), Error> { let cross_domain_message_gossip_worker = xdm_gossip_worker_builder .build::( consensus_chain_node.network_service.clone(), + consensus_chain_node.cdm_gossip_notification_service, consensus_chain_node.sync_service.clone(), ); diff --git a/crates/subspace-node/src/commands/run/domain.rs b/crates/subspace-node/src/commands/run/domain.rs index cbbec23492..4860b7e6d3 100644 --- a/crates/subspace-node/src/commands/run/domain.rs +++ b/crates/subspace-node/src/commands/run/domain.rs @@ -264,6 +264,8 @@ pub(super) fn create_domain_configuration( }), // Extensions None, + // Code doesn't matter, it will be replaced before running + &[], ); let base_path = consensus_chain_configuration diff --git a/crates/subspace-node/src/domain/cli.rs b/crates/subspace-node/src/domain/cli.rs index ac2c63d008..d732ff8ae8 100644 --- a/crates/subspace-node/src/domain/cli.rs +++ b/crates/subspace-node/src/domain/cli.rs @@ -16,7 +16,6 @@ use crate::commands::InsertDomainKeyOptions; use crate::domain::evm_chain_spec; -use crate::domain::evm_chain_spec::SpecId; use clap::Parser; use domain_runtime_primitives::opaque::Block as DomainBlock; use parity_scale_codec::Encode; @@ -34,7 +33,7 @@ use sp_domains::storage::RawGenesis; use sp_domains::{DomainId, OperatorId}; use sp_runtime::generic::BlockId; use sp_runtime::traits::Header; -use sp_runtime::{BuildStorage, DigestItem}; +use sp_runtime::DigestItem; use std::io::Write; use std::net::SocketAddr; use std::path::Path; @@ -301,10 +300,8 @@ impl BuildGenesisStorageCmd { pub fn run(&self) -> sc_cli::Result<()> { let is_dev = self.shared_params.is_dev(); let chain_id = self.shared_params.chain_id(is_dev); - let domain_genesis_config = match chain_id.as_str() { - "gemini-3g" => evm_chain_spec::get_testnet_genesis_by_spec_id(SpecId::Gemini), - "devnet" => evm_chain_spec::get_testnet_genesis_by_spec_id(SpecId::DevNet), - "dev" => evm_chain_spec::get_testnet_genesis_by_spec_id(SpecId::Dev), + let domain_chain_spec = match chain_id.as_str() { + "gemini-3g" | "devnet" | "dev" => evm_chain_spec::load_chain_spec(&chain_id)?, unknown_id => { eprintln!( "unknown chain {unknown_id:?}, expected gemini-3g, devnet, dev, or local", @@ -314,7 +311,7 @@ impl BuildGenesisStorageCmd { }; let raw_genesis_storage = { - let storage = domain_genesis_config + let storage = domain_chain_spec .build_storage() .expect("Failed to build genesis storage from genesis runtime config"); let raw_genesis = RawGenesis::from_storage(storage); diff --git a/crates/subspace-node/src/domain/evm_chain_spec.rs b/crates/subspace-node/src/domain/evm_chain_spec.rs index c4673bf0bb..b9e2efd837 100644 --- a/crates/subspace-node/src/domain/evm_chain_spec.rs +++ b/crates/subspace-node/src/domain/evm_chain_spec.rs @@ -59,6 +59,8 @@ pub fn development_config RuntimeGenesisConfig + 'static + Send + Syn None, Some(chain_spec_properties()), None, + // Code + WASM_BINARY.expect("WASM binary was not build, please build it!"), ) } @@ -83,6 +85,8 @@ pub fn gemini_3g_config RuntimeGenesisConfig + 'static + Send + Sync> Some(chain_spec_properties()), // Extensions None, + // Code + WASM_BINARY.expect("WASM binary was not build, please build it!"), ) } @@ -107,19 +111,22 @@ pub fn devnet_config RuntimeGenesisConfig + 'static + Send + Sync>( Some(chain_spec_properties()), // Extensions None, + // Code + WASM_BINARY.expect("WASM binary was not build, please build it!"), ) } pub fn load_chain_spec(spec_id: &str) -> Result, String> { let chain_spec = match spec_id { - "dev" => development_config(move || get_testnet_genesis_by_spec_id(SpecId::Dev)), "gemini-3g" => gemini_3g_config(move || get_testnet_genesis_by_spec_id(SpecId::Gemini)), "devnet" => devnet_config(move || get_testnet_genesis_by_spec_id(SpecId::DevNet)), + "dev" => development_config(move || get_testnet_genesis_by_spec_id(SpecId::Dev)), path => ChainSpec::from_json_file(std::path::PathBuf::from(path))?, }; Ok(Box::new(chain_spec)) } +#[derive(Debug, Copy, Clone)] pub enum SpecId { Dev, Gemini, @@ -172,12 +179,7 @@ fn testnet_genesis( let revert_bytecode = vec![0x60, 0x00, 0x60, 0x00, 0xFD]; RuntimeGenesisConfig { - system: SystemConfig { - code: WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: SystemConfig::default(), sudo: SudoConfig { key: maybe_sudo_account, }, diff --git a/crates/subspace-rpc-primitives/Cargo.toml b/crates/subspace-rpc-primitives/Cargo.toml index 45ab699dd5..4f6e007b2c 100644 --- a/crates/subspace-rpc-primitives/Cargo.toml +++ b/crates/subspace-rpc-primitives/Cargo.toml @@ -14,7 +14,7 @@ include = [ [dependencies] hex = { version = "0.4.3", features = ["serde"] } -serde = { version = "1.0.183", features = ["derive"] } +serde = { version = "1.0.195", features = ["derive"] } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-farmer-components = { version = "0.1.0", path = "../subspace-farmer-components" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } diff --git a/crates/subspace-runtime-primitives/Cargo.toml b/crates/subspace-runtime-primitives/Cargo.toml index 9397511caa..4a5239935c 100644 --- a/crates/subspace-runtime-primitives/Cargo.toml +++ b/crates/subspace-runtime-primitives/Cargo.toml @@ -16,17 +16,17 @@ include = [ targets = ["x86_64-unknown-linux-gnu"] [dependencies] -frame-support = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } # TODO: Should, idealy, be optional, but `sp-runtime`'s `serde` feature is enabled unconditionally 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.183", default-features = false, features = ["alloc", "derive"] } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-io = { version = "23.0.0", default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +serde = { version = "1.0.195", default-features = false, features = ["alloc", "derive"] } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-io = { version = "23.0.0", default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } [features] diff --git a/crates/subspace-runtime/Cargo.toml b/crates/subspace-runtime/Cargo.toml index 0174ab107c..e1b143f802 100644 --- a/crates/subspace-runtime/Cargo.toml +++ b/crates/subspace-runtime/Cargo.toml @@ -18,55 +18,55 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-domains = { version = "0.1.0", default-features = false, path = "../pallet-domains" } pallet-messenger = { version = "0.1.0", path = "../../domains/pallets/messenger", default-features = false } pallet-offences-subspace = { version = "0.1.0", default-features = false, path = "../pallet-offences-subspace" } 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, features = ["serde"], path = "../pallet-subspace" } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-transporter = { version = "0.1.0", path = "../../domains/pallets/transporter", default-features = false } -pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false, version = "4.0.0-dev" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", default-features = false, path = "../sp-domains-fraud-proof" } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false, version = "4.0.0-dev" } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false, version = "4.0.0-dev" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } static_assertions = "1.1.0" subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } [build-dependencies] -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } [dev-dependencies] hex-literal = "0.4.1" -sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-runtime-primitives = { version = "0.1.0", features = ["testing"], path = "../subspace-runtime-primitives" } [features] diff --git a/crates/subspace-runtime/src/domains.rs b/crates/subspace-runtime/src/domains.rs index 003d21a044..0308ad4ae9 100644 --- a/crates/subspace-runtime/src/domains.rs +++ b/crates/subspace-runtime/src/domains.rs @@ -1,8 +1,8 @@ use crate::{Balance, Block, Domains, RuntimeCall, UncheckedExtrinsic}; use domain_runtime_primitives::opaque::Header as DomainHeader; -use sp_api::{BlockT, NumberFor}; use sp_domains::DomainId; use sp_domains_fraud_proof::fraud_proof::FraudProof; +use sp_runtime::traits::{Block as BlockT, NumberFor}; use sp_std::vec::Vec; pub(crate) fn extract_successful_bundles( diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index ca18a372bd..3231d7f59d 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -15,7 +15,7 @@ // along with this program. If not, see . #![cfg_attr(not(feature = "std"), no_std)] -#![feature(const_option, const_trait_impl)] +#![feature(const_option, const_trait_impl, variant_count)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] @@ -32,13 +32,16 @@ use crate::fees::{OnChargeTransaction, TransactionByteFee}; use crate::object_mapping::extract_block_object_mapping; pub use crate::signed_extensions::{CheckStorageAccess, DisablePallets}; use codec::{Decode, Encode, MaxEncodedLen}; +use core::mem; use core::num::NonZeroU64; use domain_runtime_primitives::opaque::Header as DomainHeader; use domain_runtime_primitives::{ BlockNumber as DomainNumber, Hash as DomainHash, MultiAccountId, TryConvertBack, }; use frame_support::inherent::ProvideInherent; -use frame_support::traits::{ConstU16, ConstU32, ConstU64, ConstU8, Currency, Everything, Get}; +use frame_support::traits::{ + ConstU16, ConstU32, ConstU64, ConstU8, Currency, Everything, Get, VariantCount, +}; use frame_support::weights::constants::{RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}; use frame_support::weights::{ConstantMultiplier, IdentityFee, Weight}; use frame_support::{construct_runtime, parameter_types, PalletId}; @@ -47,14 +50,13 @@ use frame_system::EnsureNever; pub use pallet_subspace::{AllowAuthoringBy, EnableRewardsAt}; use pallet_transporter::EndpointHandler; use scale_info::TypeInfo; -use sp_api::{impl_runtime_apis, BlockT}; +use sp_api::impl_runtime_apis; use sp_consensus_slots::{Slot, SlotDuration}; use sp_consensus_subspace::{ ChainConstants, EquivocationProof, FarmerPublicKey, PotParameters, SignedVote, SolutionRanges, Vote, }; use sp_core::crypto::{ByteArray, KeyTypeId}; -use sp_core::storage::StateVersion; use sp_core::{OpaqueMetadata, H256}; use sp_domains::bundle_producer_election::BundleProducerElectionParams; use sp_domains::{ @@ -67,7 +69,9 @@ use sp_messenger::messages::{ BlockInfo, BlockMessagesWithStorageKey, ChainId, CrossDomainMessage, ExtractedStateRootsFromProof, MessageId, }; -use sp_runtime::traits::{AccountIdConversion, AccountIdLookup, BlakeTwo256, Convert, NumberFor}; +use sp_runtime::traits::{ + AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Convert, NumberFor, +}; use sp_runtime::transaction_validity::{TransactionSource, TransactionValidity}; use sp_runtime::{create_runtime_str, generic, AccountId32, ApplyExtrinsicResult, Perbill}; use sp_std::collections::btree_map::BTreeMap; @@ -113,6 +117,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { apis: RUNTIME_API_VERSIONS, transaction_version: 0, state_version: 0, + extrinsic_state_version: 0, }; /// The version information used to identify this runtime when compiled natively. @@ -281,7 +286,6 @@ parameter_types! { pub SubspaceBlockWeights: BlockWeights = BlockWeights::with_sensible_defaults(BLOCK_WEIGHT_FOR_2_SEC, NORMAL_DISPATCH_RATIO); /// We allow for 3.75 MiB for `Normal` extrinsic with 5 MiB maximum block length. pub SubspaceBlockLength: BlockLength = BlockLength::max_with_normal_ratio(MAX_BLOCK_LENGTH, NORMAL_DISPATCH_RATIO); - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; } pub type SS58Prefix = ConstU16<2254>; @@ -302,6 +306,8 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. type RuntimeCall = RuntimeCall; + /// The aggregated `RuntimeTask` type. + type RuntimeTask = RuntimeTask; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = AccountIdLookup; /// The type for storing how many extrinsics an account has signed. @@ -339,7 +345,6 @@ impl frame_system::Config for Runtime { /// The set code logic, just the default since we're not a parachain. type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } parameter_types! { @@ -424,12 +429,17 @@ impl pallet_domains::HoldIdentifier for HoldIdentifier { } } +impl VariantCount for HoldIdentifier { + const VARIANT_COUNT: u32 = mem::variant_count::() as u32; +} + parameter_types! { // TODO: revisit this pub const MaxHolds: u32 = 100; } impl pallet_balances::Config for Runtime { + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxLocks = ConstU32<50>; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; diff --git a/crates/subspace-service/Cargo.toml b/crates/subspace-service/Cargo.toml index fb8d06d8a3..8f6ce8da00 100644 --- a/crates/subspace-service/Cargo.toml +++ b/crates/subspace-service/Cargo.toml @@ -17,54 +17,53 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] async-trait = "0.1.73" -atomic = "0.5.3" cross-domain-message-gossip = { version = "0.1.0", path = "../../domains/client/cross-domain-message-gossip" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } futures = "0.3.29" hex = "0.4.3" jsonrpsee = { version = "0.16.3", features = ["server"] } -pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } parity-scale-codec = "3.6.5" parking_lot = "0.12.1" prometheus-client = "0.22.0" -sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-informant = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-informant = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-proof-of-time = { version = "0.1.0", path = "../sc-proof-of-time" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } schnorrkel = "0.9.1" -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", path = "../sp-domains-fraud-proof" } -sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-objects = { version = "0.1.0", path = "../sp-objects" } -sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } static_assertions = "1.1.0" subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } @@ -72,15 +71,15 @@ subspace-metrics = { version = "0.1.0", path = "../../shared/subspace-metrics" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space" } subspace-runtime-primitives = { version = "0.1.0", path = "../subspace-runtime-primitives" } -substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } thiserror = "1.0.48" tokio = { version = "1.34.0", features = ["sync"] } tracing = "0.1.37" -sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = [] diff --git a/crates/subspace-service/src/config.rs b/crates/subspace-service/src/config.rs index b7f74e9665..5b046f5d1a 100644 --- a/crates/subspace-service/src/config.rs +++ b/crates/subspace-service/src/config.rs @@ -1,5 +1,4 @@ use crate::dsn::DsnConfig; -use atomic::Atomic; use prometheus_client::registry::Registry; use sc_chain_spec::ChainSpec; use sc_network::config::{ @@ -17,6 +16,7 @@ use std::net::SocketAddr; use std::num::NonZeroUsize; use std::ops::Deref; use std::path::PathBuf; +use std::sync::atomic::AtomicBool; use std::sync::Arc; use subspace_networking::libp2p::Multiaddr; use subspace_networking::Node; @@ -137,7 +137,8 @@ impl From for Configuration { // Substrate's default max_blocks_per_request: 64, // Substrate's default, full mode - sync_mode: Arc::new(Atomic::new(SyncMode::Full)), + sync_mode: SyncMode::Full, + pause_sync: Arc::new(AtomicBool::new(false)), // Substrate's default enable_dht_random_walk: true, // Substrate's default diff --git a/crates/subspace-service/src/lib.rs b/crates/subspace-service/src/lib.rs index 26a3aa773f..90d20b5bdf 100644 --- a/crates/subspace-service/src/lib.rs +++ b/crates/subspace-service/src/lib.rs @@ -66,7 +66,7 @@ use sc_consensus_subspace::slot_worker::{ use sc_consensus_subspace::verifier::{SubspaceVerifier, SubspaceVerifierOptions}; use sc_consensus_subspace::SubspaceLink; use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; -use sc_network::NetworkService; +use sc_network::{NetworkService, NotificationService}; use sc_proof_of_time::source::gossip::pot_gossip_peers_set_config; use sc_proof_of_time::source::PotSourceWorker; use sc_proof_of_time::verifier::PotVerifier; @@ -577,6 +577,8 @@ where pub select_chain: FullSelectChain, /// Network service. pub network_service: Arc::Hash>>, + /// Cross-domain gossip notification service. + pub cdm_gossip_notification_service: Box, /// Sync service. pub sync_service: Arc>, /// RPC handlers. @@ -754,9 +756,13 @@ where .map_err(Error::BlockRelay)?, ); let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.base.network); - net_config.add_notification_protocol(cdm_gossip_peers_set_config()); - net_config.add_notification_protocol(pot_gossip_peers_set_config()); - let sync_mode = Arc::clone(&net_config.network_config.sync_mode); + let (cdm_gossip_notification_config, cdm_gossip_notification_service) = + cdm_gossip_peers_set_config(); + net_config.add_notification_protocol(cdm_gossip_notification_config); + let (pot_gossip_notification_config, pot_gossip_notification_service) = + pot_gossip_peers_set_config(); + net_config.add_notification_protocol(pot_gossip_notification_config); + let pause_sync = Arc::clone(&net_config.network_config.pause_sync); let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config.base, @@ -826,7 +832,7 @@ where Arc::clone(&client), import_queue_service, sync_target_block_number, - sync_mode, + pause_sync, subspace_link.kzg().clone(), ); task_manager @@ -900,6 +906,7 @@ where client.clone(), pot_verifier.clone(), network_service.clone(), + pot_gossip_notification_service, sync_service.clone(), sync_oracle.clone(), ) @@ -1056,6 +1063,7 @@ where client, select_chain, network_service, + cdm_gossip_notification_service, sync_service, rpc_handlers, backend, diff --git a/crates/subspace-service/src/sync_from_dsn.rs b/crates/subspace-service/src/sync_from_dsn.rs index b0a45848b9..fd93b205c1 100644 --- a/crates/subspace-service/src/sync_from_dsn.rs +++ b/crates/subspace-service/src/sync_from_dsn.rs @@ -5,21 +5,19 @@ mod segment_header_downloader; use crate::sync_from_dsn::import_blocks::import_blocks_from_dsn; use crate::sync_from_dsn::piece_validator::SegmentCommitmentPieceValidator; use crate::sync_from_dsn::segment_header_downloader::SegmentHeaderDownloader; -use atomic::Atomic; use futures::channel::mpsc; use futures::{select, FutureExt, StreamExt}; use sc_client_api::{AuxStore, BlockBackend, BlockchainEvents}; use sc_consensus::import_queue::ImportQueueService; use sc_consensus_subspace::archiver::SegmentHeadersStore; -use sc_network::config::SyncMode; use sc_network::{NetworkPeers, NetworkService}; -use sp_api::{BlockT, ProvideRuntimeApi}; +use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_consensus_subspace::{FarmerPublicKey, SubspaceApi}; -use sp_runtime::traits::{CheckedSub, NumberFor}; +use sp_runtime::traits::{Block as BlockT, CheckedSub, NumberFor}; use sp_runtime::Saturating; use std::future::Future; -use std::sync::atomic::{AtomicU32, Ordering}; +use std::sync::atomic::{AtomicBool, AtomicU32, Ordering}; use std::sync::Arc; use std::time::{Duration, Instant}; use subspace_core_primitives::crypto::kzg::Kzg; @@ -56,7 +54,7 @@ pub(super) fn create_observer_and_worker( client: Arc, mut import_queue_service: Box>, sync_target_block_number: Arc, - sync_mode: Arc>, + pause_sync: Arc, kzg: Kzg, ) -> ( impl Future + Send + 'static, @@ -88,7 +86,7 @@ where client.as_ref(), import_queue_service.as_mut(), sync_target_block_number, - sync_mode, + pause_sync, rx, &kzg, ) @@ -219,7 +217,7 @@ async fn create_worker( client: &Client, import_queue_service: &mut IQS, sync_target_block_number: Arc, - sync_mode: Arc>, + pause_sync: Arc, mut notifications: mpsc::Receiver, kzg: &Kzg, ) -> Result<(), sc_service::Error> @@ -260,9 +258,9 @@ where ); // Node starts as offline, we'll wait for it to go online shrtly after - let mut initial_sync_mode = Some(sync_mode.swap(SyncMode::Paused, Ordering::AcqRel)); + let mut initial_pause_sync = Some(pause_sync.swap(true, Ordering::AcqRel)); while let Some(reason) = notifications.next().await { - let prev_sync_mode = sync_mode.swap(SyncMode::Paused, Ordering::AcqRel); + let prev_pause_sync = pause_sync.swap(true, Ordering::AcqRel); info!(?reason, "Received notification to sync from DSN"); // TODO: Maybe handle failed block imports, additional helpful logging @@ -306,8 +304,8 @@ where } } - sync_mode.store( - initial_sync_mode.take().unwrap_or(prev_sync_mode), + pause_sync.store( + initial_pause_sync.take().unwrap_or(prev_pause_sync), Ordering::Release, ); diff --git a/crates/subspace-service/src/transaction_pool.rs b/crates/subspace-service/src/transaction_pool.rs index 69445cfdf1..0228699ba1 100644 --- a/crates/subspace-service/src/transaction_pool.rs +++ b/crates/subspace-service/src/transaction_pool.rs @@ -12,7 +12,7 @@ use sc_transaction_pool_api::{ OffchainTransactionPoolFactory, PoolFuture, PoolStatus, ReadyTransactions, TransactionFor, TransactionPool, TransactionSource, TransactionStatusStreamFor, TxHash, }; -use sp_api::{ApiExt, HeaderT, ProvideRuntimeApi}; +use sp_api::{ApiExt, ProvideRuntimeApi}; use sp_blockchain::{HeaderMetadata, TreeRoute}; use sp_consensus_slots::Slot; use sp_consensus_subspace::{ChainConstants, FarmerPublicKey, SubspaceApi}; @@ -22,7 +22,7 @@ use sp_domains_fraud_proof::bundle_equivocation::check_equivocation; use sp_domains_fraud_proof::fraud_proof::FraudProof; use sp_domains_fraud_proof::{FraudProofApi, InvalidTransactionCode}; use sp_runtime::generic::BlockId; -use sp_runtime::traits::{Block as BlockT, BlockIdTo, Header, NumberFor}; +use sp_runtime::traits::{Block as BlockT, BlockIdTo, Header as HeaderT, NumberFor}; use sp_runtime::transaction_validity::{TransactionValidity, TransactionValidityError}; use sp_runtime::SaturatedConversion; use sp_transaction_pool::runtime_api::TaggedTransactionQueue; @@ -111,7 +111,7 @@ where fn validate_transaction_blocking( &self, - at: &BlockId, + at: Block::Hash, source: TransactionSource, uxt: BlockExtrinsicOf, ) -> TxPoolResult { @@ -134,7 +134,7 @@ where + Send + Sync + 'static, - DomainHeader: Header, + DomainHeader: HeaderT, Client::Api: TaggedTransactionQueue + SubspaceApi + DomainsApi, @@ -146,26 +146,10 @@ where fn validate_transaction( &self, - at: &BlockId, + at: Block::Hash, source: TransactionSource, uxt: ExtrinsicFor, ) -> Self::ValidationFuture { - let at = match self.client.block_hash_from_id(at) { - Ok(Some(at)) => at, - Ok(None) => { - let error = sc_transaction_pool::error::Error::BlockIdConversion(format!( - "Failed to convert block id {at} to hash: block not found" - )); - return Box::pin(async move { Err(error) }); - } - Err(error) => { - let error = sc_transaction_pool::error::Error::BlockIdConversion(format!( - "Failed to convert block id {at} to hash: {error}" - )); - return Box::pin(async move { Err(error) }); - } - }; - let chain_api = self.inner.clone(); let client = self.client.clone(); let best_block_number = TryInto::::try_into(client.info().best_number) @@ -178,7 +162,7 @@ where let fraud_proof_submit_sink = self.fraud_proof_submit_sink.clone(); async move { let uxt_validity = chain_api - .validate_transaction(&BlockId::Hash(at), source, uxt.clone()) + .validate_transaction(at, source, uxt.clone()) .await?; if uxt_validity.is_ok() { @@ -348,10 +332,9 @@ where 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) => { @@ -365,7 +348,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(&BlockId::Hash(at))? .ok_or_else(|| sc_transaction_pool::error::Error::BlockIdConversion(at.to_string()))?; let validated = ValidatedTransaction::valid_at( block_number.saturated_into::(), @@ -394,7 +377,7 @@ where fn submit_at( &self, - at: &BlockId, + at: Block::Hash, source: TransactionSource, xts: Vec>, ) -> PoolFuture, Self::Error>>, Self::Error> { @@ -403,7 +386,7 @@ where fn submit_one( &self, - at: &BlockId, + at: Block::Hash, source: TransactionSource, xt: TransactionFor, ) -> PoolFuture, Self::Error> { @@ -412,7 +395,7 @@ where fn submit_and_watch( &self, - at: &BlockId, + at: Block::Hash, source: TransactionSource, xt: TransactionFor, ) -> PoolFuture>>, Self::Error> { diff --git a/crates/subspace-verification/Cargo.toml b/crates/subspace-verification/Cargo.toml index 13cbe7faa5..66060a7902 100644 --- a/crates/subspace-verification/Cargo.toml +++ b/crates/subspace-verification/Cargo.toml @@ -18,7 +18,7 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false } schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] } -sp-arithmetic = { version = "16.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-arithmetic = { version = "16.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving", default-features = false } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space", default-features = false } diff --git a/domains/client/block-builder/Cargo.toml b/domains/client/block-builder/Cargo.toml index 553e9fee2d..66f969811e 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.6.5", features = ["derive"] } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } tracing = "0.1.37" [dev-dependencies] -substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } diff --git a/domains/client/block-preprocessor/Cargo.toml b/domains/client/block-preprocessor/Cargo.toml index afcc09d32e..2e67c749b5 100644 --- a/domains/client/block-preprocessor/Cargo.toml +++ b/domains/client/block-preprocessor/Cargo.toml @@ -15,24 +15,25 @@ include = [ async-trait = { version = "0.1.57" } codec = { package = "parity-scale-codec", version = "3.6.5", features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-executor-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-executor-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-block-fees = { version = "0.1.0", path = "../../primitives/block-fees" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } sp-executive = { version = "0.1.0", path = "../../primitives/executive" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-messenger = { version = "0.1.0", path = "../../primitives/messenger" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-version = { version = "22.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } tracing = "0.1.37" [dev-dependencies] -sp-keyring = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-keyring = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } diff --git a/domains/client/block-preprocessor/src/lib.rs b/domains/client/block-preprocessor/src/lib.rs index 5043080a3f..7dcea37fb5 100644 --- a/domains/client/block-preprocessor/src/lib.rs +++ b/domains/client/block-preprocessor/src/lib.rs @@ -20,7 +20,7 @@ use codec::Encode; use domain_runtime_primitives::opaque::AccountId; use domain_runtime_primitives::DomainCoreApi; use sc_client_api::BlockBackend; -use sp_api::{HashT, ProvideRuntimeApi}; +use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_core::H256; use sp_domains::extrinsics::deduplicate_and_shuffle_extrinsics; @@ -29,7 +29,7 @@ use sp_domains::{ InvalidBundleType, OpaqueBundle, OpaqueBundles, ReceiptValidity, }; use sp_messenger::MessengerApi; -use sp_runtime::traits::{Block as BlockT, NumberFor}; +use sp_runtime::traits::{Block as BlockT, Hash as HashT, NumberFor}; use sp_state_machine::LayoutV1; use std::collections::VecDeque; use std::marker::PhantomData; diff --git a/domains/client/block-preprocessor/src/stateless_runtime.rs b/domains/client/block-preprocessor/src/stateless_runtime.rs index a1e56e2d20..d885d53db6 100644 --- a/domains/client/block-preprocessor/src/stateless_runtime.rs +++ b/domains/client/block-preprocessor/src/stateless_runtime.rs @@ -4,13 +4,15 @@ use domain_runtime_primitives::{ Balance, CheckExtrinsicsValidityError, DecodeExtrinsicError, DomainCoreApi, }; use sc_executor::RuntimeVersionOf; -use sp_api::{ApiError, BlockT, Core, Hasher, RuntimeVersion}; +use sp_api::{ApiError, Core}; use sp_core::traits::{CallContext, CodeExecutor, FetchRuntimeCode, RuntimeCode}; +use sp_core::Hasher; use sp_messenger::messages::ExtractedStateRootsFromProof; use sp_messenger::MessengerApi; -use sp_runtime::traits::NumberFor; +use sp_runtime::traits::{Block as BlockT, NumberFor}; use sp_runtime::Storage; use sp_state_machine::BasicExternalities; +use sp_version::RuntimeVersion; use std::borrow::Cow; use std::marker::PhantomData; use std::sync::Arc; @@ -145,7 +147,6 @@ where &runtime_code, fn_name, &input, - false, CallContext::Offchain, ) .0 diff --git a/domains/client/block-preprocessor/src/xdm_verifier.rs b/domains/client/block-preprocessor/src/xdm_verifier.rs index 11db0413f1..3d90589e56 100644 --- a/domains/client/block-preprocessor/src/xdm_verifier.rs +++ b/domains/client/block-preprocessor/src/xdm_verifier.rs @@ -27,15 +27,17 @@ where Client: ProvideRuntimeApi, Client::Api: MessengerApi>, { + // TODO: Type conversions here do not make sense, it shouldn't ever be required to convert between domain/consensus + // blocks because they are never 1:1. if let Some(state_roots) = client .runtime_api() .extract_xdm_proof_state_roots(at, extrinsic.encode())? { // verify consensus chain state root - if let Some(header) = - consensus_client.header(state_roots.consensus_chain_block_info.block_hash.into())? - { - if *header.state_root() != state_roots.consensus_chain_state_root.into() { + if let Some(header) = consensus_client.header(CBlock::Hash::from( + state_roots.consensus_chain_block_info.block_hash, + ))? { + if *header.state_root() != CBlock::Hash::from(state_roots.consensus_chain_state_root) { return Ok(false); } } @@ -45,7 +47,7 @@ where consensus_client.info().best_hash, domain_id, BlockInfo { - block_number: block_info.block_number.into(), + block_number: NumberFor::::from(block_info.block_number), block_hash: block_info.block_hash.into(), }, state_root.into(), diff --git a/domains/client/consensus-relay-chain/Cargo.toml b/domains/client/consensus-relay-chain/Cargo.toml index 184a74d26a..2edfe163b8 100644 --- a/domains/client/consensus-relay-chain/Cargo.toml +++ b/domains/client/consensus-relay-chain/Cargo.toml @@ -7,9 +7,9 @@ edition = "2021" [dependencies] async-trait = "0.1.73" -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } diff --git a/domains/client/cross-domain-message-gossip/Cargo.toml b/domains/client/cross-domain-message-gossip/Cargo.toml index 54f7cf07cb..fb66cd2d88 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.29" parity-scale-codec = { version = "3.6.5", features = ["derive"] } parking_lot = "0.12.1" -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } tracing = "0.1.37" diff --git a/domains/client/cross-domain-message-gossip/src/gossip_worker.rs b/domains/client/cross-domain-message-gossip/src/gossip_worker.rs index 1a52c19166..97d00e1543 100644 --- a/domains/client/cross-domain-message-gossip/src/gossip_worker.rs +++ b/domains/client/cross-domain-message-gossip/src/gossip_worker.rs @@ -2,7 +2,7 @@ use futures::{FutureExt, StreamExt}; use parity_scale_codec::{Decode, Encode}; use parking_lot::{Mutex, RwLock}; use sc_network::config::NonDefaultSetConfig; -use sc_network::{NetworkPeers, PeerId}; +use sc_network::{NetworkPeers, NotificationService, PeerId}; use sc_network_gossip::{ GossipEngine, MessageIntent, Syncing as GossipSyncing, ValidationResult, Validator, ValidatorContext, @@ -70,6 +70,7 @@ impl GossipWorkerBuilder { pub fn build( self, network: Network, + notification_service: Box, sync: Arc, ) -> GossipWorker where @@ -87,6 +88,7 @@ impl GossipWorkerBuilder { let gossip_engine = Arc::new(Mutex::new(GossipEngine::new( network, sync, + notification_service, PROTOCOL_NAME, gossip_validator.clone(), None, @@ -111,10 +113,16 @@ pub struct GossipWorker { } /// Returns the network configuration for cross chain message gossip. -pub fn cdm_gossip_peers_set_config() -> NonDefaultSetConfig { - let mut cfg = NonDefaultSetConfig::new(PROTOCOL_NAME.into(), 5 * 1024 * 1024); +pub fn cdm_gossip_peers_set_config() -> (NonDefaultSetConfig, Box) { + let (mut cfg, notification_service) = NonDefaultSetConfig::new( + PROTOCOL_NAME.into(), + Vec::new(), + 5 * 1024 * 1024, + None, + Default::default(), + ); cfg.allow_non_reserved(25, 25); - cfg + (cfg, notification_service) } /// Cross chain message topic. diff --git a/domains/client/cross-domain-message-gossip/src/message_listener.rs b/domains/client/cross-domain-message-gossip/src/message_listener.rs index 707fe5d7d8..0fb5aaa9bb 100644 --- a/domains/client/cross-domain-message-gossip/src/message_listener.rs +++ b/domains/client/cross-domain-message-gossip/src/message_listener.rs @@ -5,7 +5,6 @@ use sc_transaction_pool_api::{TransactionPool, TransactionSource}; use sp_blockchain::HeaderBackend; use sp_messenger::messages::ChainId; use sp_runtime::codec::Decode; -use sp_runtime::generic::BlockId; use sp_runtime::traits::Block as BlockT; use std::sync::Arc; @@ -55,7 +54,7 @@ pub async fn start_cross_chain_message_listener { diff --git a/domains/client/domain-operator/src/operator.rs b/domains/client/domain-operator/src/operator.rs index 4f90f24148..14f33b1e12 100644 --- a/domains/client/domain-operator/src/operator.rs +++ b/domains/client/domain-operator/src/operator.rs @@ -120,7 +120,7 @@ where NSNS: Stream + Send + 'static, ASS: Stream> + Send + 'static, { - let domain_bundle_proposer = DomainBundleProposer::new( + let domain_bundle_proposer = DomainBundleProposer::::new( params.domain_id, params.client.clone(), params.consensus_client.clone(), diff --git a/domains/client/domain-operator/src/tests.rs b/domains/client/domain-operator/src/tests.rs index 0526d475e9..b499c04aa9 100644 --- a/domains/client/domain-operator/src/tests.rs +++ b/domains/client/domain-operator/src/tests.rs @@ -18,7 +18,7 @@ use sc_service::{BasePath, Role}; use sc_transaction_pool::error::Error as PoolError; use sc_transaction_pool_api::error::Error as TxPoolError; use sc_transaction_pool_api::TransactionPool; -use sp_api::{AsTrieBackend, HashT, ProvideRuntimeApi}; +use sp_api::ProvideRuntimeApi; use sp_consensus::SyncOracle; use sp_core::storage::StateVersion; use sp_core::traits::FetchRuntimeCode; @@ -34,9 +34,10 @@ use sp_domains_fraud_proof::fraud_proof::{ }; use sp_domains_fraud_proof::InvalidTransactionCode; use sp_runtime::generic::{BlockId, DigestItem}; -use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Header as HeaderT, Zero}; +use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Hash as HashT, Header as HeaderT, Zero}; use sp_runtime::transaction_validity::InvalidTransaction; use sp_runtime::OpaqueExtrinsic; +use sp_state_machine::backend::AsTrieBackend; use std::sync::Arc; use subspace_core_primitives::Randomness; use subspace_runtime_primitives::opaque::Block as CBlock; diff --git a/domains/client/eth-service/Cargo.toml b/domains/client/eth-service/Cargo.toml index 00a9ca1d03..38ee5c2c36 100644 --- a/domains/client/eth-service/Cargo.toml +++ b/domains/client/eth-service/Cargo.toml @@ -15,28 +15,29 @@ include = [ clap = { version = "4.4.3", 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 = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -fc-db = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a", default-features = false } -fc-mapping-sync = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a", default-features = false } -fc-rpc = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a", default-features = false, features = ['rpc-binary-search-estimate'] } -fc-rpc-core = { version = "1.1.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -fc-storage = { version = "1.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -fp-rpc = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a", features = ['default'] } +fc-consensus = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +fc-db = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7", default-features = false } +fc-mapping-sync = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7", default-features = false } +fc-rpc = { version = "2.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7", default-features = false, features = ['rpc-binary-search-estimate'] } +fc-rpc-core = { version = "1.1.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +fc-storage = { version = "1.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +fp-rpc = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7", features = ['default'] } futures = "0.3.29" jsonrpsee = { version = "0.16.3", features = ["server"] } -pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -serde = { version = "1.0.183", features = ["derive"] } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +parity-scale-codec = "3.6.5" +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +serde = { version = "1.0.195", features = ["derive"] } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } diff --git a/domains/client/eth-service/src/provider.rs b/domains/client/eth-service/src/provider.rs index 4ad637bc77..234bcb3a01 100644 --- a/domains/client/eth-service/src/provider.rs +++ b/domains/client/eth-service/src/provider.rs @@ -12,6 +12,7 @@ use fc_rpc::EthConfig; use fc_storage::overrides_handle; use fp_rpc::{ConvertTransaction, ConvertTransactionRuntimeApi, EthereumRuntimeRPCApi}; use jsonrpsee::RpcModule; +use parity_scale_codec::{Decode, Encode}; use sc_client_api::{AuxStore, Backend, BlockBackend, BlockchainEvents, StorageProvider}; use sc_executor::NativeExecutionDispatch; use sc_rpc::{RpcSubscriptionIdProvider, SubscriptionTaskExecutor}; @@ -19,13 +20,13 @@ use sc_service::BasePath; use sc_transaction_pool::ChainApi; use sc_transaction_pool_api::TransactionPool; use serde::de::DeserializeOwned; -use sp_api::{ApiExt, BlockT, CallApiAt, ConstructRuntimeApi, Core, ProvideRuntimeApi}; +use sp_api::{ApiExt, CallApiAt, ConstructRuntimeApi, Core, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_core::traits::SpawnEssentialNamed; use sp_core::H256; use sp_inherents::CreateInherentDataProviders; -use sp_runtime::codec::{Decode, Encode}; +use sp_runtime::traits::Block as BlockT; use std::error::Error; use std::fmt::{Debug, Display}; use std::marker::PhantomData; diff --git a/domains/client/eth-service/src/service.rs b/domains/client/eth-service/src/service.rs index 9ac258f9c7..2d6f422d78 100644 --- a/domains/client/eth-service/src/service.rs +++ b/domains/client/eth-service/src/service.rs @@ -8,10 +8,10 @@ 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_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_core::traits::SpawnEssentialNamed; -use sp_runtime::traits::{NumberFor, Zero}; +use sp_runtime::traits::{Block as BlockT, NumberFor, Zero}; use std::collections::BTreeMap; use std::sync::{Arc, Mutex}; use std::time::Duration; diff --git a/domains/client/relayer/Cargo.toml b/domains/client/relayer/Cargo.toml index 19967de0fb..7ed4b25772 100644 --- a/domains/client/relayer/Cargo.toml +++ b/domains/client/relayer/Cargo.toml @@ -16,13 +16,14 @@ async-channel = "1.9.0" cross-domain-message-gossip = { path = "../../client/cross-domain-message-gossip" } futures = "0.3.29" parity-scale-codec = { version = "3.6.5", features = ["derive"] } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-state-db = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +scale-info = { version = "2.7.0", features = ["derive"] } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-state-db = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } sp-messenger = { version = "0.1.0", path = "../../primitives/messenger" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } tracing = "0.1.37" diff --git a/domains/client/relayer/src/lib.rs b/domains/client/relayer/src/lib.rs index 845ba6d195..757dcbfa40 100644 --- a/domains/client/relayer/src/lib.rs +++ b/domains/client/relayer/src/lib.rs @@ -7,7 +7,7 @@ use cross_domain_message_gossip::Message as GossipMessage; use parity_scale_codec::{Decode, Encode, FullCodec}; use sc_client_api::{AuxStore, HeaderBackend, ProofProvider, StorageProof}; use sc_utils::mpsc::TracingUnboundedSender; -use sp_api::scale_info::TypeInfo; +use scale_info::TypeInfo; use sp_api::ProvideRuntimeApi; use sp_domains::DomainsApi; use sp_messenger::messages::{ diff --git a/domains/client/subnet-gossip/Cargo.toml b/domains/client/subnet-gossip/Cargo.toml index 9148f411c2..d5e80ed5c2 100644 --- a/domains/client/subnet-gossip/Cargo.toml +++ b/domains/client/subnet-gossip/Cargo.toml @@ -8,12 +8,12 @@ edition = "2021" futures = "0.3.29" parity-scale-codec = { version = "3.6.5", features = ["derive"] } parking_lot = "0.12.1" -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } tracing = "0.1.37" diff --git a/domains/client/subnet-gossip/src/lib.rs b/domains/client/subnet-gossip/src/lib.rs index f9cc282825..fde6e9b60f 100644 --- a/domains/client/subnet-gossip/src/lib.rs +++ b/domains/client/subnet-gossip/src/lib.rs @@ -11,7 +11,7 @@ use self::worker::GossipWorker; use parity_scale_codec::{Decode, Encode}; use parking_lot::{Mutex, RwLock}; use sc_network::config::NonDefaultSetConfig; -use sc_network::PeerId; +use sc_network::{NotificationService, PeerId}; use sc_network_common::role::ObservedRole; use sc_network_gossip::{ GossipEngine, MessageIntent, Network as GossipNetwork, Syncing as GossipSyncing, @@ -49,10 +49,17 @@ type MessageHash = [u8; 8]; /// Returns the configuration value to use in /// [`sc_network::config::FullNetworkConfiguration::add_notification_protocol`]. -pub fn domain_subnet_gossip_peers_set_config() -> NonDefaultSetConfig { - let mut cfg = NonDefaultSetConfig::new(DOMAIN_SUBNET_PROTOCOL_NAME.into(), 1024 * 1024); +pub fn domain_subnet_gossip_peers_set_config() -> (NonDefaultSetConfig, Box) +{ + let (mut cfg, notification_service) = NonDefaultSetConfig::new( + DOMAIN_SUBNET_PROTOCOL_NAME.into(), + Vec::new(), + 1024 * 1024, + None, + Default::default(), + ); cfg.allow_non_reserved(25, 25); - cfg + (cfg, notification_service) } /// Gossip engine messages topic. @@ -261,6 +268,8 @@ type BundleReceiver = TracingUnboundedReceiver { /// Substrate network service. pub network: Network, + /// Executor gossip notification service. + pub notification_service: Box, /// Syncing service an event stream for peers. pub sync: Arc, /// Operator instance. @@ -281,6 +290,7 @@ pub async fn start_gossip_worker( { let ExecutorGossipParams { network, + notification_service, sync, operator, bundle_receiver, @@ -290,6 +300,7 @@ pub async fn start_gossip_worker( let gossip_engine = GossipEngine::new( network, sync, + notification_service, DOMAIN_SUBNET_PROTOCOL_NAME, gossip_validator.clone(), None, diff --git a/domains/pallets/block-fees/Cargo.toml b/domains/pallets/block-fees/Cargo.toml index 0d53bee9c1..90372266db 100644 --- a/domains/pallets/block-fees/Cargo.toml +++ b/domains/pallets/block-fees/Cargo.toml @@ -15,13 +15,13 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime", default-features = false } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } sp-block-fees = { version = "0.1.0", path = "../../primitives/block-fees", default-features = false } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/domains/pallets/domain-id/Cargo.toml b/domains/pallets/domain-id/Cargo.toml index 71b32b7143..b87a891fcc 100644 --- a/domains/pallets/domain-id/Cargo.toml +++ b/domains/pallets/domain-id/Cargo.toml @@ -14,15 +14,15 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [dev-dependencies] -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-io = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/domains/pallets/domain-id/src/tests.rs b/domains/pallets/domain-id/src/tests.rs index 1b3066aaa6..2adb12507d 100644 --- a/domains/pallets/domain-id/src/tests.rs +++ b/domains/pallets/domain-id/src/tests.rs @@ -1,7 +1,5 @@ use crate::{self as pallet_domain_id}; -use frame_support::parameter_types; use frame_support::traits::{ConstU16, ConstU32, ConstU64}; -use sp_core::storage::StateVersion; use sp_core::H256; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use sp_runtime::BuildStorage; @@ -17,10 +15,6 @@ frame_support::construct_runtime!( impl pallet_domain_id::Config for Test {} -parameter_types! { - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -28,6 +22,7 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; @@ -45,7 +40,6 @@ impl frame_system::Config for Test { type SS58Prefix = ConstU16<42>; type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } pub(crate) fn new_test_ext() -> sp_io::TestExternalities { diff --git a/domains/pallets/executive/Cargo.toml b/domains/pallets/executive/Cargo.toml index 1c7024b392..2669e0f8eb 100644 --- a/domains/pallets/executive/Cargo.toml +++ b/domains/pallets/executive/Cargo.toml @@ -13,23 +13,23 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -frame-executive = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +frame-executive = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } sp-executive = { version = "0.1.0", path = "../../primitives/executive", default-features = false } -sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sp-std = { version = "8.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sp-tracing = { version = "10.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sp-std = { version = "8.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sp-tracing = { version = "10.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } [dev-dependencies] -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-version = { version = "22.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-version = { version = "22.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/domains/pallets/executive/src/lib.rs b/domains/pallets/executive/src/lib.rs index 53c3221e74..a8a2f862c4 100644 --- a/domains/pallets/executive/src/lib.rs +++ b/domains/pallets/executive/src/lib.rs @@ -41,8 +41,8 @@ use frame_support::storage::with_storage_layer; use frame_support::traits::fungible::{Inspect, Mutate}; use frame_support::traits::tokens::{Fortitude, Precision}; use frame_support::traits::{ - EnsureInherentsAreFirst, ExecuteBlock, Get, OffchainWorker, OnFinalize, OnIdle, OnInitialize, - OnRuntimeUpgrade, + BeforeAllRuntimeMigrations, EnsureInherentsAreFirst, ExecuteBlock, Get, OffchainWorker, + OnFinalize, OnIdle, OnInitialize, OnRuntimeUpgrade, }; use frame_support::weights::{Weight, WeightToFee}; use frame_system::pallet_prelude::*; @@ -222,6 +222,7 @@ impl< Context: Default, UnsignedValidator, AllPalletsWithSystem: OnRuntimeUpgrade + + BeforeAllRuntimeMigrations + OnInitialize> + OnIdle> + OnFinalize> @@ -259,6 +260,7 @@ impl< Context: Default, UnsignedValidator, AllPalletsWithSystem: OnRuntimeUpgrade + + BeforeAllRuntimeMigrations + OnInitialize> + OnIdle> + OnFinalize> diff --git a/domains/pallets/executive/src/mock.rs b/domains/pallets/executive/src/mock.rs index ea55f3f359..1f59e781d6 100644 --- a/domains/pallets/executive/src/mock.rs +++ b/domains/pallets/executive/src/mock.rs @@ -6,7 +6,6 @@ use frame_support::traits::{ConstU16, ConstU32, ConstU64}; use frame_support::weights::IdentityFee; use frame_system::mocking::MockUncheckedExtrinsic; use pallet_balances::AccountData; -use sp_core::storage::StateVersion; use sp_core::H256; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use sp_runtime::BuildStorage; @@ -23,10 +22,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; -} - impl frame_system::Config for MockRuntime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -34,6 +29,7 @@ impl frame_system::Config for MockRuntime { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; @@ -51,7 +47,6 @@ impl frame_system::Config for MockRuntime { type SS58Prefix = ConstU16<42>; type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } parameter_types! { @@ -60,6 +55,7 @@ parameter_types! { } impl pallet_balances::Config for MockRuntime { + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; diff --git a/domains/pallets/executive/src/tests.rs b/domains/pallets/executive/src/tests.rs index 1dc6a04885..6f91b8d05c 100644 --- a/domains/pallets/executive/src/tests.rs +++ b/domains/pallets/executive/src/tests.rs @@ -26,6 +26,7 @@ fn test_set_code() { apis: Default::default(), transaction_version: 1, state_version: 0, + extrinsic_state_version: 0, }; let read_runtime_version = ReadRuntimeVersion(version.encode()); diff --git a/domains/pallets/messenger/Cargo.toml b/domains/pallets/messenger/Cargo.toml index 597a148e7a..e12493a5b4 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.6.5", default-features = false, features = ["derive"] } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } log = { version = "0.4.20", default-features = false } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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 = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [dev-dependencies] domain-runtime-primitives = { path = "../../primitives/runtime" } -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-transporter = { version = "0.1.0", path = "../transporter" } -sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-state-machine = { version = "0.28.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/domains/pallets/messenger/src/mock.rs b/domains/pallets/messenger/src/mock.rs index 2e79a8f2dd..834337d7cb 100644 --- a/domains/pallets/messenger/src/mock.rs +++ b/domains/pallets/messenger/src/mock.rs @@ -26,7 +26,6 @@ macro_rules! impl_runtime { use frame_support::pallet_prelude::*; use frame_support::parameter_types; use pallet_balances::AccountData; - use sp_core::storage::StateVersion; use sp_core::H256; use sp_messenger::endpoint::{Endpoint, EndpointHandler, EndpointId}; use sp_messenger::messages::ChainId; @@ -46,10 +45,6 @@ macro_rules! impl_runtime { } ); - parameter_types! { - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; - } - impl frame_system::Config for $runtime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -57,6 +52,7 @@ macro_rules! impl_runtime { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; @@ -74,7 +70,6 @@ macro_rules! impl_runtime { type SS58Prefix = ConstU16<42>; type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } parameter_types! { @@ -123,6 +118,7 @@ macro_rules! impl_runtime { } impl pallet_balances::Config for $runtime { + type RuntimeFreezeReason = RuntimeFreezeReason; type AccountStore = System; type Balance = Balance; type DustRemoval = (); diff --git a/domains/pallets/transporter/Cargo.toml b/domains/pallets/transporter/Cargo.toml index a28a6244bd..88636b6bae 100644 --- a/domains/pallets/transporter/Cargo.toml +++ b/domains/pallets/transporter/Cargo.toml @@ -16,18 +16,18 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [dev-dependencies] -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-balances = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/domains/pallets/transporter/src/mock.rs b/domains/pallets/transporter/src/mock.rs index e27a34f858..c7f182abbf 100644 --- a/domains/pallets/transporter/src/mock.rs +++ b/domains/pallets/transporter/src/mock.rs @@ -5,7 +5,6 @@ use domain_runtime_primitives::MultiAccountId; use frame_support::parameter_types; use frame_support::traits::{ConstU16, ConstU32, ConstU64}; use pallet_balances::AccountData; -use sp_core::storage::StateVersion; use sp_core::H256; use sp_messenger::endpoint::{EndpointId, EndpointRequest, Sender}; use sp_messenger::messages::ChainId; @@ -24,10 +23,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; -} - impl frame_system::Config for MockRuntime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -35,6 +30,7 @@ impl frame_system::Config for MockRuntime { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Hash = H256; type Hashing = BlakeTwo256; @@ -52,7 +48,6 @@ impl frame_system::Config for MockRuntime { type SS58Prefix = ConstU16<42>; type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } parameter_types! { @@ -60,6 +55,7 @@ parameter_types! { } impl pallet_balances::Config for MockRuntime { + type RuntimeFreezeReason = RuntimeFreezeReason; type AccountStore = System; type Balance = Balance; type DustRemoval = (); diff --git a/domains/primitives/block-fees/Cargo.toml b/domains/primitives/block-fees/Cargo.toml index 271d4629d7..b8a107a855 100644 --- a/domains/primitives/block-fees/Cargo.toml +++ b/domains/primitives/block-fees/Cargo.toml @@ -16,8 +16,8 @@ include = [ async-trait = { version = "0.1.73", optional = true } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../runtime" } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/domains/primitives/digests/Cargo.toml b/domains/primitives/digests/Cargo.toml index 265c09bba8..e5636590b7 100644 --- a/domains/primitives/digests/Cargo.toml +++ b/domains/primitives/digests/Cargo.toml @@ -15,7 +15,7 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/domains/primitives/executive/Cargo.toml b/domains/primitives/executive/Cargo.toml index 79cb26fd1e..578032aa7c 100644 --- a/domains/primitives/executive/Cargo.toml +++ b/domains/primitives/executive/Cargo.toml @@ -16,8 +16,8 @@ include = [ [dependencies] async-trait = { version = "0.1.73", optional = true } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/domains/primitives/executive/src/lib.rs b/domains/primitives/executive/src/lib.rs index f9ed6c7d35..5fb81cb6ef 100644 --- a/domains/primitives/executive/src/lib.rs +++ b/domains/primitives/executive/src/lib.rs @@ -2,7 +2,10 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::{Decode, Encode}; -use sp_inherents::{Error, InherentData, InherentIdentifier, IsFatalError}; +#[cfg(feature = "std")] +use sp_inherents::{Error, InherentData}; +use sp_inherents::{InherentIdentifier, IsFatalError}; +#[cfg(feature = "std")] use sp_std::result::Result; use sp_std::vec::Vec; diff --git a/domains/primitives/messenger/Cargo.toml b/domains/primitives/messenger/Cargo.toml index e434e8c2fe..7dce4318ba 100644 --- a/domains/primitives/messenger/Cargo.toml +++ b/domains/primitives/messenger/Cargo.toml @@ -15,17 +15,17 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } hash-db = { version = "0.16.0", default-features = false } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.183", default-features = false, features = ["alloc", "derive"] } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +serde = { version = "1.0.195", default-features = false, features = ["alloc", "derive"] } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-trie = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/domains/primitives/messenger/src/messages.rs b/domains/primitives/messenger/src/messages.rs index 48006822f0..8159db3f9a 100644 --- a/domains/primitives/messenger/src/messages.rs +++ b/domains/primitives/messenger/src/messages.rs @@ -1,6 +1,7 @@ use crate::endpoint::{Endpoint, EndpointRequest, EndpointResponse}; use codec::{Decode, Encode, FullCodec, MaxEncodedLen}; use frame_support::storage::generator::StorageMap; +use frame_support::storage::storage_prefix; use frame_support::Identity; use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; @@ -375,7 +376,7 @@ where type Query = Option; type Hasher = Identity; - fn module_prefix() -> &'static [u8] { + fn pallet_prefix() -> &'static [u8] { "Domains".as_ref() } @@ -383,6 +384,10 @@ where "StateRoots".as_ref() } + fn prefix_hash() -> [u8; 32] { + storage_prefix(Self::pallet_prefix(), Self::storage_prefix()) + } + fn from_optional_value_to_query(v: Option) -> Self::Query { v } diff --git a/domains/primitives/runtime/Cargo.toml b/domains/primitives/runtime/Cargo.toml index 17d18bbe32..8674ad4cc2 100644 --- a/domains/primitives/runtime/Cargo.toml +++ b/domains/primitives/runtime/Cargo.toml @@ -12,17 +12,17 @@ description = "Common primitives of subspace domain runtime" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } parity-scale-codec = { version = "3.6.5", default-features = false, features = ["derive"] } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives", default-features = false } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } -sp-weights = { version = "20.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-weights = { version = "20.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/domains/runtime/evm/Cargo.toml b/domains/runtime/evm/Cargo.toml index a64f911796..2771359397 100644 --- a/domains/runtime/evm/Cargo.toml +++ b/domains/runtime/evm/Cargo.toml @@ -20,45 +20,45 @@ 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, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -fp-rpc = { version = "3.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -fp-self-contained = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-base-fee = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } +fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +fp-rpc = { version = "3.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +fp-self-contained = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-base-fee = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } pallet-block-fees = { version = "0.1.0", path = "../../pallets/block-fees", default-features = false } pallet-domain-id = { version = "0.1.0", path = "../../pallets/domain-id", default-features = false } -pallet-ethereum = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } +pallet-ethereum = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-storage = { version = "13.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-storage = { version = "13.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives", default-features = false } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } @@ -66,7 +66,7 @@ subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subsp subspace-runtime-primitives = { version = "0.1.0", features = ["testing"], path = "../../../crates/subspace-runtime-primitives" } [build-dependencies] -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } [features] default = [ diff --git a/domains/runtime/evm/src/lib.rs b/domains/runtime/evm/src/lib.rs index d41b8580e1..24042c9572 100644 --- a/domains/runtime/evm/src/lib.rs +++ b/domains/runtime/evm/src/lib.rs @@ -41,7 +41,6 @@ use pallet_evm::{ use pallet_transporter::EndpointHandler; use sp_api::impl_runtime_apis; use sp_core::crypto::KeyTypeId; -use sp_core::storage::StateVersion; use sp_core::{Get, OpaqueMetadata, H160, H256, U256}; use sp_domains::DomainId; use sp_messenger::endpoint::{Endpoint, EndpointHandler as EndpointHandlerT, EndpointId}; @@ -221,6 +220,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { apis: RUNTIME_API_VERSIONS, transaction_version: 0, state_version: 0, + extrinsic_state_version: 1, }; /// The version information used to identify this runtime when compiled natively. @@ -262,7 +262,6 @@ parameter_types! { // the lazy contract deletion. pub RuntimeBlockLength: BlockLength = maximum_block_length(); pub RuntimeBlockWeights: BlockWeights = block_weights(); - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V1; } impl frame_system::Config for Runtime { @@ -270,6 +269,8 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. type RuntimeCall = RuntimeCall; + /// The aggregated `RuntimeTask` type. + type RuntimeTask = RuntimeTask; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = IdentityLookup; /// The type for storing how many extrinsics an account has signed. @@ -310,7 +311,6 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } impl pallet_timestamp::Config for Runtime { @@ -328,6 +328,7 @@ parameter_types! { } impl pallet_balances::Config for Runtime { + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxLocks = MaxLocks; /// The type for recording an account's balance. type Balance = Balance; @@ -556,6 +557,7 @@ impl pallet_evm::OnChargeEVMTransaction for EVMCurrencyAdapter { parameter_types! { pub const GasLimitPovSizeRatio: u64 = 4; + pub const SuicideQuickClearLimit: u32 = 0; } impl pallet_evm::Config for Runtime { @@ -577,6 +579,7 @@ impl pallet_evm::Config for Runtime { type OnCreate = (); type FindAuthor = FindAuthorTruncated; type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type SuicideQuickClearLimit = SuicideQuickClearLimit; type Timestamp = Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/domains/service/Cargo.toml b/domains/service/Cargo.toml index 0e25ef81d5..848614aec0 100644 --- a/domains/service/Cargo.toml +++ b/domains/service/Cargo.toml @@ -14,7 +14,6 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] async-trait = "0.1.73" -atomic = "0.5.3" cross-domain-message-gossip = { version = "0.1.0", path = "../client/cross-domain-message-gossip" } domain-client-block-preprocessor = { package = "domain-block-preprocessor", version = "0.1.0", path = "../client/block-preprocessor" } domain-client-consensus-relay-chain = { version = "0.1.0", path = "../client/consensus-relay-chain" } @@ -25,45 +24,45 @@ domain-runtime-primitives = { version = "0.1.0", path = "../primitives/runtime" futures = "0.3.29" jsonrpsee = { version = "0.16.3", features = ["server"] } log = "0.4.20" -pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } parity-scale-codec = "3.6.5" -sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-informant = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-transactions = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -serde = { version = "1.0.183", features = ["derive"] } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-informant = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-transactions = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-rpc-spec-v2 = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +serde = { version = "1.0.195", features = ["derive"] } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../../crates/sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", path = "../../crates/sp-domains-fraud-proof" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } -sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", path = "../../crates/subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", path = "../../crates/subspace-runtime-primitives" } -substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } tokio = "1.34.0" tracing = "0.1.37" [build-dependencies] -substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } diff --git a/domains/service/src/config.rs b/domains/service/src/config.rs index 59c42b2589..b1324f6414 100644 --- a/domains/service/src/config.rs +++ b/domains/service/src/config.rs @@ -1,4 +1,3 @@ -use atomic::Atomic; use sc_chain_spec::ChainSpec; use sc_network::config::{ MultiaddrWithPeerId, NetworkConfiguration, NodeKeyConfig, SetConfig, SyncMode, TransportConfig, @@ -13,6 +12,7 @@ use sc_telemetry::TelemetryEndpoints; use std::net::SocketAddr; use std::num::NonZeroUsize; use std::path::PathBuf; +use std::sync::atomic::AtomicBool; use std::sync::Arc; use tokio::runtime::Handle; @@ -132,7 +132,8 @@ impl From for Configuration { // Substrate's default max_blocks_per_request: 64, // Substrate's default, full mode - sync_mode: Arc::new(Atomic::new(SyncMode::Full)), + sync_mode: SyncMode::Full, + pause_sync: Arc::new(AtomicBool::new(false)), // Substrate's default enable_dht_random_walk: true, // Substrate's default diff --git a/domains/service/src/domain.rs b/domains/service/src/domain.rs index 21e21fcebe..bafa10b0d5 100644 --- a/domains/service/src/domain.rs +++ b/domains/service/src/domain.rs @@ -23,7 +23,7 @@ use sc_telemetry::{Telemetry, TelemetryWorker, TelemetryWorkerHandle}; use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver}; use serde::de::DeserializeOwned; -use sp_api::{ApiExt, BlockT, ConstructRuntimeApi, Metadata, NumberFor, ProvideRuntimeApi}; +use sp_api::{ApiExt, ConstructRuntimeApi, Metadata, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::SyncOracle; @@ -35,6 +35,7 @@ use sp_domains_fraud_proof::FraudProofApi; use sp_messenger::messages::ChainId; use sp_messenger::{MessengerApi, RelayerApi}; use sp_offchain::OffchainWorkerApi; +use sp_runtime::traits::{Block as BlockT, NumberFor}; use sp_session::SessionKeys; use sp_transaction_pool::runtime_api::TaggedTransactionQueue; use std::fmt::{Debug, Display}; @@ -358,11 +359,7 @@ where let transaction_pool = params.transaction_pool.clone(); let mut task_manager = params.task_manager; - let mut net_config = sc_network::config::FullNetworkConfiguration::new(&domain_config.network); - - net_config.add_notification_protocol( - domain_client_subnet_gossip::domain_subnet_gossip_peers_set_config(), - ); + let net_config = sc_network::config::FullNetworkConfiguration::new(&domain_config.network); let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = crate::build_network(BuildNetworkParams { diff --git a/domains/service/src/lib.rs b/domains/service/src/lib.rs index 2f252b21d9..cfd4212a02 100644 --- a/domains/service/src/lib.rs +++ b/domains/service/src/lib.rs @@ -31,7 +31,6 @@ use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderMetadata; use sp_consensus::block_validation::{Chain, DefaultBlockAnnounceValidator}; use sp_runtime::traits::{Block as BlockT, BlockIdTo, Zero}; -use std::sync::atomic::Ordering; use std::sync::Arc; /// Domain full client. @@ -84,12 +83,12 @@ where } = params; if client.requires_full_sync() { - match config.network.sync_mode.load(Ordering::Acquire) { + match config.network.sync_mode { SyncMode::LightState { .. } => { return Err("Fast sync doesn't work for archive nodes".into()); } SyncMode::Warp => return Err("Warp sync doesn't work for archive nodes".into()), - SyncMode::Full | SyncMode::Paused => {} + SyncMode::Full => {} } } @@ -115,6 +114,18 @@ where block_server.run().await; }); + // Create `PeerStore` and initialize it with bootnode peer ids. + let peer_store = PeerStore::new( + net_config + .network_config + .boot_nodes + .iter() + .map(|bootnode| bootnode.peer_id) + .collect(), + ); + let peer_store_handle = peer_store.handle(); + spawn_handle.spawn("peer-store", Some("networking"), peer_store.run()); + let state_request_protocol_config = { // Allow both outgoing and incoming requests. let (handler, protocol_config) = StateRequestHandler::new( @@ -127,7 +138,6 @@ where protocol_config }; - let (tx, rx) = sc_utils::mpsc::tracing_unbounded("mpsc_syncing_engine_protocol", 100_000); let (engine, sync_service, block_announce_config) = SyncingEngine::new( Roles::from(&config.role), client.clone(), @@ -146,7 +156,7 @@ where block_downloader, state_request_protocol_config.name.clone(), None, - rx, + peer_store_handle.clone(), // set to be force_synced always for domains since they relay on Consensus chain to derive and import domain blocks. // If not set, each domain node will wait to be fully synced and as a result will not propagate the transactions over network. // It would have been ideal to use `Consensus` chain sync service to respond to `is_major_sync` requests but this @@ -165,28 +175,17 @@ where .expect("Genesis block exists; qed"); // 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()); - - // Create `PeerStore` and initialize it with bootnode peer ids. - let peer_store = PeerStore::new( - net_config - .network_config - .boot_nodes - .iter() - .map(|bootnode| bootnode.peer_id) - .collect(), - ); - let peer_store_handle = peer_store.handle(); - spawn_handle.spawn("peer-store", Some("networking"), peer_store.run()); + let (transactions_handler_proto, transactions_config) = + 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_config); let network_params = sc_network::config::Params:: { role: config.role.clone(), @@ -206,7 +205,6 @@ where .as_ref() .map(|config| config.registry.clone()), block_announce_config, - tx, }; let has_bootnodes = !network_params diff --git a/domains/service/src/transaction_pool.rs b/domains/service/src/transaction_pool.rs index 4f90e5758d..c21ddad3e0 100644 --- a/domains/service/src/transaction_pool.rs +++ b/domains/service/src/transaction_pool.rs @@ -101,26 +101,10 @@ where fn validate_transaction( &self, - at: &BlockId, + at: Block::Hash, source: TransactionSource, uxt: ExtrinsicFor, ) -> Self::ValidationFuture { - let at = match self.client.block_hash_from_id(at) { - Ok(Some(at)) => at, - Ok(None) => { - let error = sc_transaction_pool::error::Error::BlockIdConversion(format!( - "Failed to convert block id {at} to hash: block not found" - )); - return Box::pin(async move { Err(error) }); - } - Err(error) => { - let error = sc_transaction_pool::error::Error::BlockIdConversion(format!( - "Failed to convert block id {at} to hash: {error}" - )); - return Box::pin(async move { Err(error) }); - } - }; - let chain_api = self.inner.clone(); let consensus_client = self.consensus_client.clone(); let client = self.client.clone(); @@ -131,9 +115,7 @@ where )); } - chain_api - .validate_transaction(&BlockId::Hash(at), source, uxt) - .await + chain_api.validate_transaction(at, source, uxt).await } .boxed() } diff --git a/domains/test/primitives/Cargo.toml b/domains/test/primitives/Cargo.toml index 28554e7997..ebd2002d88 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false } diff --git a/domains/test/runtime/evm/Cargo.toml b/domains/test/runtime/evm/Cargo.toml index 7cdb828939..5e2cfb09b3 100644 --- a/domains/test/runtime/evm/Cargo.toml +++ b/domains/test/runtime/evm/Cargo.toml @@ -21,46 +21,46 @@ codec = { package = "parity-scale-codec", version = "3.2.1", default-features = domain-pallet-executive = { version = "0.1.0", path = "../../../pallets/executive", default-features = false } domain-test-primitives = { version = "0.1.0", path = "../../primitives", default-features = false } domain-runtime-primitives = { version = "0.1.0", path = "../../../primitives/runtime", default-features = false } -fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -fp-rpc = { version = "3.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -fp-self-contained = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-base-fee = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } +fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +fp-rpc = { version = "3.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +fp-self-contained = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-base-fee = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } pallet-block-fees = { version = "0.1.0", path = "../../../pallets/block-fees", default-features = false } pallet-domain-id = { version = "0.1.0", path = "../../../pallets/domain-id", default-features = false } -pallet-ethereum = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } +pallet-ethereum = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-transporter = { version = "0.1.0", path = "../../../pallets/transporter", default-features = false } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", path = "../../../../crates/subspace-core-primitives", default-features = false } subspace-runtime-primitives = { version = "0.1.0", path = "../../../../crates/subspace-runtime-primitives", default-features = false } [build-dependencies] -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } [features] default = [ diff --git a/domains/test/runtime/evm/src/lib.rs b/domains/test/runtime/evm/src/lib.rs index 7be46381ca..e5256b3f2c 100644 --- a/domains/test/runtime/evm/src/lib.rs +++ b/domains/test/runtime/evm/src/lib.rs @@ -40,7 +40,6 @@ use pallet_evm::{ use pallet_transporter::EndpointHandler; use sp_api::impl_runtime_apis; use sp_core::crypto::KeyTypeId; -use sp_core::storage::StateVersion; use sp_core::{Get, OpaqueMetadata, H160, H256, U256}; use sp_domains::DomainId; use sp_messenger::endpoint::{Endpoint, EndpointHandler as EndpointHandlerT, EndpointId}; @@ -220,6 +219,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { apis: RUNTIME_API_VERSIONS, transaction_version: 0, state_version: 0, + extrinsic_state_version: 1, }; /// The version information used to identify this runtime when compiled natively. @@ -241,7 +241,6 @@ parameter_types! { // the lazy contract deletion. pub RuntimeBlockLength: BlockLength = maximum_block_length(); pub RuntimeBlockWeights: BlockWeights = block_weights(); - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V1; } impl frame_system::Config for Runtime { @@ -249,6 +248,8 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. type RuntimeCall = RuntimeCall; + /// The aggregated `RuntimeTask` type. + type RuntimeTask = RuntimeTask; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = IdentityLookup; /// The type for storing how many extrinsics an account has signed. @@ -289,7 +290,6 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } impl pallet_timestamp::Config for Runtime { @@ -307,6 +307,7 @@ parameter_types! { } impl pallet_balances::Config for Runtime { + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxLocks = MaxLocks; /// The type for recording an account's balance. type Balance = Balance; @@ -490,6 +491,7 @@ parameter_types! { ); pub PrecompilesValue: Precompiles = Precompiles::default(); pub WeightPerGas: Weight = Weight::from_parts(WEIGHT_PER_GAS, 0); + pub const SuicideQuickClearLimit: u32 = 0; } type NegativeImbalance = >::NegativeImbalance; @@ -554,6 +556,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = FindAuthorTruncated; type Timestamp = Timestamp; type GasLimitPovSizeRatio = (); + type SuicideQuickClearLimit = SuicideQuickClearLimit; type WeightInfo = pallet_evm::weights::SubstrateWeight; } diff --git a/domains/test/service/Cargo.toml b/domains/test/service/Cargo.toml index 136f63ffcd..ce485bb81e 100644 --- a/domains/test/service/Cargo.toml +++ b/domains/test/service/Cargo.toml @@ -18,38 +18,38 @@ domain-service = { version = "0.1.0", path = "../../service" } domain-test-primitives = { version = "0.1.0", path = "../primitives" } domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime", default-features = false } evm-domain-test-runtime = { version = "0.1.0", path = "../runtime/evm" } -fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } -fp-rpc = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a", features = ['default'] } -frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +fp-account = { version = "1.0.0-dev", default-features = false, features = ["serde"], git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } +fp-rpc = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7", features = ['default'] } +frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } rand = "0.8.5" -pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -serde = { version = "1.0.183", features = ["derive"] } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-arithmetic = { version = "16.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +serde = { version = "1.0.195", features = ["derive"] } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-arithmetic = { version = "16.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } -sp-keyring = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-keyring = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-messenger = { version = "0.1.0", path = "../../../domains/primitives/messenger" } -sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sp-session = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } subspace-test-client = { version = "0.1.0", path = "../../../test/subspace-test-client" } subspace-test-service = { version = "0.1.0", path = "../../../test/subspace-test-service" } -substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -substrate-test-client = { version = "2.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +substrate-test-client = { version = "2.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } tokio = { version = "1.34.0", 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 aa89b0de5b..8329358cb4 100644 --- a/domains/test/service/src/chain_spec.rs +++ b/domains/test/service/src/chain_spec.rs @@ -6,7 +6,7 @@ use sp_domains::storage::RawGenesis; /// Create chain spec pub fn create_domain_spec(raw_genesis: RawGenesis) -> Box { - let mut chain_spec = GenericChainSpec::from_genesis( + let mut chain_spec = GenericChainSpec::<_, _, ()>::from_genesis( "Local Testnet", "local_testnet", ChainType::Local, @@ -18,6 +18,7 @@ pub fn create_domain_spec(raw_genesis: RawGenesis) -> Box { None, None, None, + evm_domain_test_runtime::WASM_BINARY.expect("WASM binary was not build, please build it!"), ); chain_spec.set_storage(raw_genesis.into_storage()); diff --git a/domains/test/service/src/domain.rs b/domains/test/service/src/domain.rs index ac9396d7fe..e6bd110521 100644 --- a/domains/test/service/src/domain.rs +++ b/domains/test/service/src/domain.rs @@ -27,14 +27,14 @@ use sc_service::{BasePath, Role, RpcHandlers, TFullBackend, TaskManager}; use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedSender}; use serde::de::DeserializeOwned; -use sp_api::{ApiExt, ConstructRuntimeApi, Metadata, NumberFor, ProvideRuntimeApi}; +use sp_api::{ApiExt, ConstructRuntimeApi, Metadata, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder; use sp_core::{Decode, Encode, H256}; use sp_domains::DomainId; use sp_messenger::messages::ChainId; use sp_messenger::{MessengerApi, RelayerApi}; use sp_offchain::OffchainWorkerApi; -use sp_runtime::traits::Dispatchable; +use sp_runtime::traits::{Dispatchable, NumberFor}; use sp_runtime::OpaqueExtrinsic; use sp_session::SessionKeys; use sp_transaction_pool::runtime_api::TaggedTransactionQueue; diff --git a/orml/vesting/Cargo.toml b/orml/vesting/Cargo.toml index 6d15ca919f..3b02394bfb 100644 --- a/orml/vesting/Cargo.toml +++ b/orml/vesting/Cargo.toml @@ -10,17 +10,17 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.183", optional = true } +serde = { version = "1.0.195", optional = true } -frame-support = { default-features = false , git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { default-features = false , git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-io = { default-features = false , git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { default-features = false , git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { default-features = false , git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-support = { default-features = false , git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { default-features = false , git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-io = { default-features = false , git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { default-features = false , git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { default-features = false , git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [dev-dependencies] -pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] default = ["std"] diff --git a/orml/vesting/src/mock.rs b/orml/vesting/src/mock.rs index 10ca6a0d42..f1d5ac0af7 100644 --- a/orml/vesting/src/mock.rs +++ b/orml/vesting/src/mock.rs @@ -8,7 +8,6 @@ use frame_support::{ traits::{ConstU32, ConstU64, EnsureOrigin, Everything}, }; use frame_system::RawOrigin; -use sp_core::storage::StateVersion; use sp_core::H256; use sp_runtime::{traits::IdentityLookup, BuildStorage}; @@ -16,13 +15,10 @@ use crate as vesting; pub type AccountId = u128; -parameter_types! { - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; -} - impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Hash = H256; type Hashing = ::sp_runtime::traits::BlakeTwo256; @@ -44,12 +40,12 @@ impl frame_system::Config for Runtime { type SS58Prefix = (); type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } type Balance = u64; impl pallet_balances::Config for Runtime { + type RuntimeFreezeReason = RuntimeFreezeReason; type Balance = Balance; type DustRemoval = (); type RuntimeEvent = RuntimeEvent; diff --git a/test/subspace-test-client/Cargo.toml b/test/subspace-test-client/Cargo.toml index 3936265a33..9a5513d7f0 100644 --- a/test/subspace-test-client/Cargo.toml +++ b/test/subspace-test-client/Cargo.toml @@ -17,20 +17,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", features = ["derive"] } evm-domain-test-runtime = { version = "0.1.0", path = "../../domains/test/runtime/evm" } -fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "1c667eb43c3d087ac66dc9ed0aa44128373f5b0a" } +fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } futures = "0.3.29" schnorrkel = "0.9.1" -sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-consensus-subspace = { version = "0.1.0", path = "../../crates/sc-consensus-subspace" } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", path = "../../crates/sp-consensus-subspace" } -sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../../crates/sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", path = "../../crates/sp-domains-fraud-proof" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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-client/src/chain_spec.rs b/test/subspace-test-client/src/chain_spec.rs index f456c96146..67573b9fb0 100644 --- a/test/subspace-test-client/src/chain_spec.rs +++ b/test/subspace-test-client/src/chain_spec.rs @@ -2,7 +2,7 @@ use crate::domain_chain_spec::testnet_evm_genesis; use codec::Encode; -use sc_chain_spec::ChainType; +use sc_chain_spec::{ChainType, GenericChainSpec}; use sp_core::{sr25519, Pair, Public}; use sp_domains::storage::RawGenesis; use sp_domains::{GenesisDomain, OperatorAllowList, OperatorPublicKey, RuntimeType}; @@ -43,7 +43,6 @@ pub fn subspace_local_testnet_config() -> TestChainSpec { ChainType::Local, || { create_genesis_config( - wasm_binary, // Sudo account get_account_id_from_seed("Alice"), // Pre-funded accounts @@ -70,31 +69,39 @@ pub fn subspace_local_testnet_config() -> TestChainSpec { None, None, Default::default(), + wasm_binary, ) } /// Configure initial storage state for FRAME modules. fn create_genesis_config( - wasm_binary: &[u8], sudo_account: AccountId, balances: Vec<(AccountId, Balance)>, // who, start, period, period_count, per_period vesting: Vec<(AccountId, BlockNumber, BlockNumber, u32, Balance)>, ) -> RuntimeGenesisConfig { let raw_genesis_storage = { - let domain_genesis_config = testnet_evm_genesis(); - let storage = domain_genesis_config + let domain_chain_spec = GenericChainSpec::<_, _, ()>::from_genesis( + "", + "", + ChainType::Development, + testnet_evm_genesis, + Vec::new(), + None, + None, + None, + None, + None::<()>, + evm_domain_test_runtime::WASM_BINARY.expect("Development wasm not available"), + ); + let storage = domain_chain_spec .build_storage() .expect("Failed to build genesis storage from genesis runtime config"); let raw_genesis = RawGenesis::from_storage(storage); raw_genesis.encode() }; RuntimeGenesisConfig { - system: SystemConfig { - // Add Wasm runtime to storage. - code: wasm_binary.to_vec(), - ..Default::default() - }, + system: SystemConfig::default(), balances: BalancesConfig { balances }, transaction_payment: Default::default(), sudo: SudoConfig { diff --git a/test/subspace-test-client/src/domain_chain_spec.rs b/test/subspace-test-client/src/domain_chain_spec.rs index ba36733c5e..f95b3f60a8 100644 --- a/test/subspace-test-client/src/domain_chain_spec.rs +++ b/test/subspace-test-client/src/domain_chain_spec.rs @@ -51,12 +51,7 @@ pub fn testnet_evm_genesis() -> RuntimeGenesisConfig { let alice = get_account_id_from_seed::("Alice"); RuntimeGenesisConfig { - system: evm_domain_test_runtime::SystemConfig { - code: evm_domain_test_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: evm_domain_test_runtime::SystemConfig::default(), balances: evm_domain_test_runtime::BalancesConfig { balances: endowed_accounts() .iter() diff --git a/test/subspace-test-runtime/Cargo.toml b/test/subspace-test-runtime/Cargo.toml index 94f8aadbb4..23a361a546 100644 --- a/test/subspace-test-runtime/Cargo.toml +++ b/test/subspace-test-runtime/Cargo.toml @@ -18,49 +18,49 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-domains = { version = "0.1.0", default-features = false, path = "../../crates/pallet-domains" } pallet-messenger = { version = "0.1.0", path = "../../domains/pallets/messenger", default-features = false } pallet-offences-subspace = { version = "0.1.0", default-features = false, path = "../../crates/pallet-offences-subspace" } pallet-rewards = { version = "0.1.0", default-features = false, path = "../../crates/pallet-rewards" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-transporter = { version = "0.1.0", path = "../../domains/pallets/transporter", default-features = false } -pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false, version = "4.0.0-dev" } -sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false, version = "4.0.0-dev" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../../crates/sp-consensus-subspace" } -sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", default-features = false, path = "../../crates/sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", default-features = false, path = "../../crates/sp-domains-fraud-proof" } -sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false, version = "4.0.0-dev" } +sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false, version = "4.0.0-dev" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { version = "24.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-std = { version = "8.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-version = { version = "22.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } static_assertions = "1.1.0" subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../../crates/subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../crates/subspace-runtime-primitives" } # 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [build-dependencies] -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", optional = true } +substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } [features] default = ["std"] diff --git a/test/subspace-test-runtime/src/lib.rs b/test/subspace-test-runtime/src/lib.rs index a0689d2603..4160dc7155 100644 --- a/test/subspace-test-runtime/src/lib.rs +++ b/test/subspace-test-runtime/src/lib.rs @@ -15,7 +15,7 @@ // along with this program. If not, see . #![cfg_attr(not(feature = "std"), no_std)] -#![feature(const_option)] +#![feature(const_option, variant_count)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] @@ -24,6 +24,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); use codec::{Compact, CompactLen, Decode, Encode, MaxEncodedLen}; +use core::mem; use core::num::NonZeroU64; use domain_runtime_primitives::opaque::Header as DomainHeader; use domain_runtime_primitives::{ @@ -32,7 +33,7 @@ use domain_runtime_primitives::{ use frame_support::inherent::ProvideInherent; use frame_support::traits::{ ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Currency, ExistenceRequirement, Get, - Imbalance, WithdrawReasons, + Imbalance, VariantCount, WithdrawReasons, }; use frame_support::weights::constants::{RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}; use frame_support::weights::{ConstantMultiplier, IdentityFee, Weight}; @@ -43,14 +44,13 @@ use pallet_balances::NegativeImbalance; pub use pallet_subspace::{AllowAuthoringBy, EnableRewardsAt}; use pallet_transporter::EndpointHandler; use scale_info::TypeInfo; -use sp_api::{impl_runtime_apis, BlockT}; +use sp_api::impl_runtime_apis; use sp_consensus_slots::{Slot, SlotDuration}; use sp_consensus_subspace::{ ChainConstants, EquivocationProof, FarmerPublicKey, PotParameters, SignedVote, SolutionRanges, Vote, }; use sp_core::crypto::{ByteArray, KeyTypeId}; -use sp_core::storage::StateVersion; use sp_core::{OpaqueMetadata, H256}; use sp_domains::bundle_producer_election::BundleProducerElectionParams; use sp_domains::{ @@ -64,8 +64,8 @@ use sp_messenger::messages::{ ExtractedStateRootsFromProof, MessageId, }; use sp_runtime::traits::{ - AccountIdConversion, AccountIdLookup, BlakeTwo256, Convert, DispatchInfoOf, NumberFor, - PostDispatchInfoOf, Zero, + AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Convert, DispatchInfoOf, + NumberFor, PostDispatchInfoOf, Zero, }; use sp_runtime::transaction_validity::{ InvalidTransaction, TransactionSource, TransactionValidity, TransactionValidityError, @@ -119,6 +119,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { apis: RUNTIME_API_VERSIONS, transaction_version: 1, state_version: 1, + extrinsic_state_version: 0, }; /// The version information used to identify this runtime when compiled natively. @@ -209,7 +210,6 @@ parameter_types! { pub SubspaceBlockWeights: BlockWeights = BlockWeights::with_sensible_defaults(BLOCK_WEIGHT_FOR_2_SEC, NORMAL_DISPATCH_RATIO); /// We allow for 3.75 MiB for `Normal` extrinsic with 5 MiB maximum block length. pub SubspaceBlockLength: BlockLength = BlockLength::max_with_normal_ratio(MAX_BLOCK_LENGTH, NORMAL_DISPATCH_RATIO); - pub const ExtrinsicsRootStateVersion: StateVersion = StateVersion::V0; } pub type SS58Prefix = ConstU16<2254>; @@ -227,6 +227,8 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. type RuntimeCall = RuntimeCall; + /// The aggregated `RuntimeTask` type. + type RuntimeTask = RuntimeTask; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = AccountIdLookup; /// The type for storing how many extrinsics an account has signed. @@ -264,7 +266,6 @@ impl frame_system::Config for Runtime { /// The set code logic, just the default since we're not a parachain. type OnSetCode = (); type MaxConsumers = ConstU32<16>; - type ExtrinsicsRootStateVersion = ExtrinsicsRootStateVersion; } parameter_types! { @@ -338,11 +339,16 @@ impl pallet_domains::HoldIdentifier for HoldIdentifier { } } +impl VariantCount for HoldIdentifier { + const VARIANT_COUNT: u32 = mem::variant_count::() as u32; +} + parameter_types! { pub const MaxHolds: u32 = 10; } impl pallet_balances::Config for Runtime { + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxLocks = ConstU32<50>; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; diff --git a/test/subspace-test-service/Cargo.toml b/test/subspace-test-service/Cargo.toml index e171eca1b8..cafa6f9760 100644 --- a/test/subspace-test-service/Cargo.toml +++ b/test/subspace-test-service/Cargo.toml @@ -25,31 +25,31 @@ jsonrpsee = { version = "0.16.3", 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5", default-features = false } -sc-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-application-crypto = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sc-block-builder = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } +sc-tracing = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-application-crypto = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } 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/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../../crates/sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", path = "../../crates/sp-domains-fraud-proof" } -sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } -sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-inherents = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../../crates/subspace-core-primitives" } subspace-runtime-primitives = { path = "../../crates/subspace-runtime-primitives" } subspace-service = { path = "../../crates/subspace-service" } @@ -59,7 +59,7 @@ tokio = "1.34.0" tracing = "0.1.37" [dev-dependencies] -sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "0831dfc3c54b10ab46e82acf98603b4af1a47bd5" } +sp-keyring = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] do-not-enforce-cost-of-storage = [ diff --git a/test/subspace-test-service/src/lib.rs b/test/subspace-test-service/src/lib.rs index 4f27ccfad5..0bdb18aa24 100644 --- a/test/subspace-test-service/src/lib.rs +++ b/test/subspace-test-service/src/lib.rs @@ -19,13 +19,13 @@ #![warn(missing_docs, unused_crate_dependencies)] use codec::{Decode, Encode}; -use cross_domain_message_gossip::GossipWorkerBuilder; +use cross_domain_message_gossip::{cdm_gossip_peers_set_config, GossipWorkerBuilder}; use domain_runtime_primitives::opaque::{Block as DomainBlock, Header as DomainHeader}; use futures::channel::mpsc; use futures::{select, Future, FutureExt, StreamExt}; use jsonrpsee::RpcModule; use parking_lot::Mutex; -use sc_block_builder::BlockBuilderProvider; +use sc_block_builder::BlockBuilderBuilder; use sc_client_api::execution_extensions::ExtensionsFactory; use sc_client_api::{BlockBackend, ExecutorProvider}; use sc_consensus::block_import::{ @@ -36,7 +36,7 @@ use sc_consensus::{ }; use sc_executor::NativeElseWasmExecutor; use sc_network::config::{NetworkConfiguration, TransportConfig}; -use sc_network::multiaddr; +use sc_network::{multiaddr, NotificationService}; use sc_service::config::{ DatabaseSource, KeystoreConfig, MultiaddrWithPeerId, WasmExecutionMethod, WasmtimeInstantiationStrategy, @@ -47,7 +47,7 @@ use sc_service::{ use sc_transaction_pool::error::Error as PoolError; use sc_transaction_pool_api::{InPoolTransaction, TransactionPool, TransactionSource}; use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender}; -use sp_api::{ApiExt, HashT, HeaderT, ProvideRuntimeApi}; +use sp_api::{ApiExt, ProvideRuntimeApi}; use sp_application_crypto::UncheckedFrom; use sp_blockchain::HeaderBackend; use sp_consensus::{BlockOrigin, Error as ConsensusError}; @@ -63,7 +63,9 @@ use sp_externalities::Extensions; use sp_inherents::{InherentData, InherentDataProvider}; use sp_keyring::Sr25519Keyring; use sp_runtime::generic::{BlockId, Digest}; -use sp_runtime::traits::{BlakeTwo256, Block as BlockT, NumberFor}; +use sp_runtime::traits::{ + BlakeTwo256, Block as BlockT, Hash as HashT, Header as HeaderT, NumberFor, +}; use sp_runtime::{DigestItem, OpaqueExtrinsic}; use sp_timestamp::Timestamp; use std::error::Error; @@ -231,6 +233,8 @@ pub struct MockConsensusNode { pub select_chain: FullSelectChain, /// Network service. pub network_service: Arc::Hash>>, + /// Cross-domain gossip notification service. + pub cdm_gossip_notification_service: Option>, /// Sync service. pub sync_service: Arc>, /// RPC handlers. @@ -305,7 +309,10 @@ impl MockConsensusNode { let block_import = MockBlockImport::<_, _>::new(client.clone()); - let net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); + let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); + let (cdm_gossip_notification_config, cdm_gossip_notification_service) = + cdm_gossip_peers_set_config(); + net_config.add_notification_protocol(cdm_gossip_notification_config); let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { @@ -353,6 +360,7 @@ impl MockConsensusNode { transaction_pool, select_chain, network_service, + cdm_gossip_notification_service: Some(cdm_gossip_notification_service), sync_service, rpc_handlers, network_starter: Some(network_starter), @@ -387,8 +395,13 @@ impl MockConsensusNode { .xdm_gossip_worker_builder .take() .expect("gossip message worker have not started yet"); - let cross_domain_message_gossip_worker = xdm_gossip_worker_builder - .build::(self.network_service.clone(), self.sync_service.clone()); + let cross_domain_message_gossip_worker = xdm_gossip_worker_builder.build::( + self.network_service.clone(), + self.cdm_gossip_notification_service + .take() + .expect("CDM gossip notification service must be used only once"), + self.sync_service.clone(), + ); self.task_manager .spawn_essential_handle() .spawn_essential_blocking( @@ -536,7 +549,7 @@ impl MockConsensusNode { pub async fn submit_transaction(&self, tx: OpaqueExtrinsic) -> Result { self.transaction_pool .submit_one( - &BlockId::Hash(self.client.info().best_hash), + self.client.info().best_hash, TransactionSource::External, tx, ) @@ -686,11 +699,16 @@ impl MockConsensusNode { parent_hash: ::Hash, extrinsics: Vec<::Extrinsic>, ) -> Result<(Block, StorageChanges), Box> { - let digest = self.mock_subspace_digest(slot); + let inherent_digest = self.mock_subspace_digest(slot); let inherent_data = Self::mock_inherent_data(slot).await?; - let mut block_builder = self.client.new_block_at(parent_hash, digest, false)?; + let mut block_builder = BlockBuilderBuilder::new(self.client.as_ref()) + .on_parent_block(parent_hash) + .fetch_parent_block_number(self.client.as_ref())? + .with_inherent_digests(inherent_digest) + .build() + .expect("Creates new block builder"); let inherent_txns = block_builder.create_inherents(inherent_data)?; From bc45901e5893a3924511872c05c354d5ccad106e Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Wed, 17 Jan 2024 13:56:35 +0200 Subject: [PATCH 2/6] Suppress some warnings pending upstream fixes --- crates/sc-subspace-chain-specs/src/utils.rs | 2 ++ domains/test/service/src/chain_spec.rs | 2 ++ test/subspace-test-client/src/chain_spec.rs | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/crates/sc-subspace-chain-specs/src/utils.rs b/crates/sc-subspace-chain-specs/src/utils.rs index fad5169490..77467c3479 100644 --- a/crates/sc-subspace-chain-specs/src/utils.rs +++ b/crates/sc-subspace-chain-specs/src/utils.rs @@ -242,6 +242,8 @@ where code: &[u8], ) -> Self { Self { + // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken + #[allow(deprecated)] chain_spec: GenericChainSpec::from_genesis( name, id, diff --git a/domains/test/service/src/chain_spec.rs b/domains/test/service/src/chain_spec.rs index 8329358cb4..0bf11f7ebf 100644 --- a/domains/test/service/src/chain_spec.rs +++ b/domains/test/service/src/chain_spec.rs @@ -6,6 +6,8 @@ use sp_domains::storage::RawGenesis; /// Create chain spec pub fn create_domain_spec(raw_genesis: RawGenesis) -> Box { + // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken + #[allow(deprecated)] let mut chain_spec = GenericChainSpec::<_, _, ()>::from_genesis( "Local Testnet", "local_testnet", diff --git a/test/subspace-test-client/src/chain_spec.rs b/test/subspace-test-client/src/chain_spec.rs index 67573b9fb0..f5f80fb069 100644 --- a/test/subspace-test-client/src/chain_spec.rs +++ b/test/subspace-test-client/src/chain_spec.rs @@ -37,6 +37,8 @@ pub fn get_account_id_from_seed(seed: &str) -> AccountId { /// Local testnet config (multivalidator Alice + Bob). pub fn subspace_local_testnet_config() -> TestChainSpec { let wasm_binary = WASM_BINARY.expect("Development wasm not available"); + // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken + #[allow(deprecated)] TestChainSpec::from_genesis( "Local Testnet", "local_testnet", @@ -81,6 +83,8 @@ fn create_genesis_config( vesting: Vec<(AccountId, BlockNumber, BlockNumber, u32, Balance)>, ) -> RuntimeGenesisConfig { let raw_genesis_storage = { + // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken + #[allow(deprecated)] let domain_chain_spec = GenericChainSpec::<_, _, ()>::from_genesis( "", "", From 0c368be91c74db34b984b702ba13b587a79ebe8b Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Wed, 17 Jan 2024 14:01:44 +0200 Subject: [PATCH 3/6] Remove copy-pasted `Cors` enum with upstream re-export --- crates/subspace-node/src/commands/run.rs | 1 - .../src/commands/run/consensus.rs | 5 +- .../subspace-node/src/commands/run/domain.rs | 5 +- .../subspace-node/src/commands/run/shared.rs | 3 +- .../src/commands/run/substrate.rs | 64 ------------------- 5 files changed, 6 insertions(+), 72 deletions(-) delete mode 100644 crates/subspace-node/src/commands/run/substrate.rs diff --git a/crates/subspace-node/src/commands/run.rs b/crates/subspace-node/src/commands/run.rs index 8833abe81d..4c8679f59a 100644 --- a/crates/subspace-node/src/commands/run.rs +++ b/crates/subspace-node/src/commands/run.rs @@ -1,7 +1,6 @@ mod consensus; mod domain; mod shared; -mod substrate; use crate::commands::run::consensus::{ create_consensus_chain_configuration, ConsensusChainConfiguration, ConsensusChainOptions, diff --git a/crates/subspace-node/src/commands/run/consensus.rs b/crates/subspace-node/src/commands/run/consensus.rs index 19f5ef6ec1..c694b3cd82 100644 --- a/crates/subspace-node/src/commands/run/consensus.rs +++ b/crates/subspace-node/src/commands/run/consensus.rs @@ -1,10 +1,9 @@ use crate::commands::run::shared::RpcOptions; -use crate::commands::run::substrate::Cors; use crate::{chain_spec, derive_pot_external_entropy, Error}; use clap::Parser; use sc_cli::{ - generate_node_name, NodeKeyParams, NodeKeyType, PruningParams, RpcMethods, TelemetryParams, - TransactionPoolParams, RPC_DEFAULT_PORT, + generate_node_name, Cors, NodeKeyParams, NodeKeyType, PruningParams, RpcMethods, + TelemetryParams, TransactionPoolParams, RPC_DEFAULT_PORT, }; use sc_informant::OutputFormat; use sc_network::config::{MultiaddrWithPeerId, NonReservedPeerMode, SetConfig}; diff --git a/crates/subspace-node/src/commands/run/domain.rs b/crates/subspace-node/src/commands/run/domain.rs index 4860b7e6d3..c63d4ec265 100644 --- a/crates/subspace-node/src/commands/run/domain.rs +++ b/crates/subspace-node/src/commands/run/domain.rs @@ -1,5 +1,4 @@ use crate::commands::run::shared::RpcOptions; -use crate::commands::run::substrate::Cors; use crate::commands::shared::{store_key_in_keystore, KeystoreOptions}; use crate::Error; use clap::Parser; @@ -17,7 +16,9 @@ use evm_domain_runtime::{ }; use futures::StreamExt; use sc_chain_spec::{ChainType, Properties}; -use sc_cli::{KeystoreParams, PruningParams, RpcMethods, TransactionPoolParams, RPC_DEFAULT_PORT}; +use sc_cli::{ + Cors, KeystoreParams, PruningParams, RpcMethods, TransactionPoolParams, RPC_DEFAULT_PORT, +}; use sc_consensus_subspace::block_import::BlockImportingNotification; use sc_consensus_subspace::notification::SubspaceNotificationStream; use sc_consensus_subspace::slot_worker::NewSlotNotification; diff --git a/crates/subspace-node/src/commands/run/shared.rs b/crates/subspace-node/src/commands/run/shared.rs index 2a4f305d60..88f7173c4f 100644 --- a/crates/subspace-node/src/commands/run/shared.rs +++ b/crates/subspace-node/src/commands/run/shared.rs @@ -1,6 +1,5 @@ -use crate::commands::run::substrate::Cors; use clap::Parser; -use sc_cli::{RpcMethods, RPC_DEFAULT_MAX_CONNECTIONS, RPC_DEFAULT_MAX_SUBS_PER_CONN}; +use sc_cli::{Cors, RpcMethods, RPC_DEFAULT_MAX_CONNECTIONS, RPC_DEFAULT_MAX_SUBS_PER_CONN}; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; /// Options for RPC diff --git a/crates/subspace-node/src/commands/run/substrate.rs b/crates/subspace-node/src/commands/run/substrate.rs deleted file mode 100644 index 377b60484a..0000000000 --- a/crates/subspace-node/src/commands/run/substrate.rs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// 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 . - -//! Copy-paste of Substrate's data structures that are not currently public there. -//! TODO: Remove this module once we use Substrate with https://github.com/paritytech/polkadot-sdk/pull/2898 - -use std::str::FromStr; - -/// CORS setting -/// -/// The type is introduced to overcome `Option>` handling of `clap`. -#[derive(Clone, Debug)] -pub enum Cors { - /// All hosts allowed. - All, - /// Only hosts on the list are allowed. - List(Vec), -} - -impl From for Option> { - fn from(cors: Cors) -> Self { - match cors { - Cors::All => None, - Cors::List(list) => Some(list), - } - } -} - -impl FromStr for Cors { - type Err = sc_cli::Error; - - fn from_str(s: &str) -> Result { - let mut is_all = false; - let mut origins = Vec::new(); - for part in s.split(',') { - match part { - "all" | "*" => { - is_all = true; - break; - } - other => origins.push(other.to_owned()), - } - } - - if is_all { - Ok(Cors::All) - } else { - Ok(Cors::List(origins)) - } - } -} From 0558c426a49b9a7ba6c73e35d0b1f98c68988b40 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Wed, 17 Jan 2024 14:34:48 +0200 Subject: [PATCH 4/6] Stop using `NativeExecutionDispatch` --- Cargo.lock | 13 +-- crates/sp-domains-fraud-proof/Cargo.toml | 1 - .../src/bin/subspace-malicious-operator.rs | 13 ++- .../src/malicious_domain_instance_starter.rs | 13 +-- crates/subspace-node/Cargo.toml | 7 +- crates/subspace-node/src/commands/run.rs | 13 ++- .../subspace-node/src/commands/run/domain.rs | 14 +--- crates/subspace-node/src/main.rs | 47 ++++------- crates/subspace-runtime/Cargo.toml | 2 - crates/subspace-runtime/src/lib.rs | 40 --------- crates/subspace-service/Cargo.toml | 4 +- crates/subspace-service/src/lib.rs | 83 ++++++++++--------- domains/client/eth-service/Cargo.toml | 1 - domains/client/eth-service/src/provider.rs | 19 ++--- domains/runtime/evm/Cargo.toml | 2 - domains/runtime/evm/src/lib.rs | 31 ------- domains/service/Cargo.toml | 5 ++ domains/service/src/domain.rs | 75 ++++++----------- domains/service/src/lib.rs | 18 +++- domains/service/src/providers.rs | 18 ++-- domains/test/runtime/evm/src/lib.rs | 11 --- domains/test/service/Cargo.toml | 1 - domains/test/service/src/domain.rs | 79 +++++------------- test/subspace-test-client/Cargo.toml | 2 - test/subspace-test-client/src/lib.rs | 20 +---- test/subspace-test-runtime/src/lib.rs | 11 --- test/subspace-test-service/src/lib.rs | 9 +- 27 files changed, 172 insertions(+), 380 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3fad6ba5d6..001e3730f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2649,7 +2649,6 @@ dependencies = [ "pallet-transaction-payment-rpc", "parity-scale-codec", "sc-client-api", - "sc-executor", "sc-network-sync", "sc-rpc", "sc-service", @@ -2716,6 +2715,7 @@ dependencies = [ "domain-client-operator", "domain-client-subnet-gossip", "domain-runtime-primitives", + "frame-benchmarking", "futures", "jsonrpsee", "log", @@ -2747,6 +2747,7 @@ dependencies = [ "sp-core", "sp-domains", "sp-domains-fraud-proof", + "sp-io", "sp-messenger", "sp-offchain", "sp-runtime", @@ -2789,7 +2790,6 @@ dependencies = [ "pallet-transaction-payment-rpc", "rand 0.8.5", "sc-client-api", - "sc-executor", "sc-network", "sc-network-sync", "sc-service", @@ -3171,7 +3171,6 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-transporter", "parity-scale-codec", - "sc-executor", "scale-info", "sp-api", "sp-block-builder", @@ -11791,7 +11790,6 @@ dependencies = [ "sc-client-api", "sc-consensus-slots", "sc-consensus-subspace", - "sc-executor", "sc-informant", "sc-keystore", "sc-network", @@ -11809,11 +11807,9 @@ dependencies = [ "sp-domain-digests", "sp-domains", "sp-domains-fraud-proof", - "sp-io", "sp-keystore", "sp-messenger", "sp-runtime", - "sp-wasm-interface", "subspace-core-primitives", "subspace-networking", "subspace-proof-of-space", @@ -11896,7 +11892,6 @@ dependencies = [ "pallet-transporter", "pallet-utility", "parity-scale-codec", - "sc-executor", "scale-info", "sp-api", "sp-block-builder", @@ -11943,6 +11938,7 @@ dependencies = [ "async-trait", "cross-domain-message-gossip", "domain-runtime-primitives", + "frame-benchmarking", "frame-system-rpc-runtime-api", "futures", "hex", @@ -11985,6 +11981,7 @@ dependencies = [ "sp-domains", "sp-domains-fraud-proof", "sp-externalities", + "sp-io", "sp-objects", "sp-offchain", "sp-runtime", @@ -12016,14 +12013,12 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-consensus-subspace", - "sc-executor", "sc-service", "schnorrkel 0.9.1", "sp-api", "sp-consensus-subspace", "sp-core", "sp-domains", - "sp-domains-fraud-proof", "sp-runtime", "subspace-archiving", "subspace-core-primitives", diff --git a/crates/sp-domains-fraud-proof/Cargo.toml b/crates/sp-domains-fraud-proof/Cargo.toml index daab1cbece..dfeba89010 100644 --- a/crates/sp-domains-fraud-proof/Cargo.toml +++ b/crates/sp-domains-fraud-proof/Cargo.toml @@ -55,7 +55,6 @@ rand = { version = "0.8.5", features = ["min_const_gen"] } rlp = "0.5.2" sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } subspace-test-client = { version = "0.1.0", path = "../../test/subspace-test-client" } subspace-test-service = { version = "0.1.0", path = "../../test/subspace-test-service" } diff --git a/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs b/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs index 58fea6b262..dc65b05ded 100644 --- a/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs +++ b/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs @@ -33,7 +33,7 @@ use subspace_malicious_operator::malicious_domain_instance_starter::DomainInstan use subspace_malicious_operator::{Cli, DomainCli}; use subspace_networking::libp2p::Multiaddr; use subspace_proof_of_space::chia::ChiaTable; -use subspace_runtime::{Block, ExecutorDispatch, RuntimeApi}; +use subspace_runtime::{Block, RuntimeApi}; use subspace_service::config::{SubspaceConfiguration, SubspaceNetworking}; use subspace_service::dsn::DsnConfig; @@ -210,18 +210,17 @@ fn main() -> Result<(), Error> { timekeeper_cpu_cores: Default::default(), }; - let partial_components = subspace_service::new_partial::< - PosTable, - RuntimeApi, - ExecutorDispatch, - >(&consensus_chain_config, &pot_external_entropy) + let partial_components = subspace_service::new_partial::( + &consensus_chain_config, + &pot_external_entropy, + ) .map_err(|error| { sc_service::Error::Other(format!("Failed to build a full subspace node: {error:?}")) })?; let keystore = partial_components.keystore_container.keystore(); - let consensus_chain_node = subspace_service::new_full::( + let consensus_chain_node = subspace_service::new_full::( consensus_chain_config, partial_components, true, diff --git a/crates/subspace-malicious-operator/src/malicious_domain_instance_starter.rs b/crates/subspace-malicious-operator/src/malicious_domain_instance_starter.rs index a446ff3552..c18b7f1a25 100644 --- a/crates/subspace-malicious-operator/src/malicious_domain_instance_starter.rs +++ b/crates/subspace-malicious-operator/src/malicious_domain_instance_starter.rs @@ -6,7 +6,7 @@ use domain_eth_service::provider::EthProvider; use domain_eth_service::DefaultEthConfig; use domain_runtime_primitives::opaque::Block as DomainBlock; use domain_service::{FullBackend, FullClient}; -use evm_domain_runtime::{AccountId as AccountId20, ExecutorDispatch as EVMDomainExecutorDispatch}; +use evm_domain_runtime::AccountId as AccountId20; use futures::StreamExt; use sc_cli::CliConfiguration; use sc_consensus_subspace::block_import::BlockImportingNotification; @@ -20,7 +20,7 @@ use sp_domains::{DomainInstanceData, RuntimeType}; use sp_keystore::KeystorePtr; use std::path::PathBuf; use std::sync::Arc; -use subspace_runtime::{ExecutorDispatch as CExecutorDispatch, RuntimeApi as CRuntimeApi}; +use subspace_runtime::RuntimeApi as CRuntimeApi; use subspace_runtime_primitives::opaque::Block as CBlock; use subspace_service::FullClient as CFullClient; @@ -30,7 +30,7 @@ pub struct DomainInstanceStarter { pub domain_cli: DomainCli, pub base_path: PathBuf, pub tokio_handle: tokio::runtime::Handle, - pub consensus_client: Arc>, + pub consensus_client: Arc>, pub consensus_keystore: KeystorePtr, pub consensus_offchain_tx_pool_factory: OffchainTransactionPoolFactory, pub block_importing_notification_stream: @@ -130,11 +130,7 @@ where EthProvider::< evm_domain_runtime::TransactionConverter, DefaultEthConfig< - FullClient< - DomainBlock, - evm_domain_runtime::RuntimeApi, - EVMDomainExecutorDispatch, - >, + FullClient, FullBackend, >, >::new(Some(&evm_base_path), domain_cli.additional_args()); @@ -164,7 +160,6 @@ where _, _, evm_domain_runtime::RuntimeApi, - EVMDomainExecutorDispatch, AccountId20, _, _, diff --git a/crates/subspace-node/Cargo.toml b/crates/subspace-node/Cargo.toml index 84a7910da1..9b6742c1d3 100644 --- a/crates/subspace-node/Cargo.toml +++ b/crates/subspace-node/Cargo.toml @@ -44,7 +44,6 @@ sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-s sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-informant = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-keystore = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } @@ -62,11 +61,9 @@ sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk" sp-domains = { version = "0.1.0", path = "../sp-domains" } sp-domain-digests = { version = "0.1.0", path = "../../domains/primitives/digests" } sp-domains-fraud-proof = { version = "0.1.0", path = "../sp-domains-fraud-proof" } -sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" } sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } -sp-wasm-interface = { version = "14.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space" } @@ -89,8 +86,10 @@ do-not-enforce-cost-of-storage = [ "subspace-runtime/do-not-enforce-cost-of-storage" ] runtime-benchmarks = [ + "domain-service/runtime-benchmarks", + "evm-domain-runtime/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", "subspace-runtime/runtime-benchmarks", - "evm-domain-runtime/runtime-benchmarks", + "subspace-service/runtime-benchmarks", ] diff --git a/crates/subspace-node/src/commands/run.rs b/crates/subspace-node/src/commands/run.rs index 4c8679f59a..e17c9350e8 100644 --- a/crates/subspace-node/src/commands/run.rs +++ b/crates/subspace-node/src/commands/run.rs @@ -23,7 +23,7 @@ use sc_utils::mpsc::tracing_unbounded; use sp_core::traits::SpawnEssentialNamed; use sp_messenger::messages::ChainId; use std::env; -use subspace_runtime::{Block, ExecutorDispatch, RuntimeApi}; +use subspace_runtime::{Block, RuntimeApi}; use tracing::{debug, error, info, info_span, warn}; /// Options for running a node @@ -117,18 +117,17 @@ pub async fn run(run_options: RunOptions) -> Result<(), Error> { let span = info_span!("Consensus"); let _enter = span.enter(); - let partial_components = subspace_service::new_partial::< - PosTable, - RuntimeApi, - ExecutorDispatch, - >(&subspace_configuration, &pot_external_entropy) + let partial_components = subspace_service::new_partial::( + &subspace_configuration, + &pot_external_entropy, + ) .map_err(|error| { sc_service::Error::Other(format!( "Failed to build a full subspace node 1: {error:?}" )) })?; - let full_node_fut = subspace_service::new_full::( + let full_node_fut = subspace_service::new_full::( subspace_configuration, partial_components, true, diff --git a/crates/subspace-node/src/commands/run/domain.rs b/crates/subspace-node/src/commands/run/domain.rs index c63d4ec265..fa6f7af219 100644 --- a/crates/subspace-node/src/commands/run/domain.rs +++ b/crates/subspace-node/src/commands/run/domain.rs @@ -11,8 +11,7 @@ use domain_service::config::{ }; use domain_service::{FullBackend, FullClient}; use evm_domain_runtime::{ - AccountId as AccountId20, ExecutorDispatch as EVMDomainExecutorDispatch, - RuntimeGenesisConfig as EvmRuntimeGenesisConfig, + AccountId as AccountId20, RuntimeGenesisConfig as EvmRuntimeGenesisConfig, }; use futures::StreamExt; use sc_chain_spec::{ChainType, Properties}; @@ -35,7 +34,7 @@ use sp_domains::{DomainId, DomainInstanceData, OperatorId, RuntimeType}; use std::collections::HashMap; use std::net::SocketAddr; use std::sync::Arc; -use subspace_runtime::{ExecutorDispatch as CExecutorDispatch, RuntimeApi as CRuntimeApi}; +use subspace_runtime::RuntimeApi as CRuntimeApi; use subspace_runtime_primitives::opaque::Block as CBlock; use subspace_service::FullClient as CFullClient; use tracing::warn; @@ -367,7 +366,7 @@ pub(super) fn create_domain_configuration( } pub(super) struct DomainStartOptions { - pub(super) consensus_client: Arc>, + pub(super) consensus_client: Arc>, pub(super) consensus_offchain_tx_pool_factory: OffchainTransactionPoolFactory, pub(super) consensus_network: Arc, pub(super) block_importing_notification_stream: @@ -455,11 +454,7 @@ where let eth_provider = EthProvider::< evm_domain_runtime::TransactionConverter, DefaultEthConfig< - FullClient< - DomainBlock, - evm_domain_runtime::RuntimeApi, - EVMDomainExecutorDispatch, - >, + FullClient, FullBackend, >, >::new( @@ -491,7 +486,6 @@ where _, _, evm_domain_runtime::RuntimeApi, - EVMDomainExecutorDispatch, AccountId20, _, _, diff --git a/crates/subspace-node/src/main.rs b/crates/subspace-node/src/main.rs index ae4c9e36ef..ecc142462d 100644 --- a/crates/subspace-node/src/main.rs +++ b/crates/subspace-node/src/main.rs @@ -27,17 +27,15 @@ use crate::cli::{Cli, SubspaceCliPlaceholder}; use crate::domain::{DomainCli, DomainSubcommand}; use clap::Parser; use domain_runtime_primitives::opaque::Block as DomainBlock; -use evm_domain_runtime::ExecutorDispatch as EVMDomainExecutorDispatch; +use domain_service::HostFunctions as DomainHostFunctions; use frame_benchmarking_cli::BenchmarkCmd; use futures::future::TryFutureExt; use sc_cli::{ChainSpec, SubstrateCli}; -use sc_executor::NativeExecutionDispatch; use sc_service::{Configuration, PartialComponents}; use sp_core::crypto::Ss58AddressFormat; -use sp_io::SubstrateHostFunctions; -use sp_wasm_interface::ExtendedHostFunctions; use subspace_proof_of_space::chia::ChiaTable; -use subspace_runtime::{Block, ExecutorDispatch, RuntimeApi}; +use subspace_runtime::{Block, RuntimeApi}; +use subspace_service::HostFunctions; use tracing::warn; #[global_allocator] @@ -140,7 +138,7 @@ fn main() -> Result<(), Error> { import_queue, task_manager, .. - } = subspace_service::new_partial::( + } = subspace_service::new_partial::( &config, &derive_pot_external_entropy(&config, None)?, )?; @@ -158,7 +156,7 @@ fn main() -> Result<(), Error> { client, task_manager, .. - } = subspace_service::new_partial::( + } = subspace_service::new_partial::( &config, &derive_pot_external_entropy(&config, None)?, )?; @@ -177,7 +175,7 @@ fn main() -> Result<(), Error> { client, task_manager, .. - } = subspace_service::new_partial::( + } = subspace_service::new_partial::( &config, &derive_pot_external_entropy(&config, None)?, )?; @@ -197,7 +195,7 @@ fn main() -> Result<(), Error> { import_queue, task_manager, .. - } = subspace_service::new_partial::( + } = subspace_service::new_partial::( &config, &derive_pot_external_entropy(&config, None)?, )?; @@ -219,7 +217,7 @@ fn main() -> Result<(), Error> { backend, task_manager, .. - } = subspace_service::new_partial::( + } = subspace_service::new_partial::( &config, &derive_pot_external_entropy(&config, None)?, )?; @@ -249,20 +247,14 @@ fn main() -> Result<(), Error> { ); } - cmd.run::::ExtendHostFunctions, - >>(config) + cmd.run::(config) } BenchmarkCmd::Block(cmd) => { - let PartialComponents { client, .. } = subspace_service::new_partial::< - PosTable, - RuntimeApi, - ExecutorDispatch, - >( - &config, - &derive_pot_external_entropy(&config, None)?, - )?; + let PartialComponents { client, .. } = + subspace_service::new_partial::( + &config, + &derive_pot_external_entropy(&config, None)?, + )?; cmd.run(client) } @@ -275,7 +267,7 @@ fn main() -> Result<(), Error> { BenchmarkCmd::Storage(cmd) => { let PartialComponents { client, backend, .. - } = subspace_service::new_partial::( + } = subspace_service::new_partial::( &config, &derive_pot_external_entropy(&config, None)?, )?; @@ -349,10 +341,7 @@ fn main() -> Result<(), Error> { .into(), ); } - cmd.run::::ExtendHostFunctions, - >>(domain_config) + cmd.run::(domain_config) } _ => todo!("Not implemented"), } @@ -374,8 +363,8 @@ fn main() -> Result<(), Error> { )) })?; - let executor: sc_executor::NativeElseWasmExecutor = - sc_service::new_native_or_wasm_executor(&domain_config); + let executor = + sc_service::new_wasm_executor::(&domain_config); let (client, _, _, _) = sc_service::new_full_parts::< DomainBlock, diff --git a/crates/subspace-runtime/Cargo.toml b/crates/subspace-runtime/Cargo.toml index e1b143f802..be0823197a 100644 --- a/crates/subspace-runtime/Cargo.toml +++ b/crates/subspace-runtime/Cargo.toml @@ -40,7 +40,6 @@ pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-fe pallet-transporter = { version = "0.1.0", path = "../../domains/pallets/transporter", default-features = false } pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false, version = "4.0.0-dev" } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } @@ -96,7 +95,6 @@ std = [ "pallet-transporter/std", "pallet-utility/std", "scale-info/std", - "sc-executor", "sp-api/std", "sp-block-builder/std", "sp-consensus-subspace/std", diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index 3231d7f59d..e20f6c14d8 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -77,8 +77,6 @@ use sp_runtime::{create_runtime_str, generic, AccountId32, ApplyExtrinsicResult, use sp_std::collections::btree_map::BTreeMap; use sp_std::marker::PhantomData; use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; use sp_version::RuntimeVersion; use static_assertions::const_assert; use subspace_core_primitives::objects::BlockObjectMapping; @@ -120,44 +118,6 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { extrinsic_state_version: 0, }; -/// 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(), - } -} - -/// Executor dispatch for subspace runtime -#[cfg(feature = "std")] -pub struct ExecutorDispatch; - -#[cfg(feature = "std")] -impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { - /// Only enable the benchmarking host functions when we actually want to benchmark. - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = ( - frame_benchmarking::benchmarking::HostFunctions, - sp_consensus_subspace::consensus::HostFunctions, - sp_domains_fraud_proof::HostFunctions, - ); - /// Otherwise we only use the default Substrate host functions. - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = ( - sp_consensus_subspace::consensus::HostFunctions, - sp_domains_fraud_proof::HostFunctions, - ); - - fn dispatch(method: &str, data: &[u8]) -> Option> { - api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - native_version() - } -} - // TODO: Many of below constants should probably be updatable but currently they are not /// Since Subspace is probabilistic this is the average expected block time that diff --git a/crates/subspace-service/Cargo.toml b/crates/subspace-service/Cargo.toml index 8f6ce8da00..0fc87c7127 100644 --- a/crates/subspace-service/Cargo.toml +++ b/crates/subspace-service/Cargo.toml @@ -19,6 +19,7 @@ targets = ["x86_64-unknown-linux-gnu"] async-trait = "0.1.73" cross-domain-message-gossip = { version = "0.1.0", path = "../../domains/client/cross-domain-message-gossip" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } futures = "0.3.29" hex = "0.4.3" jsonrpsee = { version = "0.16.3", features = ["server"] } @@ -59,6 +60,7 @@ sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk" sp-domains = { version = "0.1.0", path = "../sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", path = "../sp-domains-fraud-proof" } sp-externalities = { version = "0.19.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-objects = { version = "0.1.0", path = "../sp-objects" } sp-offchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } @@ -82,4 +84,4 @@ frame-system-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.co pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } [features] -default = [] +runtime-benchmarks = ["dep:frame-benchmarking"] diff --git a/crates/subspace-service/src/lib.rs b/crates/subspace-service/src/lib.rs index 90d20b5bdf..1c9abf4004 100644 --- a/crates/subspace-service/src/lib.rs +++ b/crates/subspace-service/src/lib.rs @@ -65,7 +65,6 @@ use sc_consensus_subspace::slot_worker::{ }; use sc_consensus_subspace::verifier::{SubspaceVerifier, SubspaceVerifierOptions}; use sc_consensus_subspace::SubspaceLink; -use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; use sc_network::{NetworkService, NotificationService}; use sc_proof_of_time::source::gossip::pot_gossip_peers_set_config; use sc_proof_of_time::source::PotSourceWorker; @@ -85,7 +84,7 @@ use sp_consensus_subspace::digests::extract_pre_digest; use sp_consensus_subspace::{ FarmerPublicKey, KzgExtension, PosExtension, PotExtension, PotNextSlotInput, SubspaceApi, }; -use sp_core::traits::{CodeExecutor, SpawnEssentialNamed}; +use sp_core::traits::SpawnEssentialNamed; use sp_core::H256; use sp_domains::{BundleProducerElectionApi, DomainsApi}; use sp_domains_fraud_proof::{FraudProofApi, FraudProofExtension, FraudProofHostFunctionsImpl}; @@ -192,23 +191,42 @@ where } } +/// Host functions required for Subspace +#[cfg(not(feature = "runtime-benchmarks"))] +pub type HostFunctions = ( + sp_io::SubstrateHostFunctions, + sp_consensus_subspace::consensus::HostFunctions, + sp_domains_fraud_proof::HostFunctions, +); + +/// Host functions required for Subspace +#[cfg(feature = "runtime-benchmarks")] +pub type HostFunctions = ( + sp_io::SubstrateHostFunctions, + frame_benchmarking::benchmarking::HostFunctions, + sp_consensus_subspace::consensus::HostFunctions, + sp_domains_fraud_proof::HostFunctions, +); + +/// Runtime executor for Subspace +pub type RuntimeExecutor = sc_executor::WasmExecutor; + /// Subspace-like full client. -pub type FullClient = - sc_service::TFullClient>; +pub type FullClient = sc_service::TFullClient; pub type FullBackend = sc_service::TFullBackend; pub type FullSelectChain = sc_consensus::LongestChain; -struct SubspaceExtensionsFactory { +struct SubspaceExtensionsFactory { kzg: Kzg, client: Arc, pot_verifier: PotVerifier, - executor: Arc, + executor: Arc, _pos_table: PhantomData<(PosTable, DomainBlock)>, } -impl ExtensionsFactory - for SubspaceExtensionsFactory +impl ExtensionsFactory + for SubspaceExtensionsFactory where PosTable: Table, Block: BlockT, @@ -224,7 +242,6 @@ where Client::Api: SubspaceApi + DomainsApi + BundleProducerElectionApi, - ExecutorDispatch: CodeExecutor + sc_executor::RuntimeVersionOf, { fn extensions_for( &self, @@ -341,7 +358,7 @@ where })); exts.register(FraudProofExtension::new(Arc::new( - FraudProofHostFunctionsImpl::<_, _, DomainBlock, ExecutorDispatch>::new( + FraudProofHostFunctionsImpl::<_, _, DomainBlock, RuntimeExecutor>::new( self.client.clone(), self.executor.clone(), ), @@ -352,20 +369,16 @@ where } /// Other partial components returned by [`new_partial()`] -pub struct OtherPartialComponents +pub struct OtherPartialComponents where - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, - ExecutorDispatch: NativeExecutionDispatch + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, { /// Subspace block import pub block_import: SharedBlockImport, /// Subspace link pub subspace_link: SubspaceLink, /// Segment headers store - pub segment_headers_store: SegmentHeadersStore>, + pub segment_headers_store: SegmentHeadersStore>, /// Proof of time verifier pub pot_verifier: PotVerifier, /// Approximate target block number for syncing purposes @@ -374,27 +387,24 @@ where pub telemetry: Option, } -type PartialComponents = sc_service::PartialComponents< - FullClient, +type PartialComponents = sc_service::PartialComponents< + FullClient, FullBackend, FullSelectChain, DefaultImportQueue, - FullPool, Block, DomainHeader>, - OtherPartialComponents, + FullPool, Block, DomainHeader>, + OtherPartialComponents, >; /// Creates `PartialComponents` for Subspace client. #[allow(clippy::type_complexity)] -pub fn new_partial( +pub fn new_partial( config: &Configuration, pot_external_entropy: &[u8], -) -> Result, ServiceError> +) -> Result, ServiceError> where PosTable: Table, - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: ApiExt + Metadata + BlockBuilder @@ -406,7 +416,6 @@ where + FraudProofApi + BundleProducerElectionApi + ObjectsApi, - ExecutorDispatch: NativeExecutionDispatch + 'static, { let telemetry = config .telemetry_endpoints @@ -419,7 +428,7 @@ where }) .transpose()?; - let executor = sc_service::new_native_or_wasm_executor(config); + let executor = sc_service::new_wasm_executor(config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( @@ -442,7 +451,7 @@ where client .execution_extensions() - .set_extensions_factory(SubspaceExtensionsFactory:: { + .set_extensions_factory(SubspaceExtensionsFactory:: { kzg: kzg.clone(), client: Arc::clone(&client), pot_verifier: pot_verifier.clone(), @@ -601,21 +610,18 @@ where pub transaction_pool: Arc>, } -type FullNode = NewFull>; +type FullNode = NewFull>; /// Builds a new service for a full client. -pub async fn new_full( +pub async fn new_full( mut config: SubspaceConfiguration, - partial_components: PartialComponents, + partial_components: PartialComponents, enable_rpc_extensions: bool, block_proposal_slot_portion: SlotProportion, -) -> Result, Error> +) -> Result, Error> where PosTable: Table, - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: ApiExt + Metadata + AccountNonceApi @@ -628,7 +634,6 @@ where + DomainsApi + FraudProofApi + ObjectsApi, - ExecutorDispatch: NativeExecutionDispatch + 'static, { let PartialComponents { client, diff --git a/domains/client/eth-service/Cargo.toml b/domains/client/eth-service/Cargo.toml index 38ee5c2c36..9335c0ebec 100644 --- a/domains/client/eth-service/Cargo.toml +++ b/domains/client/eth-service/Cargo.toml @@ -27,7 +27,6 @@ jsonrpsee = { version = "0.16.3", features = ["server"] } pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } parity-scale-codec = "3.6.5" sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } diff --git a/domains/client/eth-service/src/provider.rs b/domains/client/eth-service/src/provider.rs index 234bcb3a01..0f3abd17f6 100644 --- a/domains/client/eth-service/src/provider.rs +++ b/domains/client/eth-service/src/provider.rs @@ -14,7 +14,6 @@ use fp_rpc::{ConvertTransaction, ConvertTransactionRuntimeApi, EthereumRuntimeRP use jsonrpsee::RpcModule; use parity_scale_codec::{Decode, Encode}; use sc_client_api::{AuxStore, Backend, BlockBackend, BlockchainEvents, StorageProvider}; -use sc_executor::NativeExecutionDispatch; use sc_rpc::{RpcSubscriptionIdProvider, SubscriptionTaskExecutor}; use sc_service::BasePath; use sc_transaction_pool::ChainApi; @@ -56,29 +55,21 @@ impl EthProvider { } } -impl - BlockImportProvider> +impl BlockImportProvider> for EthProvider where Block: BlockT, - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: ApiExt + Core + BlockBuilder + EthereumRuntimeRPCApi, - ExecutorDispatch: NativeExecutionDispatch + 'static, { type BI = FrontierBlockImport< Block, - Arc>, - FullClient, + Arc>, + FullClient, >; - fn block_import( - &self, - client: Arc>, - ) -> Self::BI { + fn block_import(&self, client: Arc>) -> Self::BI { FrontierBlockImport::new(client.clone(), client) } } diff --git a/domains/runtime/evm/Cargo.toml b/domains/runtime/evm/Cargo.toml index 2771359397..599d3f7e30 100644 --- a/domains/runtime/evm/Cargo.toml +++ b/domains/runtime/evm/Cargo.toml @@ -45,7 +45,6 @@ pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } @@ -99,7 +98,6 @@ std = [ "pallet-transaction-payment/std", "pallet-transporter/std", "scale-info/std", - "sc-executor", "sp-api/std", "sp-block-builder/std", "sp-core/std", diff --git a/domains/runtime/evm/src/lib.rs b/domains/runtime/evm/src/lib.rs index 24042c9572..8ba5754f2a 100644 --- a/domains/runtime/evm/src/lib.rs +++ b/domains/runtime/evm/src/lib.rs @@ -63,8 +63,6 @@ use sp_runtime::{ 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, SlowAdjustingFeeUpdate}; @@ -223,35 +221,6 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { extrinsic_state_version: 1, }; -/// 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(), - } -} - -/// EVM domain executor instance. -#[cfg(feature = "std")] -pub struct ExecutorDispatch; - -#[cfg(feature = "std")] -impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = (); - - fn dispatch(method: &str, data: &[u8]) -> Option> { - api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - native_version() - } -} - parameter_types! { pub const Version: RuntimeVersion = VERSION; pub const BlockHashCount: BlockNumber = 2400; diff --git a/domains/service/Cargo.toml b/domains/service/Cargo.toml index 848614aec0..5df9493941 100644 --- a/domains/service/Cargo.toml +++ b/domains/service/Cargo.toml @@ -21,11 +21,13 @@ domain-client-message-relayer = { version = "0.1.0", path = "../client/relayer" domain-client-operator = { version = "0.1.0", path = "../client/domain-operator" } domain-client-subnet-gossip = { version = "0.1.0", path = "../client/subnet-gossip" } domain-runtime-primitives = { version = "0.1.0", path = "../primitives/runtime" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } futures = "0.3.29" jsonrpsee = { version = "0.16.3", features = ["server"] } log = "0.4.20" pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } parity-scale-codec = "3.6.5" +sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } @@ -66,3 +68,6 @@ tracing = "0.1.37" [build-dependencies] substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } + +[features] +runtime-benchmarks = ["dep:frame-benchmarking"] diff --git a/domains/service/src/domain.rs b/domains/service/src/domain.rs index bafa10b0d5..8970f5b7a5 100644 --- a/domains/service/src/domain.rs +++ b/domains/service/src/domain.rs @@ -1,6 +1,6 @@ use crate::providers::{BlockImportProvider, RpcProvider}; use crate::transaction_pool::FullChainApiWrapper; -use crate::{FullBackend, FullClient}; +use crate::{FullBackend, FullClient, RuntimeExecutor}; use cross_domain_message_gossip::ChainTxPoolMsg; use domain_client_block_preprocessor::inherents::CreateInherentDataProvider; use domain_client_message_relayer::GossipMessageSink; @@ -12,7 +12,6 @@ use futures::Stream; use pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi; use sc_client_api::{BlockBackend, BlockImportNotification, BlockchainEvents, ProofProvider}; use sc_consensus::SharedBlockImport; -use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; use sc_network::NetworkPeers; use sc_rpc_api::DenyUnsafe; use sc_service::{ @@ -46,18 +45,18 @@ use subspace_core_primitives::Randomness; use subspace_runtime_primitives::Nonce; use substrate_frame_rpc_system::AccountNonceApi; -pub type DomainOperator = Operator< +pub type DomainOperator = Operator< Block, CBlock, - FullClient, + FullClient, CClient, - FullPool, + FullPool, FullBackend, - NativeElseWasmExecutor, + RuntimeExecutor, >; /// Domain full node along with some other components. -pub struct NewFull +pub struct NewFull where Block: BlockT, CBlock: BlockT, @@ -70,10 +69,7 @@ where + Sync + 'static, CClient::Api: DomainsApi + MessengerApi>, - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: ApiExt + Metadata + AccountNonceApi @@ -85,7 +81,6 @@ where + DomainCoreApi + MessengerApi> + RelayerApi>, - ExecutorDispatch: NativeExecutionDispatch + 'static, AccountId: Encode + Decode, { /// Task manager. @@ -105,37 +100,32 @@ where /// Network starter. pub network_starter: NetworkStarter, /// Operator. - pub operator: DomainOperator, + pub operator: DomainOperator, /// Transaction pool - pub transaction_pool: Arc>, + pub transaction_pool: Arc>, _phantom_data: PhantomData, } -pub type FullPool = - crate::transaction_pool::FullPool< - CClient, - CBlock, - Block, - FullClient, - >; +pub type FullPool = + crate::transaction_pool::FullPool>; /// Constructs a partial domain node. #[allow(clippy::type_complexity)] -fn new_partial( +fn new_partial( config: &ServiceConfiguration, consensus_client: Arc, block_import_provider: &BIMP, ) -> Result< PartialComponents< - FullClient, + FullClient, FullBackend, (), sc_consensus::DefaultImportQueue, - FullPool, + FullPool, ( Option, Option, - NativeElseWasmExecutor, + RuntimeExecutor, SharedBlockImport, ), >, @@ -152,14 +142,10 @@ where + Sync + 'static, CClient::Api: DomainsApi + MessengerApi>, - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: TaggedTransactionQueue + MessengerApi> + ApiExt, - ExecutorDispatch: NativeExecutionDispatch + 'static, - BIMP: BlockImportProvider>, + BIMP: BlockImportProvider>, { let telemetry = config .telemetry_endpoints @@ -172,7 +158,7 @@ where }) .transpose()?; - let executor = sc_service::new_native_or_wasm_executor(config); + let executor = sc_service::new_wasm_executor(config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts( config, @@ -249,7 +235,6 @@ pub async fn new_full< NSNS, ASS, RuntimeApi, - ExecutorDispatch, AccountId, Provider, CNetwork, @@ -257,12 +242,11 @@ pub async fn new_full< domain_params: DomainParams, ) -> sc_service::error::Result< NewFull< - Arc>, - NativeElseWasmExecutor, + Arc>, + RuntimeExecutor, CBlock, CClient, RuntimeApi, - ExecutorDispatch, AccountId, >, > @@ -288,10 +272,7 @@ where CIBNS: Stream> + Send + 'static, NSNS: Stream + Send + 'static, ASS: Stream> + Send + 'static, - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: ApiExt + Metadata + BlockBuilder @@ -303,7 +284,6 @@ where + AccountNonceApi + TransactionPaymentRuntimeApi + RelayerApi>, - ExecutorDispatch: NativeExecutionDispatch + 'static, AccountId: DeserializeOwned + Encode + Decode @@ -316,18 +296,13 @@ where + 'static, Provider: RpcProvider< Block, - FullClient, - FullPool, - FullChainApiWrapper< - CClient, - CBlock, - Block, - FullClient, - >, + FullClient, + FullPool, + FullChainApiWrapper>, TFullBackend, AccountId, CreateInherentDataProvider, - > + BlockImportProvider> + > + BlockImportProvider> + 'static, CNetwork: NetworkPeers + Send + Sync + 'static, { diff --git a/domains/service/src/lib.rs b/domains/service/src/lib.rs index cfd4212a02..06e6b245e4 100644 --- a/domains/service/src/lib.rs +++ b/domains/service/src/lib.rs @@ -11,7 +11,6 @@ use futures::channel::oneshot; use futures::{FutureExt, StreamExt}; use sc_client_api::{BlockBackend, BlockchainEvents, HeaderBackend, ProofProvider}; use sc_consensus::ImportQueue; -use sc_executor::NativeElseWasmExecutor; use sc_network::config::Roles; use sc_network::peer_store::PeerStore; use sc_network::NetworkService; @@ -33,9 +32,22 @@ use sp_consensus::block_validation::{Chain, DefaultBlockAnnounceValidator}; use sp_runtime::traits::{Block as BlockT, BlockIdTo, Zero}; use std::sync::Arc; +/// Host functions required for Subspace domain +#[cfg(not(feature = "runtime-benchmarks"))] +pub type HostFunctions = (sp_io::SubstrateHostFunctions,); + +/// Host functions required for Subspace domain +#[cfg(feature = "runtime-benchmarks")] +pub type HostFunctions = ( + sp_io::SubstrateHostFunctions, + frame_benchmarking::benchmarking::HostFunctions, +); + +/// Runtime executor for Subspace domain +pub type RuntimeExecutor = sc_executor::WasmExecutor; + /// Domain full client. -pub type FullClient = - TFullClient>; +pub type FullClient = TFullClient; pub type FullBackend = sc_service::TFullBackend; diff --git a/domains/service/src/providers.rs b/domains/service/src/providers.rs index e6ab64289c..8f175a6bbc 100644 --- a/domains/service/src/providers.rs +++ b/domains/service/src/providers.rs @@ -5,7 +5,6 @@ use jsonrpsee::RpcModule; use parity_scale_codec::{Decode, Encode}; use sc_client_api::{AuxStore, Backend, BlockBackend, StorageProvider}; use sc_consensus::BlockImport; -use sc_executor::NativeExecutionDispatch; use sc_rpc::{RpcSubscriptionIdProvider, SubscriptionTaskExecutor}; use sc_transaction_pool::ChainApi; use sc_transaction_pool_api::TransactionPool; @@ -31,23 +30,16 @@ where #[derive(Clone)] pub struct DefaultProvider; -impl - BlockImportProvider> for DefaultProvider +impl BlockImportProvider> + for DefaultProvider where Block: BlockT, - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: ApiExt + Core, - ExecutorDispatch: NativeExecutionDispatch + 'static, { - type BI = Arc>; + type BI = Arc>; - fn block_import( - &self, - client: Arc>, - ) -> Self::BI { + fn block_import(&self, client: Arc>) -> Self::BI { client } } diff --git a/domains/test/runtime/evm/src/lib.rs b/domains/test/runtime/evm/src/lib.rs index e5256b3f2c..e4630f2ec9 100644 --- a/domains/test/runtime/evm/src/lib.rs +++ b/domains/test/runtime/evm/src/lib.rs @@ -62,8 +62,6 @@ use sp_runtime::{ 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; @@ -222,15 +220,6 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { extrinsic_state_version: 1, }; -/// 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; diff --git a/domains/test/service/Cargo.toml b/domains/test/service/Cargo.toml index ce485bb81e..41520ff522 100644 --- a/domains/test/service/Cargo.toml +++ b/domains/test/service/Cargo.toml @@ -26,7 +26,6 @@ rand = "0.8.5" pallet-transaction-payment = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } diff --git a/domains/test/service/src/domain.rs b/domains/test/service/src/domain.rs index e6bd110521..a65b1a6f67 100644 --- a/domains/test/service/src/domain.rs +++ b/domains/test/service/src/domain.rs @@ -10,7 +10,7 @@ use domain_client_operator::{fetch_domain_bootstrap_info, BootstrapResult, Opera use domain_runtime_primitives::opaque::Block; use domain_runtime_primitives::{Balance, DomainCoreApi}; use domain_service::providers::DefaultProvider; -use domain_service::FullClient; +use domain_service::{FullClient, RuntimeExecutor}; use domain_test_primitives::OnchainStateApi; use evm_domain_test_runtime; use evm_domain_test_runtime::AccountId as AccountId20; @@ -19,7 +19,6 @@ use frame_support::dispatch::{DispatchInfo, PostDispatchInfo}; use frame_system::pallet_prelude::BlockNumberFor; use pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi; use sc_client_api::HeaderBackend; -use sc_executor::NativeExecutionDispatch; use sc_network::{NetworkService, NetworkStateInfo}; use sc_network_sync::SyncingService; use sc_service::config::MultiaddrWithPeerId; @@ -66,22 +65,16 @@ impl FromKeyring for AccountId20 { /// The backend type used by the test service. pub type Backend = TFullBackend; -type Client = FullClient; +type Client = FullClient; /// Domain executor for the test service. -pub type DomainOperator = domain_service::DomainOperator< - Block, - CBlock, - subspace_test_client::Client, - RuntimeApi, - ExecutorDispatch, ->; +pub type DomainOperator = + domain_service::DomainOperator; /// A generic domain node instance used for testing. -pub struct DomainNode +pub struct DomainNode where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: ApiExt + Metadata + BlockBuilder @@ -93,7 +86,6 @@ where + AccountNonceApi + TransactionPaymentRuntimeApi + RelayerApi>, - ExecutorDispatch: NativeExecutionDispatch + Send + Sync + 'static, AccountId: Encode + Decode + FromKeyring, { /// The domain id @@ -105,11 +97,11 @@ where /// TaskManager's instance. pub task_manager: TaskManager, /// Client's instance. - pub client: Arc>, + pub client: Arc>, /// Client backend. pub backend: Arc, /// Code executor. - pub code_executor: Arc>, + pub code_executor: Arc, /// Network service. pub network_service: Arc>, /// Sync service. @@ -120,22 +112,20 @@ where /// RPCHandlers to make RPC queries. pub rpc_handlers: RpcHandlers, /// Domain oeprator. - pub operator: DomainOperator, + pub operator: DomainOperator, /// Sink to the node's tx pool pub tx_pool_sink: TracingUnboundedSender, _phantom_data: PhantomData<(Runtime, AccountId)>, } -impl - DomainNode +impl DomainNode where Runtime: frame_system::Config + pallet_transaction_payment::Config + Send + Sync, Runtime::RuntimeCall: Dispatchable + Send + Sync, crate::BalanceOf: Send + Sync + From + sp_runtime::FixedPointOperand, u64: From>, - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: ApiExt + Metadata + BlockBuilder @@ -149,7 +139,6 @@ where + RelayerApi> + OnchainStateApi + EthereumRuntimeRPCApi, - ExecutorDispatch: NativeExecutionDispatch + Send + Sync + 'static, AccountId: DeserializeOwned + Encode + Decode @@ -240,21 +229,12 @@ where maybe_operator_id, }; - let domain_node = domain_service::new_full::< - _, - _, - _, - _, - _, - _, - RuntimeApi, - ExecutorDispatch, - AccountId, - _, - _, - >(domain_params) - .await - .expect("failed to build domain node"); + let domain_node = + domain_service::new_full::<_, _, _, _, _, _, RuntimeApi, AccountId, _, _>( + domain_params, + ) + .await + .expect("failed to build domain node"); let domain_service::NewFull { task_manager, @@ -470,28 +450,9 @@ impl DomainNodeBuilder { } } -/// Evm domain executor instance. -pub struct EVMDomainExecutorDispatch; - -impl NativeExecutionDispatch for EVMDomainExecutorDispatch { - type ExtendHostFunctions = (); - - fn dispatch(method: &str, data: &[u8]) -> Option> { - evm_domain_test_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - evm_domain_test_runtime::native_version() - } -} - /// The evm domain node -pub type EvmDomainNode = DomainNode< - evm_domain_test_runtime::Runtime, - evm_domain_test_runtime::RuntimeApi, - EVMDomainExecutorDispatch, - AccountId20, ->; +pub type EvmDomainNode = + DomainNode; /// The evm domain client -pub type EvmDomainClient = Client; +pub type EvmDomainClient = Client; diff --git a/test/subspace-test-client/Cargo.toml b/test/subspace-test-client/Cargo.toml index 9a5513d7f0..91f9ed8b8e 100644 --- a/test/subspace-test-client/Cargo.toml +++ b/test/subspace-test-client/Cargo.toml @@ -23,13 +23,11 @@ schnorrkel = "0.9.1" sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-consensus-subspace = { version = "0.1.0", path = "../../crates/sc-consensus-subspace" } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false } sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", path = "../../crates/sp-consensus-subspace" } sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-domains = { version = "0.1.0", path = "../../crates/sp-domains" } -sp-domains-fraud-proof = { version = "0.1.0", path = "../../crates/sp-domains-fraud-proof" } sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-archiving = { path = "../../crates/subspace-archiving" } subspace-core-primitives = { path = "../../crates/subspace-core-primitives" } diff --git a/test/subspace-test-client/src/lib.rs b/test/subspace-test-client/src/lib.rs index 071f62fdb7..deaaa8d518 100644 --- a/test/subspace-test-client/src/lib.rs +++ b/test/subspace-test-client/src/lib.rs @@ -51,26 +51,8 @@ use zeroize::Zeroizing; // Smaller value for testing purposes const MAX_PIECES_IN_SECTOR: u16 = 32; -/// Subspace native executor instance. -pub struct TestExecutorDispatch; - -impl sc_executor::NativeExecutionDispatch for TestExecutorDispatch { - type ExtendHostFunctions = ( - sp_consensus_subspace::consensus::HostFunctions, - sp_domains_fraud_proof::HostFunctions, - ); - - fn dispatch(method: &str, data: &[u8]) -> Option> { - subspace_test_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - subspace_test_runtime::native_version() - } -} - /// The client type being used by the test service. -pub type Client = FullClient; +pub type Client = FullClient; /// The backend type being used by the test service. pub type Backend = sc_service::TFullBackend; diff --git a/test/subspace-test-runtime/src/lib.rs b/test/subspace-test-runtime/src/lib.rs index 4160dc7155..9b6bfadbe4 100644 --- a/test/subspace-test-runtime/src/lib.rs +++ b/test/subspace-test-runtime/src/lib.rs @@ -75,8 +75,6 @@ use sp_std::collections::btree_map::BTreeMap; use sp_std::iter::Peekable; use sp_std::marker::PhantomData; use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; use sp_version::RuntimeVersion; use static_assertions::const_assert; use subspace_core_primitives::objects::{BlockObject, BlockObjectMapping}; @@ -122,15 +120,6 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { extrinsic_state_version: 0, }; -/// 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(), - } -} - /// The smallest unit of the token is called Shannon. pub const SHANNON: Balance = 1; /// Subspace Credits have 18 decimal places. diff --git a/test/subspace-test-service/src/lib.rs b/test/subspace-test-service/src/lib.rs index 0bdb18aa24..6b6e812781 100644 --- a/test/subspace-test-service/src/lib.rs +++ b/test/subspace-test-service/src/lib.rs @@ -34,7 +34,6 @@ use sc_consensus::block_import::{ use sc_consensus::{ BasicQueue, BlockImport, SharedBlockImport, StateAction, Verifier as VerifierT, }; -use sc_executor::NativeElseWasmExecutor; use sc_network::config::{NetworkConfiguration, TransportConfig}; use sc_network::{multiaddr, NotificationService}; use sc_service::config::{ @@ -78,8 +77,8 @@ use subspace_core_primitives::{Randomness, Solution}; use subspace_runtime_primitives::opaque::Block; use subspace_runtime_primitives::{AccountId, Balance, Hash}; use subspace_service::transaction_pool::FullPool; -use subspace_service::FullSelectChain; -use subspace_test_client::{chain_spec, Backend, Client, TestExecutorDispatch}; +use subspace_service::{FullSelectChain, RuntimeExecutor}; +use subspace_test_client::{chain_spec, Backend, Client}; use subspace_test_runtime::{RuntimeApi, RuntimeCall, UncheckedExtrinsic, SLOT_DURATION}; type FraudProofFor = @@ -226,7 +225,7 @@ pub struct MockConsensusNode { /// Backend. pub backend: Arc, /// Code executor. - pub executor: NativeElseWasmExecutor, + pub executor: RuntimeExecutor, /// Transaction pool. pub transaction_pool: Arc>, /// The SelectChain Strategy @@ -280,7 +279,7 @@ impl MockConsensusNode { ); let _enter = span.enter(); - let executor = sc_service::new_native_or_wasm_executor(&config); + let executor = sc_service::new_wasm_executor(&config); let (client, backend, keystore_container, mut task_manager) = sc_service::new_full_parts::(&config, None, executor.clone()) From 107f7562e14eb4854552a312ab7d5016eb714a53 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Wed, 17 Jan 2024 15:10:34 +0200 Subject: [PATCH 5/6] Delete `domain-client-subnet-gossip` as unused and unnecessary --- Cargo.lock | 19 -- domains/client/subnet-gossip/Cargo.toml | 19 -- domains/client/subnet-gossip/src/lib.rs | 316 --------------------- domains/client/subnet-gossip/src/worker.rs | 88 ------ domains/service/Cargo.toml | 1 - 5 files changed, 443 deletions(-) delete mode 100644 domains/client/subnet-gossip/Cargo.toml delete mode 100644 domains/client/subnet-gossip/src/lib.rs delete mode 100644 domains/client/subnet-gossip/src/worker.rs diff --git a/Cargo.lock b/Cargo.lock index 001e3730f7..7163b99ae1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2612,24 +2612,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "domain-client-subnet-gossip" -version = "0.1.0" -dependencies = [ - "futures", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-utils", - "sp-core", - "sp-domains", - "sp-runtime", - "subspace-runtime-primitives", - "tracing", -] - [[package]] name = "domain-eth-service" version = "0.1.0" @@ -2713,7 +2695,6 @@ dependencies = [ "domain-client-consensus-relay-chain", "domain-client-message-relayer", "domain-client-operator", - "domain-client-subnet-gossip", "domain-runtime-primitives", "frame-benchmarking", "futures", diff --git a/domains/client/subnet-gossip/Cargo.toml b/domains/client/subnet-gossip/Cargo.toml deleted file mode 100644 index d5e80ed5c2..0000000000 --- a/domains/client/subnet-gossip/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "domain-client-subnet-gossip" -version = "0.1.0" -authors = ["Liu-Cheng Xu "] -edition = "2021" - -[dependencies] -futures = "0.3.29" -parity-scale-codec = { version = "3.6.5", features = ["derive"] } -parking_lot = "0.12.1" -sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } -sc-network-common = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } -sc-network-gossip = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } -sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } -sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains" } -sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } -subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } -tracing = "0.1.37" diff --git a/domains/client/subnet-gossip/src/lib.rs b/domains/client/subnet-gossip/src/lib.rs deleted file mode 100644 index fde6e9b60f..0000000000 --- a/domains/client/subnet-gossip/src/lib.rs +++ /dev/null @@ -1,316 +0,0 @@ -//! This crate is intended to provide the feature of gossiping bundles over the domain subnet. -//! However, it's unused at present as it's not yet fully implemented. -//! -//! We may enable this feature in the future: -//! 1. Implement the [`GossipMessageHandler`] somewhere. -//! 2. Run the gossip worker using `start_gossip_worker` when building the service. - -mod worker; - -use self::worker::GossipWorker; -use parity_scale_codec::{Decode, Encode}; -use parking_lot::{Mutex, RwLock}; -use sc_network::config::NonDefaultSetConfig; -use sc_network::{NotificationService, PeerId}; -use sc_network_common::role::ObservedRole; -use sc_network_gossip::{ - GossipEngine, MessageIntent, Network as GossipNetwork, Syncing as GossipSyncing, - ValidationResult, Validator, ValidatorContext, -}; -use sc_utils::mpsc::TracingUnboundedReceiver; -use sp_core::hashing::twox_64; -use sp_domains::Bundle; -use sp_runtime::traits::{Block as BlockT, Hash as HashT, Header as HeaderT, NumberFor}; -use std::collections::HashSet; -use std::fmt::Debug; -use std::marker::PhantomData; -use std::sync::Arc; -use std::time::{Duration, Instant}; -use subspace_runtime_primitives::Balance; - -const LOG_TARGET: &str = "gossip::operator"; - -const DOMAIN_SUBNET_PROTOCOL_NAME: &str = "/subspace/operator/1"; - -type BundleFor = Bundle< - ::Extrinsic, - NumberFor, - ::Hash, - ::Header, - Balance, ->; - -// TODO: proper timeout -/// Timeout for rebroadcasting messages. -/// The default value used in network-gossip is 1100ms. -const REBROADCAST_AFTER: Duration = Duration::from_secs(6); - -type MessageHash = [u8; 8]; - -/// Returns the configuration value to use in -/// [`sc_network::config::FullNetworkConfiguration::add_notification_protocol`]. -pub fn domain_subnet_gossip_peers_set_config() -> (NonDefaultSetConfig, Box) -{ - let (mut cfg, notification_service) = NonDefaultSetConfig::new( - DOMAIN_SUBNET_PROTOCOL_NAME.into(), - Vec::new(), - 1024 * 1024, - None, - Default::default(), - ); - cfg.allow_non_reserved(25, 25); - (cfg, notification_service) -} - -/// Gossip engine messages topic. -fn topic() -> Block::Hash { - <::Hashing as HashT>::hash(b"operator") -} - -/// Operator gossip message type. -/// -/// This is the root type that gets encoded and sent on the network. -#[derive(Debug, Encode, Decode)] -pub enum GossipMessage { - Bundle(BundleFor), -} - -impl From> - for GossipMessage -{ - #[inline] - fn from(bundle: BundleFor) -> Self { - Self::Bundle(bundle) - } -} - -/// What to do with the successfully verified gossip message. -#[derive(Debug)] -pub enum Action { - /// The message does not have to be re-gossiped. - Empty, - /// Gossip the bundle message to other peers. - RebroadcastBundle, - /// Gossip the execution exceipt message to other peers. - RebroadcastExecutionReceipt, -} - -impl Action { - fn rebroadcast_bundle(&self) -> bool { - matches!(self, Self::RebroadcastBundle) - } -} - -/// Handler for the messages received from the domain subnet. -pub trait GossipMessageHandler -where - CBlock: BlockT, - Block: BlockT, -{ - /// Error type. - type Error: Debug; - - /// Validates and applies when a transaction bundle was received. - fn on_bundle(&self, bundle: &BundleFor) -> Result; -} - -/// Validator for the gossip messages. -pub struct GossipValidator -where - CBlock: BlockT, - Block: BlockT, - Operator: GossipMessageHandler, -{ - topic: Block::Hash, - executor: Operator, - next_rebroadcast: Mutex, - known_rebroadcasted: RwLock>, - _phantom_data: PhantomData, -} - -impl GossipValidator -where - CBlock: BlockT, - Block: BlockT, - Operator: GossipMessageHandler, -{ - pub fn new(executor: Operator) -> Self { - Self { - topic: topic::(), - executor, - next_rebroadcast: Mutex::new(Instant::now() + REBROADCAST_AFTER), - known_rebroadcasted: RwLock::new(HashSet::new()), - _phantom_data: PhantomData, - } - } - - pub(crate) fn note_rebroadcasted(&self, encoded_message: &[u8]) { - let mut known_rebroadcasted = self.known_rebroadcasted.write(); - known_rebroadcasted.insert(twox_64(encoded_message)); - } - - fn validate_message(&self, msg: GossipMessage) -> ValidationResult { - match msg { - GossipMessage::Bundle(bundle) => { - let outcome = self.executor.on_bundle(&bundle); - match outcome { - Ok(action) if action.rebroadcast_bundle() => { - ValidationResult::ProcessAndKeep(self.topic) - } - Err(err) => { - tracing::debug!( - target: LOG_TARGET, - ?err, - "Invalid GossipMessage::Bundle discarded" - ); - ValidationResult::Discard - } - _ => ValidationResult::ProcessAndDiscard(self.topic), - } - } - } - } -} - -impl Validator for GossipValidator -where - CBlock: BlockT, - Block: BlockT, - Operator: GossipMessageHandler + Send + Sync, -{ - fn new_peer( - &self, - _context: &mut dyn ValidatorContext, - _who: &PeerId, - _role: ObservedRole, - ) { - } - - fn peer_disconnected(&self, _context: &mut dyn ValidatorContext, _who: &PeerId) {} - - fn validate( - &self, - _context: &mut dyn ValidatorContext, - _sender: &PeerId, - mut data: &[u8], - ) -> ValidationResult { - match GossipMessage::::decode(&mut data) { - Ok(msg) => { - tracing::debug!(target: LOG_TARGET, ?msg, "Validating incoming message"); - self.validate_message(msg) - } - Err(err) => { - tracing::debug!( - target: LOG_TARGET, - ?err, - ?data, - "Message discarded due to the decoding error" - ); - ValidationResult::Discard - } - } - } - - /// Produce a closure for validating messages on a given topic. - /// - /// The gossip engine will periodically prune old or no longer relevant messages using - /// `message_expired`. - fn message_expired<'a>(&'a self) -> Box bool + 'a> { - Box::new(move |_topic, mut data| { - let msg_hash = twox_64(data); - // TODO: can be expired due to the message itself might be too old? - let _msg = match GossipMessage::::decode(&mut data) { - Ok(msg) => msg, - Err(_) => return true, - }; - let expired = { - let known_rebroadcasted = self.known_rebroadcasted.read(); - known_rebroadcasted.contains(&msg_hash) - }; - if expired { - let mut known_rebroadcasted = self.known_rebroadcasted.write(); - known_rebroadcasted.remove(&msg_hash); - } - expired - }) - } - - /// Produce a closure for filtering egress messages. - /// - /// Called before actually sending a message to a peer. - fn message_allowed<'a>( - &'a self, - ) -> Box bool + 'a> { - let do_rebroadcast = { - let now = Instant::now(); - let mut next_rebroadcast = self.next_rebroadcast.lock(); - if now >= *next_rebroadcast { - *next_rebroadcast = now + REBROADCAST_AFTER; - true - } else { - false - } - }; - - Box::new(move |_who, intent, _topic, mut data| { - if let MessageIntent::PeriodicRebroadcast = intent { - return do_rebroadcast; - } - - GossipMessage::::decode(&mut data).is_ok() - }) - } -} - -type BundleReceiver = TracingUnboundedReceiver>; - -/// Parameters to run the executor gossip service. -pub struct ExecutorGossipParams { - /// Substrate network service. - pub network: Network, - /// Executor gossip notification service. - pub notification_service: Box, - /// Syncing service an event stream for peers. - pub sync: Arc, - /// Operator instance. - pub operator: Operator, - /// Stream of transaction bundle produced locally. - pub bundle_receiver: BundleReceiver, -} - -/// Starts the executor gossip worker. -pub async fn start_gossip_worker( - gossip_params: ExecutorGossipParams, -) where - CBlock: BlockT, - Block: BlockT, - Network: GossipNetwork + Send + Sync + Clone + 'static, - Operator: GossipMessageHandler + Send + Sync + 'static, - GossipSync: GossipSyncing + 'static, -{ - let ExecutorGossipParams { - network, - notification_service, - sync, - operator, - bundle_receiver, - } = gossip_params; - - let gossip_validator = Arc::new(GossipValidator::new(operator)); - let gossip_engine = GossipEngine::new( - network, - sync, - notification_service, - DOMAIN_SUBNET_PROTOCOL_NAME, - gossip_validator.clone(), - None, - ); - - let gossip_worker = GossipWorker::new( - gossip_validator, - Arc::new(Mutex::new(gossip_engine)), - bundle_receiver, - ); - - gossip_worker.run().await -} diff --git a/domains/client/subnet-gossip/src/worker.rs b/domains/client/subnet-gossip/src/worker.rs deleted file mode 100644 index 5b05833d13..0000000000 --- a/domains/client/subnet-gossip/src/worker.rs +++ /dev/null @@ -1,88 +0,0 @@ -use crate::{ - topic, BundleFor, BundleReceiver, GossipMessage, GossipMessageHandler, GossipValidator, - LOG_TARGET, -}; -use futures::{FutureExt, StreamExt}; -use parity_scale_codec::{Decode, Encode}; -use parking_lot::Mutex; -use sc_network_gossip::GossipEngine; -use sp_runtime::traits::Block as BlockT; -use std::future::poll_fn; -use std::pin::pin; -use std::sync::Arc; - -/// A worker plays the executor gossip protocol. -pub struct GossipWorker -where - CBlock: BlockT, - Block: BlockT, - Executor: GossipMessageHandler, -{ - gossip_validator: Arc>, - gossip_engine: Arc>>, - bundle_receiver: BundleReceiver, -} - -impl GossipWorker -where - CBlock: BlockT, - Block: BlockT, - Executor: GossipMessageHandler, -{ - pub(super) fn new( - gossip_validator: Arc>, - gossip_engine: Arc>>, - bundle_receiver: BundleReceiver, - ) -> Self { - Self { - gossip_validator, - gossip_engine, - bundle_receiver, - } - } - - fn gossip_bundle(&self, bundle: BundleFor) { - let outgoing_message: GossipMessage = bundle.into(); - let encoded_message = outgoing_message.encode(); - self.gossip_validator.note_rebroadcasted(&encoded_message); - self.gossip_engine - .lock() - .gossip_message(topic::(), encoded_message, false); - } - - pub(super) async fn run(mut self) { - let incoming = pin!(self - .gossip_engine - .lock() - .messages_for(topic::()) - .filter_map(|notification| async move { - GossipMessage::::decode(&mut ¬ification.message[..]).ok() - })); - let mut incoming = incoming.fuse(); - - loop { - let engine = self.gossip_engine.clone(); - let mut gossip_engine = poll_fn(|cx| engine.lock().poll_unpin(cx)).fuse(); - - futures::select! { - gossip_message = incoming.next() => { - if let Some(message) = gossip_message { - tracing::debug!(target: LOG_TARGET, ?message, "Rebroadcasting an executor gossip message"); - match message { - GossipMessage::Bundle(bundle) => self.gossip_bundle(bundle), - } - } else { - return - } - } - bundle = self.bundle_receiver.select_next_some() => { - self.gossip_bundle(bundle); - } - _ = gossip_engine => { - tracing::error!(target: LOG_TARGET, "Gossip engine has terminated."); - return; - } - } - } - } -} diff --git a/domains/service/Cargo.toml b/domains/service/Cargo.toml index 5df9493941..a690fe1ea9 100644 --- a/domains/service/Cargo.toml +++ b/domains/service/Cargo.toml @@ -19,7 +19,6 @@ domain-client-block-preprocessor = { package = "domain-block-preprocessor", vers domain-client-consensus-relay-chain = { version = "0.1.0", path = "../client/consensus-relay-chain" } domain-client-message-relayer = { version = "0.1.0", path = "../client/relayer" } domain-client-operator = { version = "0.1.0", path = "../client/domain-operator" } -domain-client-subnet-gossip = { version = "0.1.0", path = "../client/subnet-gossip" } domain-runtime-primitives = { version = "0.1.0", path = "../primitives/runtime" } frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", optional = true } futures = "0.3.29" From 176bbd83408bf35a0b8d2e78c60f347f072a13b5 Mon Sep 17 00:00:00 2001 From: vedhavyas Date: Thu, 18 Jan 2024 18:31:04 +0530 Subject: [PATCH 6/6] update reorg test and remove unused imports --- .../src/benchmarking.rs | 1 - crates/pallet-subspace/src/benchmarking.rs | 1 - domains/client/domain-operator/src/tests.rs | 48 ++++++++++++------- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/crates/pallet-runtime-configs/src/benchmarking.rs b/crates/pallet-runtime-configs/src/benchmarking.rs index 9de2686d68..ed0ffdbc8b 100644 --- a/crates/pallet-runtime-configs/src/benchmarking.rs +++ b/crates/pallet-runtime-configs/src/benchmarking.rs @@ -6,7 +6,6 @@ use frame_benchmarking::v2::*; mod benchmarks { use crate::{Call, Config, Pallet}; use frame_system::RawOrigin; - use sp_std::vec; #[benchmark] fn set_enable_domains() { diff --git a/crates/pallet-subspace/src/benchmarking.rs b/crates/pallet-subspace/src/benchmarking.rs index 106cca56a2..12ca61f505 100644 --- a/crates/pallet-subspace/src/benchmarking.rs +++ b/crates/pallet-subspace/src/benchmarking.rs @@ -19,7 +19,6 @@ mod benchmarks { use sp_core::Get; use sp_runtime::traits::{Block, Header}; use sp_std::boxed::Box; - use sp_std::vec; use sp_std::vec::Vec; use subspace_core_primitives::{ ArchivedBlockProgress, Blake3Hash, LastArchivedBlock, PotOutput, SegmentHeader, diff --git a/domains/client/domain-operator/src/tests.rs b/domains/client/domain-operator/src/tests.rs index b499c04aa9..a1d500b5e1 100644 --- a/domains/client/domain-operator/src/tests.rs +++ b/domains/client/domain-operator/src/tests.rs @@ -3460,7 +3460,7 @@ async fn test_multiple_consensus_blocks_derive_similar_domain_block() { ); // Run Alice (a evm domain authority node) - let alice = domain_test_service::DomainNodeBuilder::new( + let mut alice = domain_test_service::DomainNodeBuilder::new( tokio_handle.clone(), Alice, BasePath::new(directory.path().join("alice")), @@ -3477,29 +3477,45 @@ async fn test_multiple_consensus_blocks_derive_similar_domain_block() { .into() }; - // Fork A + // submit a remark from alice + let alice_account_nonce = alice.account_nonce(); + let tx = alice.construct_extrinsic( + alice_account_nonce, + frame_system::Call::remark { + remark: vec![0u8; 8], + }, + ); + alice + .send_extrinsic(tx) + .await + .expect("Failed to send extrinsic"); + + // Fork A with bundle that contains above transaction let (slot, bundle) = ferdie.produce_slot_and_wait_for_bundle_submission().await; - // Include one more extrinsic in fork A such that we can have a different consensus block - let remark_tx = subspace_test_runtime::UncheckedExtrinsic::new_unsigned( - frame_system::Call::remark { remark: vec![0; 8] }.into(), - ) - .into(); let consensus_block_hash_fork_a = ferdie .produce_block_with_slot_at( slot, common_block_hash, - Some(vec![bundle_to_tx(bundle.clone().unwrap()), remark_tx]), + Some(vec![bundle_to_tx(bundle.clone().unwrap())]), ) .await .unwrap(); // Fork B + let bundle = { + let mut opaque_bundle = bundle.unwrap(); + opaque_bundle.extrinsics = vec![]; + opaque_bundle.sealed_header.header.bundle_extrinsics_root = + sp_domains::EMPTY_EXTRINSIC_ROOT; + opaque_bundle.sealed_header.signature = Sr25519Keyring::Alice + .pair() + .sign(opaque_bundle.sealed_header.pre_hash().as_ref()) + .into(); + opaque_bundle + }; + let consensus_block_hash_fork_b = ferdie - .produce_block_with_slot_at( - slot, - common_block_hash, - Some(vec![bundle_to_tx(bundle.unwrap())]), - ) + .produce_block_with_slot_at(slot, common_block_hash, Some(vec![bundle_to_tx(bundle)])) .await .unwrap(); // Produce one more consensus block to make fork B the best fork and trigger processing @@ -3547,16 +3563,12 @@ async fn test_multiple_consensus_blocks_derive_similar_domain_block() { consensus_block_hash_fork_b ); - // The domain block headers should have the same `parent_hash` and `extrinsics_root` + // The domain block headers should have the same `parent_hash` // but different digest and `state_root` (because digest is stored on chain) assert_eq!( domain_block_header_fork_a.parent_hash(), domain_block_header_fork_b.parent_hash() ); - assert_eq!( - domain_block_header_fork_a.extrinsics_root(), - domain_block_header_fork_b.extrinsics_root() - ); assert_ne!( domain_block_header_fork_a.digest(), domain_block_header_fork_b.digest()