diff --git a/Cargo.lock b/Cargo.lock index d28249203c..0aff3632da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -147,7 +147,7 @@ dependencies = [ "frame-try-runtime", "getrandom 0.2.15", "hex", - "hex-literal 0.3.4", + "hex-literal", "liquidity-pools-gateway-routers", "log", "orml-asset-registry", @@ -223,6 +223,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", @@ -654,6 +655,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.7.4" @@ -699,6 +709,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-channel" version = "1.9.0" @@ -710,6 +726,63 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy 0.5.2", + "futures-core", + "pin-project-lite 0.2.14", +] + +[[package]] +name = "async-executor" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand 2.1.0", + "futures-lite 2.3.0", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + [[package]] name = "async-io" version = "2.3.2" @@ -720,9 +793,9 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite", + "futures-lite 2.3.0", "parking", - "polling", + "polling 3.7.0", "rustix 0.38.34", "slab", "tracing", @@ -745,10 +818,62 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener 4.0.3", - "event-listener-strategy", + "event-listener-strategy 0.4.0", "pin-project-lite 0.2.14", ] +[[package]] +name = "async-net" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" +dependencies = [ + "async-io 1.13.0", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.34", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-signal" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" +dependencies = [ + "async-io 2.3.2", + "async-lock 3.3.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.34", + "signal-hook-registry", + "slab", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "async-trait" version = "0.1.80" @@ -773,6 +898,18 @@ dependencies = [ "pin-project-lite 0.2.14", ] +[[package]] +name = "atomic-take" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "auto_impl" version = "1.2.0" @@ -890,6 +1027,15 @@ dependencies = [ "serde", ] +[[package]] +name = "binary-merkle-tree" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "hash-db", + "log", +] + [[package]] name = "bincode" version = "1.3.3" @@ -985,6 +1131,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", +] + [[package]] name = "blake2b_simd" version = "1.0.2" @@ -992,8 +1148,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec", - "constant_time_eq", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", ] [[package]] @@ -1003,8 +1159,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", - "arrayvec", - "constant_time_eq", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", ] [[package]] @@ -1014,10 +1170,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -1038,6 +1194,19 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "blocking" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel 2.3.1", + "async-task", + "futures-io", + "futures-lite 2.3.0", + "piper", +] + [[package]] name = "bounded-collections" version = "0.2.0" @@ -1200,6 +1369,99 @@ dependencies = [ "once_cell", ] +[[package]] +name = "centrifuge-chain" +version = "0.10.39" +dependencies = [ + "altair-runtime", + "async-trait", + "centrifuge-runtime", + "cfg-primitives", + "cfg-types", + "cfg-utils", + "clap", + "cumulus-client-cli", + "cumulus-client-collator", + "cumulus-client-consensus-aura", + "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", + "cumulus-client-network", + "cumulus-client-service", + "cumulus-pallet-session-benchmarking", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-inprocess-interface", + "cumulus-relay-chain-interface", + "development-runtime", + "fc-api", + "fc-consensus", + "fc-db", + "fc-mapping-sync", + "fc-rpc", + "fc-rpc-core", + "fp-consensus", + "fp-dynamic-fee", + "fp-evm", + "fp-rpc", + "fp-storage", + "frame-benchmarking", + "frame-benchmarking-cli", + "futures", + "hex-literal", + "jsonrpsee", + "log", + "pallet-anchors", + "pallet-ethereum", + "pallet-evm", + "pallet-pool-system", + "pallet-transaction-payment-rpc", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "polkadot-cli", + "polkadot-primitives", + "polkadot-service", + "runtime-common", + "sc-basic-authorship", + "sc-chain-spec", + "sc-cli", + "sc-client-api", + "sc-consensus", + "sc-consensus-aura", + "sc-consensus-grandpa", + "sc-executor", + "sc-network", + "sc-network-sync", + "sc-rpc", + "sc-rpc-api", + "sc-service", + "sc-sysinfo", + "sc-telemetry", + "sc-tracing", + "sc-transaction-pool", + "sc-transaction-pool-api", + "serde", + "serde_json", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-timestamp", + "sp-transaction-pool", + "staging-xcm", + "substrate-build-script-utils", + "substrate-frame-rpc-system", + "substrate-prometheus-endpoint", + "url", +] + [[package]] name = "centrifuge-runtime" version = "0.10.29" @@ -1228,7 +1490,7 @@ dependencies = [ "frame-try-runtime", "getrandom 0.2.15", "hex", - "hex-literal 0.3.4", + "hex-literal", "liquidity-pools-gateway-routers", "log", "orml-asset-registry", @@ -1304,6 +1566,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", @@ -1434,7 +1697,7 @@ dependencies = [ "cfg-utils", "frame-support", "hex", - "hex-literal 0.3.4", + "hex-literal", "orml-traits", "parity-scale-codec", "scale-info", @@ -1738,6 +2001,12 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "constant_time_eq" version = "0.3.0" @@ -2025,67 +2294,276 @@ dependencies = [ ] [[package]] -name = "cumulus-client-parachain-inherent" -version = "0.1.0" +name = "cumulus-client-cli" +version = "0.7.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ - "async-trait", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-relay-chain-interface", - "cumulus-test-relay-sproof-builder", + "clap", "parity-scale-codec", + "sc-chain-spec", + "sc-cli", "sc-client-api", - "scale-info", - "sp-api", - "sp-crypto-hashing", - "sp-inherents", + "sc-service", + "sp-blockchain", + "sp-core", "sp-runtime", - "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", - "sp-trie", - "tracing", + "url", ] [[package]] -name = "cumulus-pallet-aura-ext" +name = "cumulus-client-collator" version = "0.7.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ - "cumulus-pallet-parachain-system", - "frame-support", - "frame-system", - "pallet-aura", - "pallet-timestamp", + "cumulus-client-consensus-common", + "cumulus-client-network", + "cumulus-primitives-core", + "futures", "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-consensus-aura", + "parking_lot 0.12.3", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "sc-client-api", + "sp-api", + "sp-consensus", + "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "tracing", ] [[package]] -name = "cumulus-pallet-parachain-system" +name = "cumulus-client-consensus-aura" version = "0.7.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ - "bytes", - "cumulus-pallet-parachain-system-proc-macro", + "async-trait", + "cumulus-client-collator", + "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", + "cumulus-client-parachain-inherent", + "cumulus-primitives-aura", "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-primitives-proof-size-hostfunction", - "environmental", - "frame-benchmarking", - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "pallet-message-queue", + "cumulus-relay-chain-interface", + "futures", "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-runtime-parachains", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "sc-client-api", + "sc-consensus", + "sc-consensus-aura", + "sc-consensus-babe", + "sc-consensus-slots", + "sc-telemetry", + "schnellru", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-timestamp", + "substrate-prometheus-endpoint", + "tracing", +] + +[[package]] +name = "cumulus-client-consensus-common" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "async-trait", + "cumulus-client-pov-recovery", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "dyn-clone", + "futures", + "log", + "parity-scale-codec", + "polkadot-primitives", + "sc-client-api", + "sc-consensus", + "sc-consensus-babe", + "schnellru", + "sp-blockchain", + "sp-consensus", + "sp-consensus-slots", + "sp-core", + "sp-runtime", + "sp-timestamp", + "sp-trie", + "substrate-prometheus-endpoint", + "tracing", +] + +[[package]] +name = "cumulus-client-consensus-proposer" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "anyhow", + "async-trait", + "cumulus-primitives-parachain-inherent", + "sp-consensus", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "thiserror", +] + +[[package]] +name = "cumulus-client-network" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "async-trait", + "cumulus-relay-chain-interface", + "futures", + "futures-timer", + "parity-scale-codec", + "parking_lot 0.12.3", + "polkadot-node-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "sc-client-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", + "tracing", +] + +[[package]] +name = "cumulus-client-parachain-inherent" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", + "cumulus-test-relay-sproof-builder", + "parity-scale-codec", + "sc-client-api", + "scale-info", + "sp-api", + "sp-crypto-hashing", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-trie", + "tracing", +] + +[[package]] +name = "cumulus-client-pov-recovery" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "futures", + "futures-timer", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "rand", + "sc-client-api", + "sc-consensus", + "sp-consensus", + "sp-maybe-compressed-blob", + "sp-runtime", + "tracing", +] + +[[package]] +name = "cumulus-client-service" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "cumulus-client-cli", + "cumulus-client-collator", + "cumulus-client-consensus-common", + "cumulus-client-network", + "cumulus-client-pov-recovery", + "cumulus-primitives-core", + "cumulus-primitives-proof-size-hostfunction", + "cumulus-relay-chain-inprocess-interface", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-minimal-node", + "futures", + "polkadot-primitives", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-sync", + "sc-network-transactions", + "sc-rpc", + "sc-service", + "sc-sysinfo", + "sc-telemetry", + "sc-transaction-pool", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-transaction-pool", +] + +[[package]] +name = "cumulus-pallet-aura-ext" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "cumulus-pallet-parachain-system", + "frame-support", + "frame-system", + "pallet-aura", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-consensus-aura", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "cumulus-pallet-parachain-system" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "bytes", + "cumulus-pallet-parachain-system-proc-macro", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-primitives-proof-size-hostfunction", + "environmental", + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-message-queue", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-runtime-parachains", "scale-info", "sp-core", "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", @@ -2166,6 +2644,20 @@ dependencies = [ "staging-xcm-executor", ] +[[package]] +name = "cumulus-primitives-aura" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-primitives", + "sp-api", + "sp-consensus-aura", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "cumulus-primitives-core" version = "0.7.0" @@ -2242,6 +2734,30 @@ dependencies = [ "staging-xcm-executor", ] +[[package]] +name = "cumulus-relay-chain-inprocess-interface" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "futures", + "futures-timer", + "polkadot-cli", + "polkadot-service", + "sc-cli", + "sc-client-api", + "sc-sysinfo", + "sc-telemetry", + "sc-tracing", + "sp-api", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", +] + [[package]] name = "cumulus-relay-chain-interface" version = "0.7.0" @@ -2260,6 +2776,86 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cumulus-relay-chain-minimal-node" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "array-bytes 6.2.3", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-rpc-interface", + "futures", + "parking_lot 0.12.3", + "polkadot-availability-recovery", + "polkadot-collator-protocol", + "polkadot-core-primitives", + "polkadot-network-bridge", + "polkadot-node-collation-generation", + "polkadot-node-core-chain-api", + "polkadot-node-core-prospective-parachains", + "polkadot-node-core-runtime-api", + "polkadot-node-network-protocol", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "sc-authority-discovery", + "sc-client-api", + "sc-network", + "sc-network-common", + "sc-service", + "sc-tracing", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-runtime", + "substrate-prometheus-endpoint", + "tokio", + "tracing", +] + +[[package]] +name = "cumulus-relay-chain-rpc-interface" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "either", + "futures", + "futures-timer", + "jsonrpsee", + "parity-scale-codec", + "pin-project", + "polkadot-overseer", + "rand", + "sc-client-api", + "sc-rpc-api", + "sc-service", + "schnellru", + "serde", + "serde_json", + "smoldot", + "smoldot-light", + "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-version", + "thiserror", + "tokio", + "tokio-util", + "tracing", + "url", +] + [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.7.0" @@ -2315,6 +2911,19 @@ dependencies = [ "syn 2.0.66", ] +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", +] + [[package]] name = "cxx" version = "1.0.122" @@ -2492,7 +3101,7 @@ dependencies = [ "frame-try-runtime", "getrandom 0.2.15", "hex", - "hex-literal 0.3.4", + "hex-literal", "liquidity-pools-gateway-routers", "log", "orml-asset-registry", @@ -2568,6 +3177,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", @@ -2687,7 +3297,7 @@ dependencies = [ "ark-serialize", "ark-std", "ark-transcript", - "arrayvec", + "arrayvec 0.7.4", "zeroize", ] @@ -2724,6 +3334,12 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + [[package]] name = "dtoa" version = "1.0.9" @@ -2810,6 +3426,21 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek 4.1.2", + "ed25519", + "hashbrown 0.14.5", + "hex", + "rand_core 0.6.4", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "either" version = "1.12.0" @@ -2988,6 +3619,17 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.14", +] + [[package]] name = "event-listener" version = "4.0.3" @@ -2999,6 +3641,17 @@ dependencies = [ "pin-project-lite 0.2.14", ] +[[package]] +name = "event-listener" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.14", +] + [[package]] name = "event-listener-strategy" version = "0.4.0" @@ -3009,6 +3662,16 @@ dependencies = [ "pin-project-lite 0.2.14", ] +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.3.0", + "pin-project-lite 0.2.14", +] + [[package]] name = "evm" version = "0.41.1" @@ -3109,6 +3772,15 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51e2ce894d53b295cf97b05685aa077950ff3e8541af83217fc720a6437169f8" +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + [[package]] name = "fastrand" version = "2.1.0" @@ -3140,6 +3812,164 @@ dependencies = [ "thiserror", ] +[[package]] +name = "fc-api" +version = "1.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" +dependencies = [ + "async-trait", + "fp-storage", + "parity-scale-codec", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "fc-consensus" +version = "2.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" +dependencies = [ + "async-trait", + "fp-consensus", + "fp-rpc", + "sc-consensus", + "sp-api", + "sp-block-builder", + "sp-consensus", + "sp-runtime", + "thiserror", +] + +[[package]] +name = "fc-db" +version = "2.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" +dependencies = [ + "async-trait", + "fc-api", + "fp-storage", + "kvdb-rocksdb", + "log", + "parity-db", + "parity-scale-codec", + "parking_lot 0.12.3", + "sc-client-db", + "smallvec", + "sp-blockchain", + "sp-core", + "sp-database", + "sp-runtime", +] + +[[package]] +name = "fc-mapping-sync" +version = "2.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" +dependencies = [ + "fc-db", + "fc-storage", + "fp-consensus", + "fp-rpc", + "futures", + "futures-timer", + "log", + "parking_lot 0.12.3", + "sc-client-api", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-runtime", +] + +[[package]] +name = "fc-rpc" +version = "2.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" +dependencies = [ + "ethereum", + "ethereum-types", + "evm", + "fc-api", + "fc-mapping-sync", + "fc-rpc-core", + "fc-storage", + "fp-evm", + "fp-rpc", + "fp-storage", + "futures", + "hex", + "jsonrpsee", + "libsecp256k1", + "log", + "pallet-evm", + "parity-scale-codec", + "prometheus", + "rand", + "rlp", + "sc-client-api", + "sc-consensus-aura", + "sc-network", + "sc-network-common", + "sc-network-sync", + "sc-rpc", + "sc-service", + "sc-transaction-pool", + "sc-transaction-pool-api", + "sc-utils", + "schnellru", + "serde", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-core", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-timestamp", + "substrate-prometheus-endpoint", + "thiserror", + "tokio", +] + +[[package]] +name = "fc-rpc-core" +version = "1.1.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" +dependencies = [ + "ethereum", + "ethereum-types", + "jsonrpsee", + "rlp", + "rustc-hex", + "serde", + "serde_json", + "sp-core-hashing", +] + +[[package]] +name = "fc-storage" +version = "1.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" +dependencies = [ + "ethereum", + "ethereum-types", + "fp-rpc", + "fp-storage", + "parity-scale-codec", + "sc-client-api", + "sp-api", + "sp-blockchain", + "sp-io", + "sp-runtime", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "fdlimit" version = "0.3.0" @@ -3309,6 +4139,16 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] +[[package]] +name = "fp-dynamic-fee" +version = "1.0.0" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" +dependencies = [ + "async-trait", + "sp-core", + "sp-inherents", +] + [[package]] name = "fp-ethereum" version = "1.0.0-dev" @@ -3847,13 +4687,31 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite 0.2.14", + "waker-fn", +] + [[package]] name = "futures-lite" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ + "fastrand 2.1.0", "futures-core", + "futures-io", + "parking", "pin-project-lite 0.2.14", ] @@ -4106,6 +4964,7 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", "allocator-api2", + "serde", ] [[package]] @@ -4141,12 +5000,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex-literal" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" - [[package]] name = "hex-literal" version = "0.4.1" @@ -4368,7 +5221,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io", + "async-io 2.3.2", "core-foundation", "fnv", "futures", @@ -4459,6 +5312,12 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + [[package]] name = "indicatif" version = "0.17.8" @@ -4983,7 +5842,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "log", - "lru", + "lru 0.10.1", "quick-protobuf", "quick-protobuf-codec", "smallvec", @@ -5015,7 +5874,7 @@ version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "asynchronous-codec", "bytes", "either", @@ -5386,6 +6245,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -5465,6 +6330,12 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "lru" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" + [[package]] name = "lru-cache" version = "0.1.2" @@ -5695,7 +6566,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.4", "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", @@ -6058,6 +6929,12 @@ dependencies = [ "libc", ] +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + [[package]] name = "node-primitives" version = "2.0.0" @@ -6067,6 +6944,12 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -6134,7 +7017,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "itoa", ] @@ -6590,6 +7473,28 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] +[[package]] +name = "pallet-bags-list" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "aquamarine", + "docify", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-balances" version = "28.0.0" @@ -6620,6 +7525,51 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-beefy" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "scale-info", + "serde", + "sp-consensus-beefy", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-beefy-mmr" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "array-bytes 6.2.3", + "binary-merkle-tree", + "frame-support", + "frame-system", + "log", + "pallet-beefy", + "pallet-mmr", + "pallet-session", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-consensus-beefy", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-block-rewards" version = "0.1.0" @@ -6649,6 +7599,24 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] +[[package]] +name = "pallet-bounties" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-treasury", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-bridge" version = "2.0.0" @@ -6688,6 +7656,25 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] +[[package]] +name = "pallet-child-bounties" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-bounties", + "pallet-treasury", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-collator-allowlist" version = "2.0.0" @@ -6740,6 +7727,23 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] +[[package]] +name = "pallet-conviction-voting" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-democracy" version = "28.0.0" @@ -6876,7 +7880,7 @@ dependencies = [ "frame-system", "hash-db", "hex", - "hex-literal 0.4.1", + "hex-literal", "impl-trait-for-tuples", "log", "parity-scale-codec", @@ -7219,7 +8223,7 @@ dependencies = [ "frame-support", "frame-system", "hex", - "hex-literal 0.3.4", + "hex-literal", "pallet-balances", "parity-scale-codec", "rand", @@ -7312,6 +8316,24 @@ dependencies = [ "sp-weights", ] +[[package]] +name = "pallet-mmr" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-multisig" version = "28.0.0" @@ -7328,6 +8350,72 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] +[[package]] +name = "pallet-nis" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-nomination-pools" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-support", + "frame-system", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-nomination-pools-benchmarking" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "pallet-bags-list", + "pallet-nomination-pools", + "pallet-staking", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-staking", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-nomination-pools-runtime-api" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "pallet-nomination-pools", + "parity-scale-codec", + "sp-api", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-offences" version = "27.0.0" @@ -7345,6 +8433,30 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] +[[package]] +name = "pallet-offences-benchmarking" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-babe", + "pallet-balances", + "pallet-grandpa", + "pallet-im-online", + "pallet-offences", + "pallet-session", + "pallet-staking", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-staking", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-oracle-collection" version = "1.0.0" @@ -7499,45 +8611,98 @@ dependencies = [ "pallet-restricted-tokens", "pallet-timestamp", "parity-scale-codec", - "rand", - "rev_slice", + "rand", + "rev_slice", + "scale-info", + "serde", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "strum 0.24.1", +] + +[[package]] +name = "pallet-preimage" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-proxy" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-ranked-collective" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", "scale-info", - "serde", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", - "strum 0.24.1", ] [[package]] -name = "pallet-preimage" +name = "pallet-recovery" version = "28.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log", "parity-scale-codec", "scale-info", - "sp-core", "sp-io", "sp-runtime", "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] -name = "pallet-proxy" +name = "pallet-referenda" version = "28.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ + "assert_matches", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", + "serde", + "sp-arithmetic", "sp-io", "sp-runtime", "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", @@ -7616,6 +8781,21 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] +[[package]] +name = "pallet-root-testing" +version = "4.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-scheduler" version = "29.0.0" @@ -7656,6 +8836,41 @@ dependencies = [ "sp-trie", ] +[[package]] +name = "pallet-session-benchmarking" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", + "pallet-staking", + "parity-scale-codec", + "rand", + "sp-runtime", + "sp-session", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-society" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "rand_chacha 0.2.2", + "scale-info", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-staking" version = "28.0.0" @@ -7699,6 +8914,33 @@ dependencies = [ "sp-arithmetic", ] +[[package]] +name = "pallet-staking-runtime-api" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "parity-scale-codec", + "sp-api", + "sp-staking", +] + +[[package]] +name = "pallet-state-trie-migration" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-sudo" version = "28.0.0" @@ -7750,6 +8992,25 @@ dependencies = [ "sp-timestamp", ] +[[package]] +name = "pallet-tips" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-treasury", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-token-mux" version = "0.1.0" @@ -7903,6 +9164,21 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] +[[package]] +name = "pallet-whitelist" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-xcm" version = "7.0.0" @@ -7995,7 +9271,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "bitvec", "byte-slice-cast", "bytes", @@ -8103,6 +9379,15 @@ dependencies = [ "crypto-mac 0.11.0", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -8217,6 +9502,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" +dependencies = [ + "atomic-waker", + "fastrand 2.1.0", + "futures-io", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -8509,7 +9805,7 @@ dependencies = [ "rand_core 0.6.4", "sc-keystore", "schnellru", - "schnorrkel", + "schnorrkel 0.11.4", "sp-application-crypto", "sp-consensus", "sp-consensus-slots", @@ -8830,7 +10126,7 @@ name = "polkadot-node-network-protocol" version = "7.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-trait", "bitvec", "derive_more", @@ -8860,7 +10156,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", - "schnorrkel", + "schnorrkel 0.11.4", "serde", "sp-application-crypto", "sp-consensus-babe", @@ -8990,7 +10286,7 @@ version = "7.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ "bitvec", - "hex-literal 0.4.1", + "hex-literal", "log", "parity-scale-codec", "polkadot-core-primitives", @@ -9170,7 +10466,7 @@ dependencies = [ "frame-system", "frame-system-rpc-runtime-api", "futures", - "hex-literal 0.4.1", + "hex-literal", "is_executable", "kvdb", "kvdb-rocksdb", @@ -9219,6 +10515,7 @@ dependencies = [ "polkadot-rpc", "polkadot-runtime-parachains", "polkadot-statement-distribution", + "rococo-runtime", "sc-authority-discovery", "sc-basic-authorship", "sc-block-builder", @@ -9271,6 +10568,7 @@ dependencies = [ "substrate-prometheus-endpoint", "thiserror", "tracing-gum", + "westend-runtime", ] [[package]] @@ -9278,7 +10576,7 @@ name = "polkadot-statement-distribution" version = "7.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "bitvec", "fatality", "futures", @@ -9369,6 +10667,22 @@ dependencies = [ "test-runtime-constants", ] +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite 0.2.14", + "windows-sys 0.48.0", +] + [[package]] name = "polling" version = "3.7.0" @@ -10165,6 +11479,118 @@ dependencies = [ "librocksdb-sys", ] +[[package]] +name = "rococo-runtime" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "binary-merkle-tree", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-asset-rate", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", + "pallet-bounties", + "pallet-child-bounties", + "pallet-collective", + "pallet-conviction-voting", + "pallet-democracy", + "pallet-elections-phragmen", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-mmr", + "pallet-multisig", + "pallet-nis", + "pallet-offences", + "pallet-preimage", + "pallet-proxy", + "pallet-ranked-collective", + "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", + "pallet-scheduler", + "pallet-session", + "pallet-society", + "pallet-staking", + "pallet-state-trie-migration", + "pallet-sudo", + "pallet-timestamp", + "pallet-tips", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-whitelist", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rococo-runtime-constants", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-transaction-pool", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "static_assertions", + "substrate-wasm-builder", +] + +[[package]] +name = "rococo-runtime-constants" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-builder", +] + [[package]] name = "route-recognizer" version = "0.3.1" @@ -10226,7 +11652,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "hex-literal 0.3.4", + "hex-literal", "log", "num_enum 0.5.11", "orml-asset-registry", @@ -10343,7 +11769,7 @@ dependencies = [ "fudge-core", "getrandom 0.2.15", "hex", - "hex-literal 0.3.4", + "hex-literal", "lazy_static", "liquidity-pools-gateway-routers", "orml-asset-registry", @@ -10504,6 +11930,20 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + [[package]] name = "rustix" version = "0.38.34" @@ -10578,6 +12018,17 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +[[package]] +name = "ruzstd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +dependencies = [ + "byteorder", + "thiserror-core", + "twox-hash", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -10939,7 +12390,7 @@ version = "13.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ "array-bytes 6.2.3", - "async-channel", + "async-channel 1.9.0", "async-trait", "fnv", "futures", @@ -11176,7 +12627,7 @@ version = "0.4.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ "array-bytes 4.2.0", - "arrayvec", + "arrayvec 0.7.4", "blake2 0.10.6", "bytes", "futures", @@ -11205,7 +12656,7 @@ version = "0.34.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ "array-bytes 6.2.3", - "async-channel", + "async-channel 1.9.0", "async-trait", "asynchronous-codec", "bytes", @@ -11247,7 +12698,7 @@ name = "sc-network-bitswap" version = "0.33.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ - "async-channel", + "async-channel 1.9.0", "cid", "futures", "libp2p-identity", @@ -11304,7 +12755,7 @@ version = "0.33.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ "array-bytes 6.2.3", - "async-channel", + "async-channel 1.9.0", "futures", "libp2p-identity", "log", @@ -11325,7 +12776,7 @@ version = "0.33.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ "array-bytes 6.2.3", - "async-channel", + "async-channel 1.9.0", "async-trait", "fork-tree", "futures", @@ -11749,7 +13200,7 @@ name = "sc-utils" version = "14.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" dependencies = [ - "async-channel", + "async-channel 1.9.0", "futures", "futures-timer", "lazy_static", @@ -11805,6 +13256,22 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "schnorrkel" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek-ng", + "merlin", + "rand_core 0.6.4", + "sha2 0.9.9", + "subtle-ng", + "zeroize", +] + [[package]] name = "schnorrkel" version = "0.11.4" @@ -11813,7 +13280,7 @@ checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ "aead", "arrayref", - "arrayvec", + "arrayvec 0.7.4", "curve25519-dalek 4.1.2", "getrandom_or_panic", "merlin", @@ -12162,6 +13629,113 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel 1.9.0", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-net", + "async-process", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "smoldot" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" +dependencies = [ + "arrayvec 0.7.4", + "async-lock 2.8.0", + "atomic-take", + "base64 0.21.7", + "bip39", + "blake2-rfc", + "bs58 0.5.1", + "chacha20", + "crossbeam-queue", + "derive_more", + "ed25519-zebra 4.0.3", + "either", + "event-listener 2.5.3", + "fnv", + "futures-lite 1.13.0", + "futures-util", + "hashbrown 0.14.5", + "hex", + "hmac 0.12.1", + "itertools 0.11.0", + "libsecp256k1", + "merlin", + "no-std-net", + "nom", + "num-bigint", + "num-rational", + "num-traits", + "pbkdf2 0.12.2", + "pin-project", + "poly1305", + "rand", + "rand_chacha 0.3.1", + "ruzstd", + "schnorrkel 0.10.2", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3", + "siphasher", + "slab", + "smallvec", + "soketto", + "twox-hash", + "wasmi", + "x25519-dalek 2.0.1", + "zeroize", +] + +[[package]] +name = "smoldot-light" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" +dependencies = [ + "async-channel 1.9.0", + "async-lock 2.8.0", + "base64 0.21.7", + "blake2-rfc", + "derive_more", + "either", + "event-listener 2.5.3", + "fnv", + "futures-channel", + "futures-lite 1.13.0", + "futures-util", + "hashbrown 0.14.5", + "hex", + "itertools 0.11.0", + "log", + "lru 0.11.1", + "no-std-net", + "parking_lot 0.12.3", + "pin-project", + "rand", + "rand_chacha 0.3.1", + "serde", + "serde_json", + "siphasher", + "slab", + "smol", + "smoldot", + "zeroize", +] + [[package]] name = "snap" version = "1.1.1" @@ -12458,7 +14032,7 @@ dependencies = [ "bounded-collections", "bs58 0.5.1", "dyn-clonable", - "ed25519-zebra", + "ed25519-zebra 3.1.0", "futures", "hash-db", "hash256-std-hasher", @@ -12473,7 +14047,7 @@ dependencies = [ "primitive-types", "rand", "scale-info", - "schnorrkel", + "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", @@ -12491,6 +14065,14 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-core-hashing" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "sp-crypto-hashing", +] + [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" @@ -13333,8 +14915,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a7590dc041b9bc2825e52ce5af8416c73dbe9d0654402bfd4b4941938b94d8f" dependencies = [ "hmac 0.11.0", - "pbkdf2", - "schnorrkel", + "pbkdf2 0.8.0", + "schnorrkel 0.11.4", "sha2 0.9.9", "zeroize", ] @@ -13454,6 +15036,12 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + [[package]] name = "syn" version = "1.0.109" @@ -13528,7 +15116,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand", + "fastrand 2.1.0", "rustix 0.38.34", "windows-sys 0.52.0", ] @@ -13581,6 +15169,26 @@ dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "thiserror-impl" version = "1.0.61" @@ -14085,6 +15693,7 @@ dependencies = [ "async-trait", "clap", "frame-remote-externalities", + "frame-try-runtime", "hex", "log", "parity-scale-codec", @@ -14286,6 +15895,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "waker-fn" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" + [[package]] name = "walkdir" version = "2.5.0" @@ -14456,6 +16071,37 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmi" +version = "0.31.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" +dependencies = [ + "smallvec", + "spin 0.9.8", + "wasmi_arena", + "wasmi_core", + "wasmparser-nostd", +] + +[[package]] +name = "wasmi_arena" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" + +[[package]] +name = "wasmi_core" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" +dependencies = [ + "downcast-rs", + "libm", + "num-traits", + "paste", +] + [[package]] name = "wasmparser" version = "0.102.0" @@ -14466,6 +16112,15 @@ dependencies = [ "url", ] +[[package]] +name = "wasmparser-nostd" +version = "0.100.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5a015fe95f3504a94bb1462c717aae75253e39b9dd6c3fb1062c934535c64aa" +dependencies = [ + "indexmap-nostd", +] + [[package]] name = "wasmtime" version = "8.0.1" @@ -14690,6 +16345,128 @@ dependencies = [ "webpki", ] +[[package]] +name = "westend-runtime" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "binary-merkle-tree", + "bitvec", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-asset-rate", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", + "pallet-collective", + "pallet-conviction-voting", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-elections-phragmen", + "pallet-fast-unstake", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-mmr", + "pallet-multisig", + "pallet-nomination-pools", + "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", + "pallet-offences", + "pallet-offences-benchmarking", + "pallet-preimage", + "pallet-proxy", + "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", + "pallet-scheduler", + "pallet-session", + "pallet-session-benchmarking", + "pallet-society", + "pallet-staking", + "pallet-staking-reward-curve", + "pallet-staking-runtime-api", + "pallet-state-trie-migration", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-whitelist", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-transaction-pool", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", + "westend-runtime-constants", +] + +[[package]] +name = "westend-runtime-constants" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-builder", +] + [[package]] name = "which" version = "4.4.2" @@ -15211,11 +16988,6 @@ dependencies = [ "pkg-config", ] -[[patch.unused]] -name = "sp-core-hashing" -version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" - [[patch.unused]] name = "sp-core-hashing-proc-macro" version = "15.0.0" diff --git a/Cargo.toml b/Cargo.toml index 72634ec99b..6a985417b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] resolver = "2" members = [ - #"node", + "node", "libs/mocks", "libs/primitives", "libs/test-utils", @@ -54,33 +54,34 @@ repository = "https://github.com/centrifuge/centrifuge-chain" documentation = "https://reference.centrifuge.io/centrifuge_chain/index.html" [workspace.dependencies] -hex-literal = { version = "0.3.4" } +hex-literal = { version = "0.4.1" } hex = { version = "0.4.3", default-features = false } -smallvec = "1.6.1" -serde = { version = "1.0.119", default-features = false, features = ["derive"] } -parity-scale-codec = { version = "3.2.2", default-features = false, features = ["derive"] } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -log = { version = "0.4", default-features = false } +smallvec = "1.11.0" +serde = { version = "1.0.195", default-features = false, features = ["derive"] } +serde_json = { version = "1.0.111" } +parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +log = { version = "0.4.20", default-features = false } getrandom = { version = "0.2", features = ["js"] } static_assertions = "1.1.0" lazy_static = "1.4.0" thiserror = "1.0.30" -tokio = { version = "1.15", features = ["macros"] } -tracing-subscriber = "0.2" +tokio = { version = "1.32.0", features = ["macros"] } +tracing-subscriber = "0.2.25" ethabi = { version = "18.0", default-features = false } ethereum = { version = "0.15.0", default-features = false } -async-trait = "0.1" -clap = { version = "4.0.9", features = ["derive"] } -futures = "0.3.25" -jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } -url = "2.2.2" +async-trait = "0.1.74" +clap = { version = "4.4.18", features = ["derive"] } +futures = "0.3.28" +jsonrpsee = { version = "0.20.3", features = ["server", "macros"] } +url = "2.4.0" tempfile = "3.1.0" -strum = { version = "0.24", default-features = false, features = ["derive"] } -bitflags = { version = "1.3" } +strum = { version = "0.24.1", default-features = false, features = ["derive"] } +bitflags = { version = "1.3.2" } rand = { version = "0.8.5", default-features = false } rev_slice = { version = "0.1.5", default-features = false } -impl-trait-for-tuples = "0.2.1" -num-traits = { version = "0.2", default-features = false } +impl-trait-for-tuples = "0.2.2" +num-traits = { version = "0.2.17", default-features = false } num_enum = { version = "0.5.3", default-features = false } # Cumulus @@ -150,6 +151,7 @@ sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", defaul sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } sp-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } sp-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } @@ -293,6 +295,7 @@ pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fc-api = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } fc-db = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2", features = ["rocksdb"] } fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } diff --git a/docker/docker-compose-local-relay.yml b/docker/docker-compose-local-relay.yml index cf1afd7c18..69196bf790 100644 --- a/docker/docker-compose-local-relay.yml +++ b/docker/docker-compose-local-relay.yml @@ -4,7 +4,7 @@ version: '3.4' services: node_alice: container_name: alice - image: "parity/polkadot:v1.0.0" + image: "parity/polkadot:v1.7.2" platform: "linux/x86_64" ports: - "30333:30333" @@ -30,7 +30,7 @@ services: node_bob: container_name: bob - image: "parity/polkadot:v1.0.0" + image: "parity/polkadot:v1.7.2" platform: "linux/x86_64" ports: - "30344:30333" diff --git a/node/Cargo.toml b/node/Cargo.toml index 0488331632..774011eaa1 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -31,10 +31,12 @@ jsonrpsee = { workspace = true, default-features = true } log = { workspace = true, default-features = true } parity-scale-codec = { default-features = true, workspace = true } serde = { workspace = true, default-features = true } +serde_json = { workspace = true, default-features = true } url = { workspace = true, default-features = true } # client dependencies pallet-transaction-payment-rpc = { workspace = true, default-features = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = true } sc-basic-authorship = { workspace = true, default-features = true } sc-chain-spec = { workspace = true, default-features = true } sc-cli = { workspace = true, default-features = true, features = ["rocksdb"] } @@ -106,6 +108,7 @@ pallet-pool-system = { workspace = true, default-features = true } runtime-common = { workspace = true, default-features = true } # frontier +fc-api = { workspace = true, default-features = true } fc-consensus = { workspace = true, default-features = true } fc-db = { workspace = true, default-features = true, features = ["rocksdb"] } fc-mapping-sync = { workspace = true, default-features = true } diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index f27285e111..dd7945d0ea 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -40,16 +40,14 @@ use runtime_common::{account_conversion::AccountConverter, evm::precompile::H160 use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; use sc_service::{ChainType, Properties}; use serde::{Deserialize, Serialize}; -use sp_core::{crypto::UncheckedInto, sr25519, Encode, Pair, Public, H160}; +use sp_core::{sr25519, Encode, Pair, Public, H160}; use sp_runtime::{ traits::{IdentifyAccount, Verify}, FixedPointNumber, }; use staging_xcm::{ - latest::{MultiLocation, NetworkId}, - prelude::{ - AccountKey20, GeneralIndex, GeneralKey, GlobalConsensus, PalletInstance, Parachain, X2, X3, - }, + latest::{Location, NetworkId}, + prelude::{AccountKey20, GeneralIndex, GeneralKey, GlobalConsensus, PalletInstance, Parachain}, }; /// Specialized `ChainSpec` instances for our runtimes. @@ -146,30 +144,26 @@ pub fn centrifuge_local(para_id: ParaId) -> CentrifugeChainSpec { properties.insert("tokenSymbol".into(), "DCFG".into()); properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - CentrifugeChainSpec::from_genesis( - "Centrifuge Local", - "centrifuge_local", - ChainType::Local, - move || { - centrifuge_genesis( - vec![( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - )], - endowed_accounts(), - endowed_evm_accounts(), - Some(100000000 * CFG), - para_id, - council_members_bootstrap(), - ) - }, - vec![], - None, - None, - None, - Some(properties), + CentrifugeChainSpec::builder( + centrifuge_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), development_extensions(para_id.into()), ) + .with_name("Centrifuge Local") + .with_id("centrifuge_local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(centrifuge_genesis( + vec![( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + )], + endowed_accounts(), + endowed_evm_accounts(), + Some(100000000 * CFG), + para_id, + council_members_bootstrap(), + )) + .with_properties(properties) + .build() } pub fn catalyst_config() -> CentrifugeChainSpec { @@ -184,70 +178,35 @@ pub fn altair_config() -> AltairChainSpec { .unwrap() } -pub fn altair_local(para_id: ParaId) -> AltairChainSpec { - let mut properties = Properties::new(); - properties.insert("tokenSymbol".into(), "DAIR".into()); - properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - - AltairChainSpec::from_genesis( - "Altair Local", - "altair_local", - ChainType::Local, - move || { - altair_genesis( - vec![( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - )], - endowed_accounts(), - endowed_evm_accounts(), - Some(100000000 * AIR), - para_id, - council_members_bootstrap(), - ) - }, - vec![], - None, - None, - None, - Some(properties), - development_extensions(para_id.into()), - ) +pub fn demo_config() -> DevelopmentChainSpec { + DevelopmentChainSpec::from_json_bytes(&include_bytes!("../res/demo-spec-raw.json")[..]).unwrap() } -pub fn demo(para_id: ParaId) -> DevelopmentChainSpec { +pub fn altair_local(para_id: ParaId) -> AltairChainSpec { let mut properties = Properties::new(); - properties.insert("tokenSymbol".into(), "DEMO".into()); + properties.insert("tokenSymbol".into(), "DAIR".into()); properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - DevelopmentChainSpec::from_genesis( - "Demo Live", - "demo_live", - ChainType::Live, - move || { - development_genesis( - // kANEUrMbi9xC16AfL5vSGwfvBVRoRdfWoQ8abPiXi5etFxpdP - hex!["e0c426785313bb7e712d66dce43ccb81a7eaef373784511fb508fff4b5df3305"].into(), - vec![( - // kAHJNhAragKRrAb9X8JxSNYoqPqv36TspSwdSuyMfxGKUmfdH - hex!["068f3bd4ed27bb83da8fdebbb4deba6b3b3b83ff47c8abad11e5c48c74c20b11"].into(), - // kAKXFWse8rghi8mbAFB4RaVyZu6XZXq5i9wv7uYakZ3vQcxMR - hex!["68d9baaa081802f8ec50d475b654810b158cdcb23e11c43815a6549f78f1b34f"] - .unchecked_into(), - )], - demo_endowed_accounts(), - vec![], - Some(100000000 * CFG), - para_id, - ) - }, - vec![], - None, - None, - None, - Some(properties), + AltairChainSpec::builder( + altair_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), development_extensions(para_id.into()), ) + .with_name("Altair Local") + .with_id("altair_local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(altair_genesis( + vec![( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + )], + endowed_accounts(), + endowed_evm_accounts(), + Some(100000000 * AIR), + para_id, + council_members_bootstrap(), + )) + .with_properties(properties) + .build() } pub fn development(para_id: ParaId) -> DevelopmentChainSpec { @@ -255,51 +214,26 @@ pub fn development(para_id: ParaId) -> DevelopmentChainSpec { properties.insert("tokenSymbol".into(), "DEVEL".into()); properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - DevelopmentChainSpec::from_genesis( - "Dev Live", - "devel_live", - ChainType::Live, - move || { - development_genesis( - get_account_id_from_seed::("Alice"), - vec![( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - )], - endowed_accounts(), - endowed_evm_accounts(), - Some(10000000 * CFG), - para_id, - ) - }, - vec![], - None, - None, - None, - Some(properties), + DevelopmentChainSpec::builder( + development_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), development_extensions(para_id.into()), ) -} - -fn demo_endowed_accounts() -> Vec { - vec![ - //kANEUrMbi9xC16AfL5vSGwfvBVRoRdfWoQ8abPiXi5etFxpdP - hex!["e0c426785313bb7e712d66dce43ccb81a7eaef373784511fb508fff4b5df3305"].into(), - // kAHJNhAragKRrAb9X8JxSNYoqPqv36TspSwdSuyMfxGKUmfdH - hex!["068f3bd4ed27bb83da8fdebbb4deba6b3b3b83ff47c8abad11e5c48c74c20b11"].into(), - // kAJ27MdBneY2U6QXvY3CmUE9btDmTvxSYfBd5qjw9U6oNZe2C - hex!["2663e968d484dc12c488a5b74107c0c3b6bcf21a6672923b153e4b5a9170a878"].into(), - // kAKq5N4wTcKU7qCCSzUqNcQQSMfPuN5k8tBafgoH9tpUgfVg2 - hex!["7671f8ee2c446ebd2b655ab5380b8004598d9663809cbb372f3de627a0e5eb32"].into(), - // kAJkDfWBaUSoavcbWc7m5skLsd5APLgqfr8YfgKEcBctccxTv - hex!["4681744964868d0f210b1161759958390a861b1733c65a6d04ac6b0ffe2f1e42"].into(), - // kAKZvAs9YpXMbZLNqrbu4rnqWDPVDEVVsDc6ngKtemEbqmQSk - hex!["6ae25829700ff7251861ac4a97235070b3e6e0883ce54ee53aa48400aa28d905"].into(), - // kAMBhYMypx5LGfEwBKDg42mBmymXEvU8TRHwoDMyGhY74oMf8 - hex!["b268e5eee003859659258de82991ce0dc47db15c5b3d32bd050f8b02d350530e"].into(), - // kANtu5pYcZ2TcutMAaeuxYgySzT1YH7y72h77rReLki24c33J - hex!["fe110c5ece58c80fc7fb740b95776f9b640ae1c9f0842895a55d2e582e4e1076"].into(), - ] + .with_name("Dev Live") + .with_id("devel_live") + .with_chain_type(ChainType::Live) + .with_genesis_config_patch(development_genesis( + get_account_id_from_seed::("Alice"), + vec![( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + )], + endowed_accounts(), + endowed_evm_accounts(), + Some(10000000 * CFG), + para_id, + )) + .with_properties(properties) + .build() } fn endowed_accounts() -> Vec { @@ -328,7 +262,7 @@ fn endowed_evm_accounts() -> Vec<([u8; 20], Option)> { } fn council_members_bootstrap() -> Vec { - endowed_accounts().into_iter().take(4).collect() + endowed_accounts().into_iter().take(4).collect::>() } fn centrifuge_genesis( @@ -338,7 +272,7 @@ fn centrifuge_genesis( total_issuance: Option, id: ParaId, council_members: Vec, -) -> centrifuge_runtime::RuntimeGenesisConfig { +) -> serde_json::Value { let chain_id: u32 = id.into(); endowed_accounts.extend(endowed_evm_accounts.into_iter().map(|(addr, id)| { @@ -356,57 +290,35 @@ fn centrifuge_genesis( .iter() .cloned() .map(|k| (k, balance_per_endowed)) - .collect() + .collect::>() } None => vec![], }; - centrifuge_runtime::RuntimeGenesisConfig { - system: centrifuge_runtime::SystemConfig { - code: centrifuge_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, - balances: centrifuge_runtime::BalancesConfig { balances }, - orml_asset_registry: Default::default(), - orml_tokens: centrifuge_runtime::OrmlTokensConfig { balances: vec![] }, - elections: centrifuge_runtime::ElectionsConfig { members: vec![] }, - council: centrifuge_runtime::CouncilConfig { - members: council_members, - phantom: Default::default(), + serde_json::json!({ + "balances": { "balances": balances }, + "council": { + "members": council_members, }, - fees: centrifuge_runtime::FeesConfig { - initial_fees: vec![( - // Anchoring state rent fee per day - // pre-image: 0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9 - // hash : 0x11da6d1f761ddf9bdb4c9d6e5303ebd41f61858d0a5647a1a7bfe089bf921be9 + "fees": { + "initialFees": vec![( FeeKey::AnchorsCommit, - // Daily state rent, defined such that it will amount to 0.00259.. RAD - // (2_590_000_000_000_040) over 3 years, which is the expected average anchor - // duration. The other fee components for anchors amount to about 0.00041.. RAD - // (410_000_000_000_000), such that the total anchor price for 3 years will be - // 0.003.. RAD - 2_365_296_803_653, + 2_365_296_803_653u128, )], }, - vesting: Default::default(), - staging_parachain_info: centrifuge_runtime::ParachainInfoConfig { - parachain_id: id, - ..Default::default() + "parachainInfo": { + "parachainId": id, }, - collator_selection: centrifuge_runtime::CollatorSelectionConfig { - invulnerables: initial_authorities + "collatorSelection": { + "invulnerables": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - candidacy_bond: 1 * CFG, - ..Default::default() + .collect::>(), + "candidacyBond": 1 * CFG, }, - collator_allowlist: Default::default(), - session: centrifuge_runtime::SessionConfig { - keys: initial_authorities + "session": { + "keys": initial_authorities .iter() .cloned() .map(|(acc, aura)| { @@ -416,59 +328,41 @@ fn centrifuge_genesis( get_centrifuge_session_keys(aura), // session keys ) }) - .collect(), + .collect::>(), }, - aura_ext: Default::default(), - aura: Default::default(), - democracy: Default::default(), - parachain_system: Default::default(), - bridge: centrifuge_runtime::BridgeConfig { - // Whitelist chains Ethereum - 0 - chains: vec![0], - // Register resourceIDs - resources: vec![ - // xCFG ResourceID to PalletBridge.transfer method (for incoming txs) + "bridge": { + "chains": vec![0], + "resources": vec![ ( hex!["00000000000000000000000000000009e974040e705c10fb4de576d6cc261900"], hex!["50616c6c65744272696467652e7472616e73666572"].to_vec(), ), ], - // Dev Alice - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY - // Sample Endowed1 - 5GVimUaccBq1XbjZ99Zmm8aytG6HaPCjkZGKSHC1vgrsQsLQ - relayers: vec![ - hex!["d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"].into(), - hex!["c405224448dcd4259816b09cfedbd8df0e6796b16286ea18efa2d6343da5992e"].into(), + "relayers": vec![ + Into::::into(hex!["d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"]), + Into::::into(hex!["c405224448dcd4259816b09cfedbd8df0e6796b16286ea18efa2d6343da5992e"]), ], - threshold: 1, + "threshold": 1, }, - treasury: Default::default(), - block_rewards: centrifuge_runtime::BlockRewardsConfig { - collators: initial_authorities + "blockRewards": { + "collators": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - collator_reward: 8_325 * MILLI_CFG, - treasury_inflation_rate: Rate::saturating_from_rational(3, 100), - last_update: Default::default(), + .collect::>(), + "collatorReward": 8_325 * MILLI_CFG, + "treasuryInflationRate": Rate::saturating_from_rational(3, 100), }, - block_rewards_base: Default::default(), - base_fee: Default::default(), - evm_chain_id: centrifuge_runtime::EVMChainIdConfig { - chain_id: chain_id.into(), - ..Default::default() + "evmChainId": { + "chainId": Into::::into(chain_id), }, - ethereum: Default::default(), - evm: centrifuge_runtime::EVMConfig { - accounts: precompile_account_genesis::(), - ..Default::default() + "evm": { + "accounts": precompile_account_genesis::(), }, - liquidity_rewards_base: Default::default(), - polkadot_xcm: centrifuge_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - } + }) } fn altair_genesis( @@ -478,7 +372,7 @@ fn altair_genesis( total_issuance: Option, id: ParaId, council_members: Vec, -) -> altair_runtime::RuntimeGenesisConfig { +) -> serde_json::Value { let chain_id: u32 = id.into(); endowed_accounts.extend(endowed_evm_accounts.into_iter().map(|(addr, id)| { @@ -496,29 +390,18 @@ fn altair_genesis( .iter() .cloned() .map(|k| (k, balance_per_endowed)) - .collect() + .collect::>() } None => vec![], }; - altair_runtime::RuntimeGenesisConfig { - system: altair_runtime::SystemConfig { - code: altair_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, - balances: altair_runtime::BalancesConfig { balances }, - orml_asset_registry: Default::default(), - orml_tokens: altair_runtime::OrmlTokensConfig { balances: vec![] }, - elections: altair_runtime::ElectionsConfig { members: vec![] }, - council: altair_runtime::CouncilConfig { - members: council_members, - phantom: Default::default(), + serde_json::json!({ + "balances": { "balances": balances }, + "council": { + "members": council_members, }, - - fees: altair_runtime::FeesConfig { - initial_fees: vec![( + "fees": { + "initialFees": vec![( // Anchoring state rent fee per day // pre-image: 0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9 // hash : 0x11da6d1f761ddf9bdb4c9d6e5303ebd41f61858d0a5647a1a7bfe089bf921be9 @@ -528,37 +411,31 @@ fn altair_genesis( // duration. The other fee components for anchors amount to about 0.00041.. RAD // (410_000_000_000_000), such that the total anchor price for 3 years will be // 0.003.. RAD - 2_365_296_803_653, + 2_365_296_803_653u128, )], }, - vesting: Default::default(), - staging_parachain_info: altair_runtime::ParachainInfoConfig { - parachain_id: id, - ..Default::default() + "parachainInfo": { + "parachainId": id, }, - collator_selection: altair_runtime::CollatorSelectionConfig { - invulnerables: initial_authorities + "collatorSelection": { + "invulnerables": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - candidacy_bond: 1 * AIR, - ..Default::default() + .collect::>(), + "candidacyBond": 1 * AIR, }, - block_rewards: altair_runtime::BlockRewardsConfig { - collators: initial_authorities + "blockRewards": { + "collators": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - collator_reward: 98_630 * MILLI_AIR, - treasury_inflation_rate: Rate::saturating_from_rational(3, 100), - last_update: Default::default(), + .collect::>(), + "collatorReward": 98_630 * MILLI_AIR, + "treasuryInflationRate": Rate::saturating_from_rational(3, 100), }, - block_rewards_base: Default::default(), - collator_allowlist: Default::default(), - session: altair_runtime::SessionConfig { - keys: initial_authorities + "session": { + "keys": initial_authorities .iter() .cloned() .map(|(acc, aura)| { @@ -568,29 +445,18 @@ fn altair_genesis( get_altair_session_keys(aura), // session keys ) }) - .collect(), + .collect::>(), }, - aura_ext: Default::default(), - aura: Default::default(), - democracy: Default::default(), - parachain_system: Default::default(), - treasury: Default::default(), - base_fee: Default::default(), - evm_chain_id: altair_runtime::EVMChainIdConfig { - chain_id: chain_id.into(), - ..Default::default() + "evmChainId": { + "chainId": Into::::into(chain_id), }, - ethereum: Default::default(), - evm: altair_runtime::EVMConfig { - accounts: precompile_account_genesis::(), - ..Default::default() + "evm": { + "accounts": precompile_account_genesis::(), }, - liquidity_rewards_base: Default::default(), - polkadot_xcm: altair_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - } + }) } /// The CurrencyId for the USDT asset on the development runtime @@ -604,7 +470,7 @@ fn development_genesis( endowed_evm_accounts: Vec<([u8; 20], Option)>, total_issuance: Option, id: ParaId, -) -> development_runtime::RuntimeGenesisConfig { +) -> serde_json::Value { let chain_id: u32 = id.into(); endowed_accounts.extend(endowed_evm_accounts.into_iter().map(|(addr, id)| { @@ -625,7 +491,7 @@ fn development_genesis( .iter() .cloned() .map(|x| (x, balance_per_endowed)) - .collect(), + .collect::>(), // orml_tokens balances // bootstrap each endowed accounts with 1 million of each the foreign assets. endowed_accounts @@ -635,88 +501,72 @@ fn development_genesis( // NOTE: We can only mint these foreign assets on development vec![ // USDT is a 6-decimal asset, so 1 million + 6 zeros - (x.clone(), DEV_USDT_CURRENCY_ID, 1_000_000_000_000), + (x.clone(), DEV_USDT_CURRENCY_ID, 1_000_000_000_000u128), // AUSD is a 12-decimal asset, so 1 million + 12 zeros - (x, DEV_AUSD_CURRENCY_ID, 1_000_000_000_000_000_000), + (x, DEV_AUSD_CURRENCY_ID, 1_000_000_000_000_000_000u128), ] }) - .collect(), + .collect::>(), ) } None => (vec![], vec![]), }; let chain_id: u32 = id.into(); - development_runtime::RuntimeGenesisConfig { - system: development_runtime::SystemConfig { - code: development_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, - balances: development_runtime::BalancesConfig { balances }, - orml_asset_registry: development_runtime::OrmlAssetRegistryConfig { - assets: asset_registry_assets(), - last_asset_id: Default::default(), - }, - orml_tokens: development_runtime::OrmlTokensConfig { - balances: token_balances, + serde_json::json!({ + "balances": { "balances": balances }, + "ormlAssetRegistry": { + "assets": asset_registry_assets(), }, - elections: development_runtime::ElectionsConfig { members: vec![] }, - council: development_runtime::CouncilConfig { - members: Default::default(), - phantom: Default::default(), + "ormlTokens": { + "balances": token_balances, }, - fees: development_runtime::FeesConfig { - initial_fees: vec![( + "fees": { + "initialFees": vec![( // Anchoring state rent fee per day - // pre-image: 0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9 - // hash : 0x11da6d1f761ddf9bdb4c9d6e5303ebd41f61858d0a5647a1a7bfe089bf921be9 + // pre-"image": 0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9 + // "hash ": 0x11da6d1f761ddf9bdb4c9d6e5303ebd41f61858d0a5647a1a7bfe089bf921be9 FeeKey::AnchorsCommit, // Daily state rent, defined such that it will amount to 0.00259.. RAD // (2_590_000_000_000_040) over 3 years, which is the expected average anchor // duration. The other fee components for anchors amount to about 0.00041.. RAD // (410_000_000_000_000), such that the total anchor price for 3 years will be // 0.003.. RAD - 2_365_296_803_653, + 2_365_296_803_653u128, )], }, - vesting: Default::default(), - sudo: development_runtime::SudoConfig { - key: Some(root_key), + "sudo": { + "key": Some(root_key), }, - staging_parachain_info: development_runtime::ParachainInfoConfig { - parachain_id: id, - ..Default::default() + "parachainInfo": { + "parachainId": id, }, - collator_selection: development_runtime::CollatorSelectionConfig { - invulnerables: initial_authorities + "collatorSelection": { + "invulnerables": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - candidacy_bond: 1 * CFG, - ..Default::default() + .collect::>(), + "candidacyBond": 1 * CFG, }, - collator_allowlist: Default::default(), - session: development_runtime::SessionConfig { - keys: initial_authorities + "session": { + "keys": initial_authorities .iter() .cloned() .map(|(acc, aura)| { ( acc.clone(), // account id - acc, // validator id + acc, // validator id get_development_session_keys(aura), // session keys ) }) - .collect(), + .collect::>(), }, - bridge: development_runtime::BridgeConfig { + "bridge": { // Whitelist chains Ethereum - 0 - chains: vec![0], + "chains": vec![0], // Register resourceIDs - resources: vec![ + "resources": vec![ // xCFG ResourceID to PalletBridge.transfer method (for incoming txs) ( hex!["00000000000000000000000000000009e974040e705c10fb4de576d6cc261900"], @@ -725,44 +575,31 @@ fn development_genesis( ], // Dev Alice - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY // Sample Endowed1 - 5GVimUaccBq1XbjZ99Zmm8aytG6HaPCjkZGKSHC1vgrsQsLQ - relayers: vec![ - hex!["d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"].into(), - hex!["c405224448dcd4259816b09cfedbd8df0e6796b16286ea18efa2d6343da5992e"].into(), + "relayers": vec![ + Into::::into(hex!["d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"]), + Into::::into(hex!["c405224448dcd4259816b09cfedbd8df0e6796b16286ea18efa2d6343da5992e"]), ], - threshold: 1, + "threshold": 1, }, - aura_ext: Default::default(), - aura: Default::default(), - democracy: Default::default(), - parachain_system: Default::default(), - treasury: Default::default(), - block_rewards: development_runtime::BlockRewardsConfig { - collators: initial_authorities + "blockRewards": { + "collators": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - collator_reward: 8_325 * MILLI_CFG, - treasury_inflation_rate: Rate::saturating_from_rational(3, 100), - last_update: Default::default(), + .collect::>(), + "collatorReward": 8_325 * MILLI_CFG, + "treasuryInflationRate": Rate::saturating_from_rational(3, 100), }, - base_fee: Default::default(), - evm_chain_id: development_runtime::EVMChainIdConfig { - chain_id: chain_id.into(), - ..Default::default() + "evmChainId": { + "chainId": Into::::into(chain_id), }, - ethereum: Default::default(), - evm: development_runtime::EVMConfig { - accounts: precompile_account_genesis::(), - ..Default::default() + "evm": { + "accounts": precompile_account_genesis::(), }, - block_rewards_base: Default::default(), - liquidity_rewards_base: Default::default(), - polkadot_xcm: development_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - } + }) } fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { @@ -777,14 +614,14 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { .expect("fit in the BoundedVec"), symbol: b"USDT".to_vec().try_into().expect("fit in the BoundedVec"), existential_deposit: 0u128, - location: Some(staging_xcm::VersionedMultiLocation::V3(MultiLocation { - parents: 1, - interior: X3( + location: Some(staging_xcm::VersionedLocation::V4(Location::new( + 1, + [ Parachain(parachains::rococo::rocksmine::ID), PalletInstance(parachains::rococo::rocksmine::usdt::PALLET_INSTANCE), GeneralIndex(parachains::rococo::rocksmine::usdt::GENERAL_INDEX), - ), - })), + ], + ))), additional: CustomMetadata { mintable: false, permissioned: false, @@ -805,16 +642,16 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { .expect("fit in the BoundedVec"), symbol: b"AUSD".to_vec().try_into().expect("fit in the BoundedVec"), existential_deposit: 0u128, - location: Some(staging_xcm::VersionedMultiLocation::V3(MultiLocation { - parents: 1, - interior: X2( + location: Some(staging_xcm::VersionedLocation::V4(Location::new( + 1, + [ Parachain(parachains::rococo::acala::ID), GeneralKey { length: parachains::rococo::acala::AUSD_KEY.to_vec().len() as u8, data: vec_to_fixed_array(parachains::rococo::acala::AUSD_KEY.to_vec()), }, - ), - })), + ], + ))), additional: CustomMetadata { mintable: false, permissioned: false, @@ -862,9 +699,9 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { .try_into() .expect("fit in the BoundedVec"), existential_deposit: usdc::EXISTENTIAL_DEPOSIT, - location: Some(staging_xcm::VersionedMultiLocation::V3(MultiLocation { - parents: 0, - interior: staging_xcm::v3::Junctions::X3( + location: Some(staging_xcm::VersionedLocation::V4(Location::new( + 0, + [ PalletInstance(development_runtime::LiquidityPoolsPalletIndex::get()), GlobalConsensus(NetworkId::Ethereum { chain_id: usdc::CHAIN_ID_ETH_GOERLI_TESTNET, @@ -873,8 +710,8 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { network: None, key: usdc::CONTRACT_ETH_GOERLI, }, - ), - })), + ], + ))), additional: CustomMetadata { transferability: CrossChainTransferability::LiquidityPools, mintable: false, diff --git a/node/src/cli.rs b/node/src/cli.rs index 2e8249072e..14cc189bbd 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -23,8 +23,8 @@ use crate::{chain_spec, service::evm::EthConfiguration}; #[derive(Debug, Parser)] #[allow(clippy::large_enum_variant)] pub enum Subcommand { - /// Export the genesis state of the parachain. - ExportGenesisState(cumulus_client_cli::ExportGenesisStateCommand), + /// Export the genesis head of the parachain. + ExportGenesisHead(cumulus_client_cli::ExportGenesisHeadCommand), /// Export the genesis wasm of the parachain. ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand), diff --git a/node/src/command.rs b/node/src/command.rs index 2e114a9f5d..15803399c7 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -67,10 +67,9 @@ fn load_spec(id: &str) -> std::result::Result, St "altair" => Ok(Box::new(chain_spec::altair_config())), "altair-local" => Ok(Box::new(chain_spec::altair_local(LOCAL_PARA_ID))), "catalyst" => Ok(Box::new(chain_spec::catalyst_config())), - "demo" => Ok(Box::new(chain_spec::demo(LOCAL_PARA_ID))), + "demo" => Ok(Box::new(chain_spec::demo_config())), "development" => Ok(Box::new(chain_spec::development(LOCAL_PARA_ID))), "" => Err(String::from("No Chain-id provided")), - path => { let chain_spec = chain_spec::CentrifugeChainSpec::from_json_file(path.into())?; Ok(match chain_spec.identify() { @@ -169,7 +168,7 @@ macro_rules! construct_async_run { let $components = evm::new_partial::( &$config, first_evm_block, - crate::service::build_altair_import_queue, + crate::service::build_import_queue:: )?; let task_manager = $components.task_manager; { $( $code )* }.map(|v| (v, task_manager)) @@ -178,7 +177,7 @@ macro_rules! construct_async_run { let $components = evm::new_partial::( &$config, first_evm_block, - crate::service::build_centrifuge_import_queue, + crate::service::build_import_queue::, )?; let task_manager = $components.task_manager; { $( $code )* }.map(|v| (v, task_manager)) @@ -187,11 +186,11 @@ macro_rules! construct_async_run { let $components = evm::new_partial::( &$config, first_evm_block, - crate::service::build_development_import_queue, + crate::service::build_import_queue::, )?; let task_manager = $components.task_manager; { $( $code )* }.map(|v| (v, task_manager)) - }) + }), } }} } @@ -253,9 +252,9 @@ pub fn run() -> Result<()> { }); Ok(cmd.run(components.client, components.backend, Some(aux_revert))) }), - Some(Subcommand::ExportGenesisState(cmd)) => { + Some(Subcommand::ExportGenesisHead(cmd)) => { construct_async_run!(|components, cli, cmd, config| { - Ok(async move { cmd.run(&*config.chain_spec, &*components.client) }) + Ok(async move { cmd.run(components.client) }) }) } Some(Subcommand::ExportGenesisWasm(cmd)) => { @@ -352,7 +351,10 @@ pub fn run() -> Result<()> { ); match config.chain_spec.identify() { - ChainIdentity::Altair => crate::service::start_altair_node( + ChainIdentity::Altair => crate::service::start_node::< + altair_runtime::RuntimeApi, + AltairRuntimeExecutor, + >( config, polkadot_config, cli.eth, @@ -364,7 +366,10 @@ pub fn run() -> Result<()> { .await .map(|r| r.0) .map_err(Into::into), - ChainIdentity::Centrifuge => crate::service::start_centrifuge_node( + ChainIdentity::Centrifuge => crate::service::start_node::< + centrifuge_runtime::RuntimeApi, + CentrifugeRuntimeExecutor, + >( config, polkadot_config, cli.eth, @@ -376,7 +381,10 @@ pub fn run() -> Result<()> { .await .map(|r| r.0) .map_err(Into::into), - ChainIdentity::Development => crate::service::start_development_node( + ChainIdentity::Development => crate::service::start_node::< + development_runtime::RuntimeApi, + DevelopmentRuntimeExecutor, + >( config, polkadot_config, cli.eth, diff --git a/node/src/rpc/anchors.rs b/node/src/rpc/anchors.rs index 9f8d449936..ba97f0b853 100644 --- a/node/src/rpc/anchors.rs +++ b/node/src/rpc/anchors.rs @@ -1,3 +1,4 @@ +use async_trait::async_trait; use std::sync::Arc; use cfg_primitives::BlockNumber; @@ -14,7 +15,7 @@ use crate::rpc::invalid_params_error; pub trait AnchorApi { /// Returns an anchor given an anchor id from the runtime storage #[method(name = "anchor_getAnchorById")] - fn get_anchor_by_id( + async fn get_anchor_by_id( &self, id: IdHash, at: Option, @@ -37,13 +38,14 @@ impl Anchors { } } +#[async_trait] impl AnchorApiServer for Anchors where Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, C::Api: AnchorRuntimeApi, { - fn get_anchor_by_id( + async fn get_anchor_by_id( &self, id: cfg_primitives::Hash, at: Option, diff --git a/node/src/rpc/evm.rs b/node/src/rpc/evm.rs index e95886d3c1..d968a0b484 100644 --- a/node/src/rpc/evm.rs +++ b/node/src/rpc/evm.rs @@ -12,7 +12,7 @@ use std::{collections::BTreeMap, sync::Arc}; -use fc_rpc::pending::AuraConsensusDataProvider; +use fc_rpc::pending; pub use fc_rpc::{ EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, SchemaV2Override, SchemaV3Override, StorageOverride, @@ -39,8 +39,24 @@ use sp_core::H256; use sp_inherents::CreateInherentDataProviders; use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; +pub struct CentrifugeEthConfig(std::marker::PhantomData<(B, C, BE)>); +impl fc_rpc::EthConfig for CentrifugeEthConfig +where + B: BlockT, + C: sc_client_api::StorageProvider + Sync + Send + 'static, + BE: Backend + 'static, +{ + // This type is intended to override (i.e. adapt) evm calls to precompiles for proper gas estimation. + // + // NOTE: Not used by our precompiles right now. Therefore, no need to provide impl. + type EstimateGasAdapter = (); + // Assumes the use of HashedMapping for address mapping + type RuntimeStorageOverride = + fc_rpc::frontier_backend_client::SystemAccountId32StorageOverride; +} + /// Extra dependencies for Ethereum compatibility. -pub struct Deps { +pub struct EvmDeps { /// The client instance to use. pub client: Arc, /// Transaction pool instance. @@ -58,7 +74,7 @@ pub struct Deps { /// Chain syncing service pub sync: Arc>, /// Frontier Backend. - pub frontier_backend: Arc + Send + Sync>, + pub frontier_backend: Arc>, /// Ethereum data access overrides. pub overrides: Arc>, /// Cache for Ethereum block data. @@ -78,6 +94,8 @@ pub struct Deps { pub forced_parent_hashes: Option>, /// Something that can create the inherent data providers for pending state pub pending_create_inherent_data_providers: CIDP, + /// Something that can create the consensus data providers for pending state + pub pending_consensus_data_provider: Option>>, } pub fn overrides_handle, C, BE>(client: Arc) -> Arc> @@ -113,7 +131,7 @@ where pub fn create( mut io: RpcModule<()>, - deps: Deps, + deps: EvmDeps, subscription_task_executor: SubscriptionTaskExecutor, pubsub_notification_sinks: Arc< fc_mapping_sync::EthereumBlockNotificationSinks< @@ -149,25 +167,26 @@ where EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer, }; - let Deps { + let EvmDeps { client, pool, graph, converter: _converter, + sync, is_authority, enable_dev_signer, network, - sync, - frontier_backend, overrides, + frontier_backend, block_data_cache, - filter_pool, - max_past_logs, fee_history_cache, fee_history_cache_limit, execute_gas_limit_multiplier, + filter_pool, + max_past_logs, forced_parent_hashes, pending_create_inherent_data_providers, + pending_consensus_data_provider, } = deps; let mut signers = Vec::new(); @@ -187,7 +206,7 @@ where let convert_transaction: Option = None; io.merge( - Eth::new( + Eth::<_, _, _, _, _, _, _, ()>::new( Arc::clone(&client), Arc::clone(&pool), graph.clone(), @@ -203,8 +222,9 @@ where execute_gas_limit_multiplier, forced_parent_hashes, pending_create_inherent_data_providers, - Some(Box::new(AuraConsensusDataProvider::new(client.clone()))), + pending_consensus_data_provider, ) + .replace_config::>() .into_rpc(), )?; diff --git a/node/src/rpc/mod.rs b/node/src/rpc/mod.rs index 9c05615cce..610f464754 100644 --- a/node/src/rpc/mod.rs +++ b/node/src/rpc/mod.rs @@ -12,14 +12,13 @@ //! Centrifuge RPC endpoints (common endpoints across all environments) -use std::{fmt::Debug, sync::Arc}; +use std::sync::Arc; -use cfg_primitives::{AccountId, Balance, Nonce}; -use jsonrpsee::{ - core::Error as JsonRpseeError, - types::error::{CallError, ErrorCode, ErrorObject}, -}; +use crate::rpc::anchors::{AnchorApiServer, Anchors}; +use cfg_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Nonce}; +use jsonrpsee::types::error::{ErrorCode, ErrorObject}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; +use runtime_common::apis::AnchorApi; use sc_rpc_api::DenyUnsafe; use sc_service::TransactionPool; use sp_api::ProvideRuntimeApi; @@ -29,58 +28,38 @@ use substrate_frame_rpc_system::{System, SystemApiServer}; pub mod anchors; pub mod evm; -pub mod pools; -pub mod rewards; /// A type representing all RPC extensions. pub type RpcExtension = jsonrpsee::RpcModule<()>; /// Instantiate all Full RPC extensions. -pub fn create_full( +pub fn create_full( client: Arc, pool: Arc

, deny_unsafe: DenyUnsafe, ) -> Result> where - Block: sp_api::BlockT, - C: ProvideRuntimeApi, - C: HeaderBackend + HeaderMetadata, - C: Send + Sync + 'static, - C::Api: substrate_frame_rpc_system::AccountNonceApi, + C: ProvideRuntimeApi + + HeaderBackend + + HeaderMetadata + + Send + + Sync + + 'static, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, + C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: BlockBuilder, + C::Api: AnchorApi, P: TransactionPool + Sync + Send + 'static, { let mut module = RpcExtension::new(()); module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; - module.merge(TransactionPayment::new(client).into_rpc())?; + module.merge(TransactionPayment::new(client.clone()).into_rpc())?; + module.merge(Anchors::new(client.clone()).into_rpc())?; Ok(module) } -/// Our custom error type for RPC server errors -#[repr(i32)] -pub enum CustomServerError { - /// The call failed on the Runtime level - RuntimeError = 1, -} - -pub fn runtime_error( - message: &'static str, - inner_error: InnerError, -) -> JsonRpseeError { - JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( - ErrorCode::ServerError(CustomServerError::RuntimeError as i32).code(), - message, - Some(format!("{inner_error:?}")), - ))) -} - -pub fn invalid_params_error(msg: &'static str) -> JsonRpseeError { - JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( - ErrorCode::InvalidParams.code(), - msg, - Option::<()>::None, - ))) +pub fn invalid_params_error(msg: &'static str) -> ErrorObject { + ErrorObject::owned(ErrorCode::InvalidParams.code(), msg, Option::<()>::None) } diff --git a/node/src/rpc/pools.rs b/node/src/rpc/pools.rs deleted file mode 100644 index f411486357..0000000000 --- a/node/src/rpc/pools.rs +++ /dev/null @@ -1,202 +0,0 @@ -use std::{fmt::Debug, sync::Arc}; - -use jsonrpsee::{core::RpcResult, proc_macros::rpc}; -use pallet_pool_system::{ - tranches::{TrancheIndex, TrancheLoc, TrancheSolution}, - EpochSolution, -}; -use parity_scale_codec::Codec; -use runtime_common::apis::PoolsApi as PoolsRuntimeApi; -use sp_api::ProvideRuntimeApi; -use sp_blockchain::HeaderBackend; -use sp_runtime::traits::{Block as BlockT, Get}; - -use crate::rpc::{invalid_params_error, runtime_error}; - -#[rpc(client, server)] -pub trait PoolsApi -where - MaxTranches: Get, -{ - #[method(name = "pools_currency")] - fn currency(&self, poold_id: PoolId, at: Option) -> RpcResult; - - #[method(name = "pools_inspectEpochSolution")] - fn inspect_epoch_solution( - &self, - pool_id: PoolId, - solution: Vec, - at: Option, - ) -> RpcResult>; - - #[method(name = "pools_trancheTokenPrice")] - fn tranche_token_price( - &self, - pool_id: PoolId, - tranche: TrancheId, - at: Option, - ) -> RpcResult; - - #[method(name = "pools_trancheTokenPrices")] - fn tranche_token_prices( - &self, - pool_id: PoolId, - at: Option, - ) -> RpcResult>; - - #[method(name = "pools_trancheIds")] - fn tranche_ids(&self, pool_id: PoolId, at: Option) -> RpcResult>; - - #[method(name = "pools_trancheId")] - fn tranche_id( - &self, - pool_id: PoolId, - tranche_index: TrancheIndex, - at: Option, - ) -> RpcResult; - - #[method(name = "pools_trancheCurrency")] - fn tranche_currency( - &self, - pool_id: PoolId, - tranche_id: TrancheId, - at: Option, - ) -> RpcResult; -} - -pub struct Pools { - client: Arc, - _marker: std::marker::PhantomData

, -} - -impl Pools { - pub fn new(client: Arc) -> Self { - Pools { - client, - _marker: Default::default(), - } - } -} - -impl - PoolsApiServer - for Pools -where - Block: BlockT, - C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, - C::Api: PoolsRuntimeApi, - Balance: Codec + Copy, - PoolId: Codec + Copy + Debug, - TrancheId: Codec + Clone + Debug, - Currency: Codec, - BalanceRatio: Codec, - MaxTranches: Codec + Get, -{ - fn currency(&self, pool_id: PoolId, at: Option) -> RpcResult { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.currency(at, pool_id) - .map_err(|e| runtime_error("Unable to query pool currency", e))? - .ok_or_else(|| invalid_params_error("Pool not found")) - } - - fn inspect_epoch_solution( - &self, - pool_id: PoolId, - solution: Vec, - at: Option, - ) -> RpcResult> { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.inspect_epoch_solution(at, pool_id, solution) - .map_err(|e| runtime_error("Unable to query inspection for epoch solution", e))? - .ok_or_else(|| invalid_params_error("Pool not found or invalid solution")) - } - - fn tranche_token_price( - &self, - pool_id: PoolId, - tranche_id: TrancheId, - at: Option, - ) -> RpcResult { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.tranche_token_price(at, pool_id, TrancheLoc::Id(tranche_id)) - .map_err(|e| runtime_error("Unable to query tranche token price", e))? - .ok_or_else(|| invalid_params_error("Pool or tranche not found")) - } - - fn tranche_token_prices( - &self, - pool_id: PoolId, - at: Option, - ) -> RpcResult> { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.tranche_token_prices(at, pool_id) - .map_err(|e| runtime_error("Unable to query tranche token prices.", e))? - .ok_or_else(|| invalid_params_error("Pool not found.")) - } - - fn tranche_ids(&self, pool_id: PoolId, at: Option) -> RpcResult> { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.tranche_ids(at, pool_id) - .map_err(|e| runtime_error("Unable to query tranche ids.", e))? - .ok_or_else(|| invalid_params_error("Pool not found")) - } - - fn tranche_id( - &self, - pool_id: PoolId, - tranche_index: TrancheIndex, - at: Option, - ) -> RpcResult { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.tranche_id(at, pool_id, tranche_index) - .map_err(|e| runtime_error("Unable to query tranche ids.", e))? - .ok_or_else(|| invalid_params_error("Pool or tranche not found.")) - } - - fn tranche_currency( - &self, - pool_id: PoolId, - tranche_id: TrancheId, - at: Option, - ) -> RpcResult { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.tranche_currency(at, pool_id, TrancheLoc::Id(tranche_id)) - .map_err(|e| runtime_error("Unable to query tranche currency.", e))? - .ok_or_else(|| invalid_params_error("Pool or tranche not found.")) - } -} diff --git a/node/src/rpc/rewards.rs b/node/src/rpc/rewards.rs deleted file mode 100644 index 038b601640..0000000000 --- a/node/src/rpc/rewards.rs +++ /dev/null @@ -1,91 +0,0 @@ -use std::{fmt::Debug, sync::Arc}; - -use jsonrpsee::{core::RpcResult, proc_macros::rpc}; -use parity_scale_codec::Codec; -use runtime_common::apis::{RewardDomain, RewardsApi as RewardsRuntimeApi}; -use sp_api::ProvideRuntimeApi; -use sp_blockchain::HeaderBackend; -use sp_runtime::traits::Block as BlockT; - -use crate::rpc::{invalid_params_error, runtime_error}; - -#[rpc(client, server)] -pub trait RewardsApi { - #[method(name = "rewards_listCurrencies")] - fn list_currencies( - &self, - domain: RewardDomain, - account_id: AccountId, - at: Option, - ) -> RpcResult>; - - #[method(name = "rewards_computeReward")] - fn compute_reward( - &self, - domain: RewardDomain, - currency_id: CurrencyId, - account_id: AccountId, - at: Option, - ) -> RpcResult; -} - -pub struct Rewards { - client: Arc, - _marker: std::marker::PhantomData

, -} - -impl Rewards { - pub fn new(client: Arc) -> Self { - Rewards { - client, - _marker: Default::default(), - } - } -} - -impl - RewardsApiServer for Rewards -where - Block: BlockT, - C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, - C::Api: RewardsRuntimeApi, - AccountId: Codec, - Balance: Codec + Copy, - CurrencyId: Codec + Copy + Debug, -{ - fn list_currencies( - &self, - domain: RewardDomain, - account_id: AccountId, - at: Option, - ) -> RpcResult> { - let api = self.client.runtime_api(); - - let hash = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.list_currencies(hash, domain, account_id) - .map_err(|e| runtime_error("Unable to list currencies", e)) - } - - fn compute_reward( - &self, - domain: RewardDomain, - currency_id: CurrencyId, - account_id: AccountId, - at: Option, - ) -> RpcResult { - let api = self.client.runtime_api(); - - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.compute_reward(at, domain, currency_id, account_id) - .map_err(|e| runtime_error("Unable to compute reward", e))? - .ok_or_else(|| invalid_params_error("Reward not found")) - } -} diff --git a/node/src/service.rs b/node/src/service.rs index 21e89f2c88..f80b0450d2 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -14,28 +14,29 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -// TODO: Please fix deprecated issues before/during polkadot-v1.3.0 upgrade -#![allow(deprecated)] - use std::sync::Arc; +use std::time::Duration; -use cfg_primitives::{Block, BlockNumber}; +use cfg_primitives::{AccountId, AuraId, Balance, Block, BlockNumber, Hash, Nonce}; use cumulus_client_cli::CollatorOptions; -use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion}; +use cumulus_client_collator::service::CollatorService; use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport; +use cumulus_client_consensus_proposer::Proposer; use cumulus_primitives_core::ParaId; +use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface}; use fc_db::Backend as FrontierBackend; +use fc_rpc::pending::{AuraConsensusDataProvider, ConsensusDataProvider}; +use polkadot_primitives::CollatorPair; use sc_executor::NativeElseWasmExecutor; +use sc_network_sync::SyncingService; use sc_service::{Configuration, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::TelemetryHandle; +use sp_api::ConstructRuntimeApi; use sp_core::U256; +use sp_keystore::KeystorePtr; +use substrate_prometheus_endpoint::Registry; -use crate::rpc::{ - self, - anchors::{AnchorApiServer, Anchors}, - pools::{Pools, PoolsApiServer}, - rewards::{Rewards, RewardsApiServer}, -}; +use crate::rpc::{self}; pub(crate) mod evm; use evm::EthConfiguration; @@ -48,6 +49,40 @@ type FullBackend = TFullBackend; type ParachainBlockImport = TParachainBlockImport>, FullBackend>; +pub trait RuntimeApiCollection: + sp_transaction_pool::runtime_api::TaggedTransactionQueue + + sp_api::ApiExt + + sp_block_builder::BlockBuilder + + substrate_frame_rpc_system::AccountNonceApi + + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi + + sp_api::Metadata + + sp_offchain::OffchainWorkerApi + + sp_session::SessionKeys + + fp_rpc::ConvertTransactionRuntimeApi + + fp_rpc::EthereumRuntimeRPCApi + + sp_consensus_aura::AuraApi + + runtime_common::apis::AnchorApi + + cumulus_primitives_core::CollectCollationInfo +{ +} + +impl RuntimeApiCollection for Api where + Api: sp_transaction_pool::runtime_api::TaggedTransactionQueue + + sp_api::ApiExt + + sp_block_builder::BlockBuilder + + substrate_frame_rpc_system::AccountNonceApi + + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi + + sp_api::Metadata + + sp_offchain::OffchainWorkerApi + + sp_session::SessionKeys + + fp_rpc::ConvertTransactionRuntimeApi + + fp_rpc::EthereumRuntimeRPCApi + + sp_consensus_aura::AuraApi + + runtime_common::apis::AnchorApi + + cumulus_primitives_core::CollectCollationInfo +{ +} + // Native Altair executor instance. pub struct AltairRuntimeExecutor; @@ -111,55 +146,8 @@ impl sc_executor::NativeExecutionDispatch for DevelopmentRuntimeExecutor { } } -/// Build the import queue for the "altair" runtime. -#[allow(clippy::type_complexity)] -pub fn build_altair_import_queue( - client: Arc>, - block_import: ParachainBlockImport, - config: &Configuration, - telemetry: Option, - task_manager: &TaskManager, - frontier_backend: FrontierBackend, - first_evm_block: BlockNumber, -) -> Result, sc_service::Error> { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - let block_import = evm::BlockImport::new( - block_import, - first_evm_block, - client.clone(), - Arc::new(frontier_backend), - ); - - cumulus_client_consensus_aura::import_queue::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - >(cumulus_client_consensus_aura::ImportQueueParams { - block_import, - client, - create_inherent_data_providers: move |_, _| async move { - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - Ok((slot, time)) - }, - registry: config.prometheus_registry(), - spawner: &task_manager.spawn_essential_handle(), - telemetry, - }) - .map_err(Into::into) -} - -/// Start an altair parachain node. -pub async fn start_altair_node( +/// Start a generic parachain node. +pub async fn start_node( parachain_config: Configuration, polkadot_config: Configuration, eth_config: EthConfiguration, @@ -167,13 +155,16 @@ pub async fn start_altair_node( id: ParaId, hwbench: Option, first_evm_block: BlockNumber, -) -> sc_service::error::Result<( - TaskManager, - Arc>, -)> { +) -> sc_service::error::Result<(TaskManager, Arc>)> +where + RuntimeApi: + ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCollection, + Executor: sc_executor::NativeExecutionDispatch + 'static, +{ let is_authority = parachain_config.role.is_authority(); - evm::start_node_impl::( + evm::start_node_impl::( parachain_config, polkadot_config, eth_config, @@ -181,6 +172,7 @@ pub async fn start_altair_node( id, hwbench, first_evm_block, + // follows Moonbeam's create_full move |client, pool, deny_unsafe, @@ -207,15 +199,10 @@ pub async fn start_altair_node( let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); Ok((slot, timestamp, dynamic_fee)) }; + let pending_consensus_data_provider = Some(Box::new(AuraConsensusDataProvider::new(client.clone())) as Box>); - let mut module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; - module - .merge(Anchors::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - module - .merge(Pools::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - let eth_deps = rpc::evm::Deps { + let module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; + let eth_deps = rpc::evm::EvmDeps { client, pool: pool.clone(), graph: pool.pool().clone(), @@ -238,6 +225,7 @@ pub async fn start_altair_node( execute_gas_limit_multiplier: eth_config.execute_gas_limit_multiplier, forced_parent_hashes: None, pending_create_inherent_data_providers, + pending_consensus_data_provider }; let module = rpc::evm::create( module, @@ -247,104 +235,30 @@ pub async fn start_altair_node( )?; Ok(module) }, - build_altair_import_queue, - |client, - block_import, - prometheus_registry, - telemetry, - task_manager, - relay_chain_interface, - transaction_pool, - sync_oracle, - keystore, - force_authoring| { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - - let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry, - telemetry.clone(), - ); - - /* // TODO in v1.3.0 - let proposer = Proposer::new(proposer_factory); - - let collator_service = CollatorService::new( - client.clone(), - Arc::new(task_manager.spawn_handle()), - announce_block, - client.clone() - ); - */ - - Ok(AuraConsensus::build::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - _, - >(BuildAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |_, (relay_parent, validation_data)| { - let relay_chain_interface = relay_chain_interface.clone(); - async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - id, - ).await; - - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - Ok((slot, time, parachain_inherent)) - } - }, - block_import, - para_client: client, - backoff_authoring_blocks: Option::<()>::None, - sync_oracle, - keystore, - force_authoring, - slot_duration, - telemetry, - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), - // And a maximum of 750ms if slots are skipped - max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), - })) - }, + build_import_queue::, ) .await } -/// Build the import queue for the "centrifuge" runtime. +/// Builds a generic import queue. The runtime is specified via the generics. +/// +/// NOTE: Almost entirely taken from Polkadot SDK. #[allow(clippy::type_complexity)] -pub fn build_centrifuge_import_queue( - client: Arc>, - block_import: ParachainBlockImport, +pub fn build_import_queue( + client: Arc>, + block_import: ParachainBlockImport, config: &Configuration, telemetry: Option, task_manager: &TaskManager, frontier_backend: FrontierBackend, first_evm_block: BlockNumber, -) -> Result, sc_service::Error> { +) -> Result, sc_service::Error> +where + RuntimeApi: + ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCollection, + Executor: sc_executor::NativeExecutionDispatch + 'static, +{ let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; let block_import = evm::BlockImport::new( block_import, @@ -353,410 +267,105 @@ pub fn build_centrifuge_import_queue( Arc::new(frontier_backend), ); - cumulus_client_consensus_aura::import_queue::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - >(cumulus_client_consensus_aura::ImportQueueParams { - block_import, - client, - create_inherent_data_providers: move |_, _| async move { - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - Ok((slot, time)) - }, - registry: config.prometheus_registry(), - spawner: &task_manager.spawn_essential_handle(), - telemetry, - }) - .map_err(Into::into) -} - -/// Start a centrifuge parachain node. -pub async fn start_centrifuge_node( - parachain_config: Configuration, - polkadot_config: Configuration, - eth_config: EthConfiguration, - collator_options: CollatorOptions, - id: ParaId, - hwbench: Option, - first_evm_block: BlockNumber, -) -> sc_service::error::Result<( - TaskManager, - Arc>, -)> { - let is_authority = parachain_config.role.is_authority(); - - evm::start_node_impl::( - parachain_config, - polkadot_config, - eth_config, - collator_options, - id, - hwbench, - first_evm_block, - move |client, - pool, - deny_unsafe, - subscription_task_executor, - network, - sync_service, - frontier_backend, - filter_pool, - fee_history_cache, - overrides, - block_data_cache| { - - let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - let target_gas_price = eth_config.target_gas_price; - let pending_create_inherent_data_providers = move |_, ()| async move { - let current = sp_timestamp::InherentDataProvider::from_system_time(); - let next_slot = current.timestamp().as_millis() + slot_duration.as_millis(); - let timestamp = sp_timestamp::InherentDataProvider::new(next_slot.into()); - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); - Ok((slot, timestamp, dynamic_fee)) - }; - - let mut module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; - module - .merge(Anchors::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - module - .merge(Pools::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - let eth_deps = rpc::evm::Deps { - client, - pool: pool.clone(), - graph: pool.pool().clone(), - converter: Some(development_runtime::TransactionConverter), - is_authority, - enable_dev_signer: eth_config.enable_dev_signer, - network, - sync: sync_service.clone(), - frontier_backend: match frontier_backend.clone() { - fc_db::Backend::KeyValue(b) => Arc::new(b), - #[cfg(feature = "sql")] - fc_db::Backend::Sql(b) => Arc::new(b), - }, - overrides, - block_data_cache, - filter_pool: Some(filter_pool), - max_past_logs: eth_config.max_past_logs, - fee_history_cache, - fee_history_cache_limit: eth_config.fee_history_limit, - execute_gas_limit_multiplier: eth_config.execute_gas_limit_multiplier, - forced_parent_hashes: None, - pending_create_inherent_data_providers, - }; - let module = rpc::evm::create( - module, - eth_deps, - subscription_task_executor, - Arc::new(Default::default()), - )?; - Ok(module) - }, - build_centrifuge_import_queue, - |client, - block_import, - prometheus_registry, - telemetry, - task_manager, - relay_chain_interface, - transaction_pool, - sync_oracle, - keystore, - force_authoring| { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - - let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry, - telemetry.clone(), - ); - - Ok(AuraConsensus::build::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - _, - >(BuildAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |_, (relay_parent, validation_data)| { - let relay_chain_interface = relay_chain_interface.clone(); - async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - id, - ).await; - - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - Ok((slot, time, parachain_inherent)) - } - }, - block_import, - para_client: client, - backoff_authoring_blocks: Option::<()>::None, - sync_oracle, - keystore, - force_authoring, - slot_duration, - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), - // And a maximum of 750ms if slots are skipped - max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), - telemetry, - })) - }, + Ok( + cumulus_client_consensus_aura::equivocation_import_queue::fully_verifying_import_queue::< + sp_consensus_aura::sr25519::AuthorityPair, + _, + _, + _, + _, + >( + client, + block_import, + move |_, _| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + Ok(timestamp) + }, + slot_duration, + &task_manager.spawn_essential_handle(), + config.prometheus_registry(), + telemetry, + ), ) - .await } -/// Build the import queue for the "development" runtime. -#[allow(clippy::type_complexity)] -pub fn build_development_import_queue( - client: Arc>, - block_import: ParachainBlockImport, - config: &Configuration, +/// Starts the aura consensus. +/// +/// NOTE: Taken from Polkadot SDK because Moonbeam uses their custom Nimbus consensus +fn start_consensus( + client: Arc>, + block_import: ParachainBlockImport, + prometheus_registry: Option<&Registry>, telemetry: Option, task_manager: &TaskManager, - frontier_backend: FrontierBackend, - first_evm_block: BlockNumber, -) -> Result, sc_service::Error> { + relay_chain_interface: Arc, + transaction_pool: Arc>>, + sync_oracle: Arc>, + keystore: KeystorePtr, + relay_chain_slot_duration: Duration, + para_id: ParaId, + collator_key: CollatorPair, + overseer_handle: OverseerHandle, + announce_block: Arc>) + Send + Sync>, +) -> Result<(), sc_service::Error> +where + RuntimeApi: + ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCollection, + Executor: sc_executor::NativeExecutionDispatch + 'static, +{ + use cumulus_client_consensus_aura::collators::basic::{ + self as basic_aura, Params as BasicAuraParams, + }; + + // NOTE: because we use Aura here explicitly, we can use `CollatorSybilResistance::Resistant` + // when starting the network. + let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - let block_import = evm::BlockImport::new( - block_import, - first_evm_block, + + let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( + task_manager.spawn_handle(), client.clone(), - Arc::new(frontier_backend), + transaction_pool, + prometheus_registry, + telemetry.clone(), ); - cumulus_client_consensus_aura::import_queue::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - >(cumulus_client_consensus_aura::ImportQueueParams { - block_import, - client, - create_inherent_data_providers: move |_, _| async move { - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - Ok((slot, time)) - }, - registry: config.prometheus_registry(), - spawner: &task_manager.spawn_essential_handle(), - telemetry, - }) - .map_err(Into::into) -} - -/// Start a development parachain node. -pub async fn start_development_node( - parachain_config: Configuration, - polkadot_config: Configuration, - eth_config: EthConfiguration, - collator_options: CollatorOptions, - id: ParaId, - hwbench: Option, - first_evm_block: BlockNumber, -) -> sc_service::error::Result<( - TaskManager, - Arc>, -)> { - let is_authority = parachain_config.role.is_authority(); - - evm::start_node_impl::( - parachain_config, - polkadot_config, - eth_config, - collator_options, - id, - hwbench, - first_evm_block, - move |client, - pool, - deny_unsafe, - subscription_task_executor, - network, - sync_service, - frontier_backend, - filter_pool, - fee_history_cache, - overrides, - block_data_cache| { + let proposer = Proposer::new(proposer_factory); - let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - let target_gas_price = eth_config.target_gas_price; - let pending_create_inherent_data_providers = move |_, ()| async move { - let current = sp_timestamp::InherentDataProvider::from_system_time(); - let next_slot = current.timestamp().as_millis() + slot_duration.as_millis(); - let timestamp = sp_timestamp::InherentDataProvider::new(next_slot.into()); - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); - Ok((slot, timestamp, dynamic_fee)) - }; + let collator_service = CollatorService::new( + client.clone(), + Arc::new(task_manager.spawn_handle()), + announce_block, + client.clone(), + ); - let mut module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; - module - .merge(Anchors::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - module - .merge(Pools::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - module - .merge(Rewards::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - let eth_deps = rpc::evm::Deps { - client, - pool: pool.clone(), - graph: pool.pool().clone(), - converter: Some(development_runtime::TransactionConverter), - is_authority, - enable_dev_signer: eth_config.enable_dev_signer, - network, - sync: sync_service.clone(), - frontier_backend: match frontier_backend.clone() { - fc_db::Backend::KeyValue(b) => Arc::new(b), - #[cfg(feature = "sql")] - fc_db::Backend::Sql(b) => Arc::new(b), - }, - overrides, - block_data_cache, - filter_pool: Some(filter_pool), - max_past_logs: eth_config.max_past_logs, - fee_history_cache, - fee_history_cache_limit: eth_config.fee_history_limit, - execute_gas_limit_multiplier: eth_config.execute_gas_limit_multiplier, - forced_parent_hashes: None, - pending_create_inherent_data_providers, - }; - let module = rpc::evm::create( - module, - eth_deps, - subscription_task_executor, - Arc::new(Default::default()), - )?; - Ok(module) - }, - build_development_import_queue, - |client, - block_import, - prometheus_registry, - telemetry, - task_manager, - relay_chain_interface, - transaction_pool, - sync_oracle, - keystore, - force_authoring| { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - - let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry, - telemetry.clone(), - ); - - Ok(AuraConsensus::build::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - _, - >(BuildAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |_, (relay_parent, validation_data)| { - let relay_chain_interface = relay_chain_interface.clone(); - async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - id, - ).await; - - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - Ok((slot, time, parachain_inherent)) - } - }, - block_import, - para_client: client, - backoff_authoring_blocks: Option::<()>::None, - sync_oracle, - keystore, - force_authoring, - slot_duration, - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), - // And a maximum of 750ms if slots are skipped - max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), - telemetry, - })) - }, - ) - .await + let params = BasicAuraParams { + create_inherent_data_providers: move |_, ()| async move { Ok(()) }, + block_import, + para_client: client, + relay_client: relay_chain_interface, + sync_oracle, + keystore, + collator_key, + para_id, + overseer_handle, + slot_duration, + relay_chain_slot_duration, + proposer, + collator_service, + // Very limited proposal time. + authoring_duration: Duration::from_millis(500), + collation_request_receiver: None, + }; + + let fut = + basic_aura::run::( + params, + ); + task_manager + .spawn_essential_handle() + .spawn("aura", None, fut); + + Ok(()) } diff --git a/node/src/service/evm.rs b/node/src/service/evm.rs index 319e9a01a2..fedf35d97e 100644 --- a/node/src/service/evm.rs +++ b/node/src/service/evm.rs @@ -20,11 +20,10 @@ use std::{ use cfg_primitives::{Block, BlockNumber, Hash}; use cumulus_client_cli::CollatorOptions; -use cumulus_client_consensus_common::{ParachainBlockImportMarker, ParachainConsensus}; +use cumulus_client_consensus_common::ParachainBlockImportMarker; use cumulus_client_service::{ - build_network, build_relay_chain_interface, prepare_node_config, start_collator, - start_full_node, BuildNetworkParams, CollatorSybilResistance, StartCollatorParams, - StartFullNodeParams, + build_network, build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, + BuildNetworkParams, CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams, }; use cumulus_primitives_core::ParaId; use cumulus_relay_chain_interface::RelayChainInterface; @@ -34,7 +33,7 @@ use fc_mapping_sync::{kv::MappingSyncWorker, SyncStrategy}; use fc_rpc::{EthBlockDataCacheTask, EthTask, OverrideHandle}; use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool}; use fp_consensus::ensure_log; -use fp_rpc::{ConvertTransactionRuntimeApi, EthereumRuntimeRPCApi}; +use fp_rpc::EthereumRuntimeRPCApi; use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; use futures::{future, StreamExt}; use sc_client_api::{backend::AuxStore, BlockOf, BlockchainEvents}; @@ -45,17 +44,17 @@ use sc_network::{NetworkBlock, NetworkService}; use sc_network_sync::SyncingService; use sc_rpc::SubscriptionTaskExecutor; use sc_rpc_api::DenyUnsafe; -use sc_service::{Configuration, PartialComponents, TFullBackend, TaskManager}; +use sc_service::{Configuration, PartialComponents, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sp_api::{ConstructRuntimeApi, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_blockchain::HeaderBackend; use sp_consensus::Error as ConsensusError; -use sp_keystore::KeystorePtr; use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Header as HeaderT}; -use substrate_prometheus_endpoint::Registry; -use super::{rpc, FullBackend, FullClient, ParachainBlockImport}; +use super::{ + rpc, start_consensus, FullBackend, FullClient, ParachainBlockImport, RuntimeApiCollection, +}; /// The ethereum-compatibility configuration used to run a node. #[derive(Clone, Copy, Debug, clap::Parser)] @@ -165,6 +164,25 @@ fn db_config_dir(config: &Configuration) -> PathBuf { config.base_path.config_dir(config.chain_spec.id()) } +/// Assembly of PartialComponents (enough to run chain ops subcommands) +/// +/// NOTE: Based on Polkadot SDK +pub type Service = PartialComponents< + FullClient, + FullBackend, + (), + sc_consensus::DefaultImportQueue, + sc_transaction_pool::FullPool>, + ( + ParachainBlockImport, + Option, + Option, + FrontierBackend, + FilterPool, + FeeHistoryCache, + ), +>; + /// Starts a `ServiceBuilder` for a full service. /// /// Use this macro if you don't actually need the full service, but just the @@ -174,35 +192,13 @@ pub fn new_partial( config: &Configuration, first_evm_block: BlockNumber, build_import_queue: BIQ, -) -> Result< - PartialComponents< - FullClient, - FullBackend, - (), - sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool>, - ( - ParachainBlockImport, - Option, - Option, - FrontierBackend, - FilterPool, - FeeHistoryCache, - ), - >, - sc_service::Error, -> +) -> Result, sc_service::Error> where Executor: sc_executor::NativeExecutionDispatch + 'static, RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue - + sp_api::Metadata - + sp_session::SessionKeys - + sp_api::ApiExt - + sp_offchain::OffchainWorkerApi - + sp_block_builder::BlockBuilder, - sc_client_api::StateBackendFor: sp_api::StateBackend, + RuntimeApi::RuntimeApi: RuntimeApiCollection, + sc_client_api::StateBackendFor: sc_client_api::StateBackend, BIQ: FnOnce( Arc>, ParachainBlockImport, @@ -317,31 +313,22 @@ where /// runtime api. #[allow(clippy::too_many_arguments)] #[sc_tracing::logging::prefix_logs_with("🌀Parachain")] -pub(crate) async fn start_node_impl( +pub(crate) async fn start_node_impl( parachain_config: Configuration, polkadot_config: Configuration, eth_config: EthConfiguration, collator_options: CollatorOptions, - id: ParaId, + para_id: ParaId, hwbench: Option, first_evm_block: BlockNumber, rpc_ext_builder: RB, build_import_queue: BIQ, - build_consensus: BIC, ) -> sc_service::error::Result<(TaskManager, Arc>)> where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue - + sp_api::Metadata - + sp_session::SessionKeys - + sp_api::ApiExt - + sp_offchain::OffchainWorkerApi - + sp_block_builder::BlockBuilder - + cumulus_primitives_core::CollectCollationInfo - + EthereumRuntimeRPCApi - + ConvertTransactionRuntimeApi, - sc_client_api::StateBackendFor: sp_api::StateBackend, + RuntimeApi::RuntimeApi: RuntimeApiCollection, + sc_client_api::StateBackendFor: sc_client_api::StateBackend, Executor: sc_executor::NativeExecutionDispatch + 'static, RB: Fn( Arc>, @@ -366,18 +353,6 @@ where FrontierBackend, BlockNumber, ) -> Result, sc_service::Error>, - BIC: FnOnce( - Arc>, - ParachainBlockImport, - Option<&Registry>, - Option, - &TaskManager, - Arc, - Arc>>, - Arc>, - KeystorePtr, - bool, - ) -> Result>, sc_service::Error>, { let parachain_config = prepare_node_config(parachain_config); @@ -410,7 +385,6 @@ where .await .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; - let force_authoring = parachain_config.force_authoring; let validator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); @@ -423,7 +397,7 @@ where net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), - para_id: id, + para_id, spawn_handle: task_manager.spawn_handle(), relay_chain_interface: relay_chain_interface.clone(), import_queue: params.import_queue, @@ -482,7 +456,6 @@ where telemetry: telemetry.as_mut(), })?; - // do we need this at all? spawn_frontier_tasks::( &task_manager, client.clone(), @@ -502,10 +475,14 @@ where // Putting a link in there and swapping out the requirements for your own are // probably a good idea. The requirements for a para-chain are dictated by its // relay-chain. - if !SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) && validator { - log::warn!( - "⚠️ The hardware does not meet the minimal requirements for role 'Authority'." + match SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) { + Err(err) if validator => { + log::warn!( + "⚠️ The hardware does not meet the minimal requirements {} for role 'Authority'.", + err ); + } + _ => {} } if let Some(ref mut telemetry) = telemetry { @@ -527,10 +504,27 @@ where .overseer_handle() .map_err(|e| sc_service::Error::Application(Box::new(e)))?; - let recovery_handle = Box::new(overseer_handle); + // Follows Polkadot SDK + start_relay_chain_tasks(StartRelayChainTasksParams { + client: client.clone(), + announce_block: announce_block.clone(), + para_id, + relay_chain_interface: relay_chain_interface.clone(), + task_manager: &mut task_manager, + da_recovery_profile: if validator { + DARecoveryProfile::Collator + } else { + DARecoveryProfile::FullNode + }, + import_queue: import_queue_service, + relay_chain_slot_duration, + recovery_handle: Box::new(overseer_handle.clone()), + sync_service: sync_service.clone(), + })?; + // Follows Polkadot SDK if validator { - let parachain_consensus = build_consensus( + start_consensus::( client.clone(), block_import, prometheus_registry.as_ref(), @@ -540,46 +534,13 @@ where transaction_pool, sync_service.clone(), params.keystore_container.keystore(), - force_authoring, - )?; - - let spawner = task_manager.spawn_handle(); - - let params = StartCollatorParams { - para_id: id, - block_status: client.clone(), - announce_block, - client: client.clone(), - task_manager: &mut task_manager, - relay_chain_interface, - spawner, - parachain_consensus, - import_queue: import_queue_service, - collator_key: collator_key.ok_or_else(|| { - sc_service::error::Error::Other("Collator Key is None".to_string()) - })?, relay_chain_slot_duration, - recovery_handle, - sync_service, - }; - - #[allow(deprecated)] // TODO fix before v1.3.0 - start_collator(params).await?; - } else { - let params = StartFullNodeParams { - client: client.clone(), + para_id, + collator_key.expect("Command line arguments do not allow this. qed"), + overseer_handle, announce_block, - task_manager: &mut task_manager, - para_id: id, - relay_chain_interface, - relay_chain_slot_duration, - import_queue: import_queue_service, - recovery_handle, - sync_service, - }; - - #[allow(deprecated)] // TODO fix before v1.3.0 - start_full_node(params)?; + )?; + } else { } start_network.start_network(); @@ -592,7 +553,7 @@ where fn spawn_frontier_tasks( task_manager: &TaskManager, client: Arc>, - backend: Arc>, + backend: Arc, frontier_backend: FrontierBackend, filter_pool: FilterPool, overrides: Arc>, @@ -607,21 +568,14 @@ fn spawn_frontier_tasks( ) where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue - + sp_api::Metadata - + sp_session::SessionKeys - + sp_api::ApiExt - + sp_offchain::OffchainWorkerApi - + sp_block_builder::BlockBuilder - + cumulus_primitives_core::CollectCollationInfo - + fp_rpc::EthereumRuntimeRPCApi, + RuntimeApi::RuntimeApi: RuntimeApiCollection, Executor: sc_executor::NativeExecutionDispatch + 'static, { match frontier_backend { FrontierBackend::KeyValue(fb) => { task_manager.spawn_essential_handle().spawn( "frontier-mapping-sync-worker", - None, + Some("frontier"), MappingSyncWorker::new( client.import_notification_stream(), Duration::new(6, 0), @@ -665,14 +619,14 @@ fn spawn_frontier_tasks( const FILTER_RETAIN_THRESHOLD: u64 = 100; task_manager.spawn_essential_handle().spawn( "frontier-filter-pool", - None, + Some("frontier"), EthTask::filter_pool_task(client.clone(), filter_pool, FILTER_RETAIN_THRESHOLD), ); // Spawn Frontier FeeHistory cache maintenance task. task_manager.spawn_essential_handle().spawn( "frontier-fee-history", - None, + Some("frontier"), EthTask::fee_history_task( client, overrides, diff --git a/pallets/pool-system/src/tests/mod.rs b/pallets/pool-system/src/tests/mod.rs index 077dd0e501..f9201ea8d2 100644 --- a/pallets/pool-system/src/tests/mod.rs +++ b/pallets/pool-system/src/tests/mod.rs @@ -1372,8 +1372,7 @@ fn valid_tranche_structure_is_enforced() { ], AUSD_CURRENCY_ID, 10_000 * CURRENCY, - - vec![], + vec![], ), Error::::InvalidTrancheStructure ); @@ -1436,8 +1435,7 @@ fn valid_tranche_structure_is_enforced() { ], AUSD_CURRENCY_ID, 10_000 * CURRENCY, - - vec![], + vec![], ), Error::::InvalidTrancheStructure ); @@ -1492,8 +1490,7 @@ fn valid_tranche_structure_is_enforced() { ], AUSD_CURRENCY_ID, 10_000 * CURRENCY, - - vec![], + vec![], ), Error::::InvalidTrancheStructure ); @@ -1545,8 +1542,7 @@ fn valid_tranche_structure_is_enforced() { ], AUSD_CURRENCY_ID, 10_000 * CURRENCY, - - vec![], + vec![], ), Error::::InvalidTrancheStructure ); diff --git a/runtime/altair/Cargo.toml b/runtime/altair/Cargo.toml index 8bc18183c7..e4016eb911 100644 --- a/runtime/altair/Cargo.toml +++ b/runtime/altair/Cargo.toml @@ -23,6 +23,7 @@ sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } +sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } @@ -150,13 +151,13 @@ std = [ "scale-info/std", "serde/std", "log/std", - # Substrate related "sp-api/std", "sp-runtime/std", "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", @@ -187,14 +188,12 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "polkadot-runtime-common/std", "polkadot-parachain-primitives/std", - # Locals "cfg-primitives/std", "cfg-traits/std", "cfg-types/std", "runtime-common/std", "liquidity-pools-gateway-routers/std", - # Pallet list "axelar-gateway-precompile/std", "chainbridge/std", @@ -271,7 +270,6 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", - # Substrate related "sp-runtime/runtime-benchmarks", "sp-staking/runtime-benchmarks", @@ -282,14 +280,12 @@ runtime-benchmarks = [ "xcm-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", - # Locals "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", "runtime-common/runtime-benchmarks", "liquidity-pools-gateway-routers/runtime-benchmarks", - # Pallet list "axelar-gateway-precompile/runtime-benchmarks", "chainbridge/runtime-benchmarks", @@ -353,7 +349,6 @@ runtime-benchmarks = [ try-runtime = [ # Enabling optional "frame-try-runtime/try-runtime", - # Substrate related "sp-runtime/try-runtime", "frame-support/try-runtime", @@ -361,14 +356,12 @@ try-runtime = [ "frame-executive/try-runtime", "fp-self-contained/try-runtime", "polkadot-runtime-common/try-runtime", - # Locals "cfg-primitives/try-runtime", "cfg-traits/try-runtime", "cfg-types/try-runtime", "runtime-common/try-runtime", "liquidity-pools-gateway-routers/try-runtime", - # Pallet list "axelar-gateway-precompile/try-runtime", "chainbridge/try-runtime", diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index bf248ca7cd..8b9d0cdd91 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -50,6 +50,8 @@ use cfg_types::{ use constants::currency::*; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fp_rpc::TransactionStatus; +use frame_support::genesis_builder_helper::{build_config, create_default_config}; + use frame_support::{ construct_runtime, dispatch::DispatchClass, @@ -2695,6 +2697,16 @@ impl_runtime_apis! { Ok(batches) } } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } } #[cfg(feature = "runtime-benchmarks")] diff --git a/runtime/centrifuge/Cargo.toml b/runtime/centrifuge/Cargo.toml index d35b1a5dbc..afc0f355bc 100644 --- a/runtime/centrifuge/Cargo.toml +++ b/runtime/centrifuge/Cargo.toml @@ -23,6 +23,7 @@ sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } +sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } @@ -150,13 +151,13 @@ std = [ "scale-info/std", "serde/std", "log/std", - # Substrate related "sp-api/std", "sp-runtime/std", "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", @@ -187,14 +188,12 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "polkadot-runtime-common/std", "polkadot-parachain-primitives/std", - # Locals "cfg-primitives/std", "cfg-traits/std", "cfg-types/std", "runtime-common/std", "liquidity-pools-gateway-routers/std", - # Pallet list "axelar-gateway-precompile/std", "chainbridge/std", @@ -270,7 +269,6 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", - # Substrate related "sp-runtime/runtime-benchmarks", "sp-staking/runtime-benchmarks", @@ -281,14 +279,12 @@ runtime-benchmarks = [ "xcm-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", - # Locals "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", "runtime-common/runtime-benchmarks", "liquidity-pools-gateway-routers/runtime-benchmarks", - # Pallet list "axelar-gateway-precompile/runtime-benchmarks", "chainbridge/runtime-benchmarks", @@ -352,7 +348,6 @@ runtime-benchmarks = [ try-runtime = [ # Enabling optional "frame-try-runtime/try-runtime", - # Substrate related "sp-runtime/try-runtime", "frame-support/try-runtime", @@ -360,14 +355,12 @@ try-runtime = [ "frame-executive/try-runtime", "fp-self-contained/try-runtime", "polkadot-runtime-common/try-runtime", - # Locals "cfg-primitives/try-runtime", "cfg-traits/try-runtime", "cfg-types/try-runtime", "runtime-common/try-runtime", "liquidity-pools-gateway-routers/try-runtime", - # Pallet list "axelar-gateway-precompile/try-runtime", "chainbridge/try-runtime", diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 35f24ac9ad..8badc6f193 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -51,6 +51,8 @@ use cfg_types::{ }; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fp_rpc::TransactionStatus; +use frame_support::genesis_builder_helper::{build_config, create_default_config}; + use frame_support::{ construct_runtime, dispatch::DispatchClass, @@ -2746,6 +2748,16 @@ impl_runtime_apis! { Ok(batches) } } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } } #[cfg(feature = "runtime-benchmarks")] diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index b4f8f9491f..32e95f4c3d 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -23,6 +23,7 @@ sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } +sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } @@ -156,6 +157,7 @@ std = [ "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index a562b97bfe..5a5586860b 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -52,6 +52,8 @@ use cfg_types::{ use chainbridge::constants::DEFAULT_RELAYER_VOTE_THRESHOLD; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fp_rpc::TransactionStatus; +use frame_support::genesis_builder_helper::{build_config, create_default_config}; + use frame_support::{ construct_runtime, dispatch::DispatchClass, @@ -2784,6 +2786,16 @@ impl_runtime_apis! { Ok(batches) } } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } } #[cfg(feature = "runtime-benchmarks")] diff --git a/scripts/export_parachain_files.sh b/scripts/export_parachain_files.sh index 8fef73db32..74b8ebbce2 100755 --- a/scripts/export_parachain_files.sh +++ b/scripts/export_parachain_files.sh @@ -25,5 +25,5 @@ if [[ $should_build == "true" ]]; then fi echo "Exporting State & Wasm" -$PWD/target/release/centrifuge-chain export-genesis-state --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-state +$PWD/target/release/centrifuge-chain export-genesis-head --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-state $PWD/target/release/centrifuge-chain export-genesis-wasm --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-wasm diff --git a/scripts/init.sh b/scripts/init.sh index 911eca2544..5f38851df3 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -74,10 +74,10 @@ onboard-parachain) wasm_location="$onboard_dir/${parachain}-${para_id}.wasm" if [ "$docker_onboard" == "true" ]; then - genesis=$(docker run centrifugeio/centrifuge-chain:${cc_docker_image_tag} export-genesis-state --chain="${parachain}" --parachain-id="${para_id}") + genesis=$(docker run centrifugeio/centrifuge-chain:${cc_docker_image_tag} export-genesis-head --chain="${parachain}") docker run centrifugeio/centrifuge-chain:${cc_docker_image_tag} export-genesis-wasm --chain="${parachain}" > $wasm_location else - genesis=$(./target/release/centrifuge-chain export-genesis-state --chain="${parachain}" --parachain-id="${para_id}") + genesis=$(./target/release/centrifuge-chain export-genesis-head --chain="${parachain}") ./target/release/centrifuge-chain export-genesis-wasm --chain="${parachain}" > $wasm_location fi