diff --git a/Cargo.lock b/Cargo.lock index 57dfa08f4..04b33828b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -816,7 +816,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "hash-db 0.16.0", "log", @@ -1036,7 +1036,7 @@ dependencies = [ [[package]] name = "bp-xcm-bridge-hub-router" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "parity-scale-codec", "scale-info", @@ -2153,7 +2153,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "clap", "parity-scale-codec", @@ -2192,7 +2192,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "cumulus-client-collator", @@ -2325,7 +2325,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -2360,7 +2360,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2419,7 +2419,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -2433,7 +2433,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2449,7 +2449,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "bp-xcm-bridge-hub-router", "cumulus-primitives-core", @@ -2473,7 +2473,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-aura" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2527,7 +2527,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "cumulus-primitives-core", "futures 0.3.30", @@ -2540,7 +2540,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2560,7 +2560,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2602,7 +2602,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "array-bytes 6.2.2", "async-trait", @@ -2637,7 +2637,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4251,7 +4251,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "Inflector", "array-bytes 6.2.2", @@ -4327,7 +4327,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-support", "frame-system", @@ -4357,7 +4357,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "indicatif", @@ -4478,7 +4478,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4493,7 +4493,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "parity-scale-codec", "sp-api", @@ -4502,7 +4502,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-support", "parity-scale-codec", @@ -6520,7 +6520,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "log", @@ -6539,7 +6539,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "anyhow", "jsonrpsee", @@ -6885,6 +6885,7 @@ dependencies = [ "cumulus-client-collator", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", "cumulus-client-network", "cumulus-client-service", "cumulus-primitives-core", @@ -6908,6 +6909,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-manual-seal", + "sc-consensus-slots", "sc-executor", "sc-network", "sc-network-common", @@ -6924,6 +6926,7 @@ dependencies = [ "sc-utils", "serde", "sp-api", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -7238,7 +7241,7 @@ dependencies = [ [[package]] name = "pallet-asset-rate" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7253,7 +7256,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7271,7 +7274,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7455,7 +7458,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "aquamarine", "docify", @@ -7506,7 +7509,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-support", "frame-system", @@ -7526,7 +7529,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "array-bytes 6.2.2", "binary-merkle-tree", @@ -7551,7 +7554,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7598,7 +7601,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7649,7 +7652,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "3.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7668,7 +7671,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7703,7 +7706,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7744,7 +7747,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7778,7 +7781,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7801,7 +7804,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7815,7 +7818,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8009,7 +8012,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "docify", "frame-benchmarking", @@ -8028,7 +8031,7 @@ dependencies = [ [[package]] name = "pallet-foreign-asset-creator" version = "0.1.0" -source = "git+https://github.com/moondance-labs/moonkit?branch=tanssi-polkadot-v1.3.0#3cc7df4ec15b8a8099923cdfa474b93d6c58e4ac" +source = "git+https://github.com/moondance-labs/moonkit?branch=tanssi-polkadot-v1.3.0#4320d4e0fe00b4a3b0540ceeb2cb5cd922dc2d3f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8047,7 +8050,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8086,7 +8089,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "enumflags2", "frame-benchmarking", @@ -8102,7 +8105,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8122,7 +8125,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8215,7 +8218,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8270,7 +8273,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8288,7 +8291,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8304,7 +8307,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8320,7 +8323,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-support", "frame-system", @@ -8339,7 +8342,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8359,7 +8362,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -8370,7 +8373,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-support", "frame-system", @@ -8387,7 +8390,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8435,7 +8438,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8452,7 +8455,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8467,7 +8470,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8485,7 +8488,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8500,7 +8503,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8575,7 +8578,7 @@ dependencies = [ [[package]] name = "pallet-root-testing" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-support", "frame-system", @@ -8590,7 +8593,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "docify", "frame-benchmarking", @@ -8650,7 +8653,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8667,7 +8670,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8708,7 +8711,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -8719,7 +8722,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "log", "sp-arithmetic", @@ -8728,7 +8731,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "parity-scale-codec", "sp-api", @@ -8737,7 +8740,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8754,7 +8757,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "docify", "frame-benchmarking", @@ -8790,7 +8793,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8809,7 +8812,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-support", "frame-system", @@ -8825,7 +8828,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -8841,7 +8844,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -8853,7 +8856,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "docify", "frame-benchmarking", @@ -8872,7 +8875,7 @@ dependencies = [ [[package]] name = "pallet-tx-pause" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8889,7 +8892,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8920,7 +8923,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8956,7 +8959,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8975,7 +8978,7 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -8989,7 +8992,7 @@ dependencies = [ [[package]] name = "parachains-common" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", @@ -9322,7 +9325,7 @@ checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" [[package]] name = "polkadot-approval-distribution" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "futures-timer", @@ -9340,7 +9343,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "always-assert", "futures 0.3.30", @@ -9356,7 +9359,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "derive_more", "fatality", @@ -9379,7 +9382,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "fatality", @@ -9401,7 +9404,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "1.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "clap", "frame-benchmarking-cli", @@ -9428,7 +9431,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "bitvec", "fatality", @@ -9462,7 +9465,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "derive_more", "fatality", @@ -9487,7 +9490,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -9501,7 +9504,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "futures-timer", @@ -9522,7 +9525,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "always-assert", "async-trait", @@ -9545,7 +9548,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "parity-scale-codec", @@ -9563,7 +9566,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "bitvec", "derive_more", @@ -9592,7 +9595,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "bitvec", "futures 0.3.30", @@ -9614,7 +9617,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "bitvec", "fatality", @@ -9633,7 +9636,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "polkadot-node-subsystem", @@ -9648,7 +9651,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "futures 0.3.30", @@ -9669,7 +9672,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "polkadot-node-metrics", @@ -9684,7 +9687,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "futures-timer", @@ -9701,7 +9704,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "fatality", "futures 0.3.30", @@ -9720,7 +9723,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "futures 0.3.30", @@ -9737,7 +9740,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "bitvec", "fatality", @@ -9754,7 +9757,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "bitvec", "fatality", @@ -9771,7 +9774,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "always-assert", "cfg-if", @@ -9800,7 +9803,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "polkadot-node-primitives", @@ -9816,7 +9819,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "cfg-if", "cpu-time", @@ -9840,7 +9843,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "polkadot-node-metrics", @@ -9973,7 +9976,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "derive_more", @@ -10073,7 +10076,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -10105,7 +10108,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "bitvec", "frame-benchmarking", @@ -10215,7 +10218,7 @@ dependencies = [ [[package]] name = "polkadot-service" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "frame-benchmarking", @@ -10331,7 +10334,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -11143,7 +11146,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -11238,7 +11241,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-support", "polkadot-primitives", @@ -11512,7 +11515,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "futures-timer", @@ -11762,7 +11765,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "jsonrpsee", @@ -11784,7 +11787,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -11818,7 +11821,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "jsonrpsee", @@ -11850,7 +11853,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "ahash 0.8.7", "array-bytes 6.2.2", @@ -11891,7 +11894,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "finality-grandpa", "futures 0.3.30", @@ -12157,7 +12160,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "ahash 0.8.7", "futures 0.3.30", @@ -12231,7 +12234,7 @@ dependencies = [ [[package]] name = "sc-network-test" version = "0.8.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "futures 0.3.30", @@ -12280,7 +12283,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "array-bytes 6.2.2", "bytes", @@ -12314,7 +12317,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -12493,7 +12496,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "clap", "fs4", @@ -12507,7 +12510,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -13050,7 +13053,7 @@ dependencies = [ [[package]] name = "slot-range-helper" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "enumn", "parity-scale-codec", @@ -13399,7 +13402,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "lazy_static", "parity-scale-codec", @@ -13652,7 +13655,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -14184,7 +14187,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-support", "frame-system", @@ -14320,12 +14323,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.30", @@ -14356,7 +14359,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "jsonrpsee", @@ -14369,7 +14372,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -14386,7 +14389,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "array-bytes 6.2.2", "async-trait", @@ -14412,7 +14415,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "array-bytes 6.2.2", "frame-executive", @@ -14455,7 +14458,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "futures 0.3.30", "sc-block-builder", @@ -14473,7 +14476,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "ansi_term", "build-helper", @@ -14573,6 +14576,7 @@ dependencies = [ "cumulus-client-collator", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", "cumulus-client-network", "cumulus-client-pov-recovery", "cumulus-client-service", @@ -14665,9 +14669,13 @@ name = "tc-consensus" version = "0.1.0" dependencies = [ "async-trait", + "cumulus-client-collator", + "cumulus-client-consensus-aura", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", "fc-rpc", "futures 0.3.30", "futures-timer", @@ -14676,6 +14684,9 @@ dependencies = [ "nimbus-primitives", "parity-scale-codec", "parking_lot 0.12.1", + "polkadot-node-primitives", + "polkadot-overseer", + "polkadot-primitives", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -14697,6 +14708,7 @@ dependencies = [ "sp-keyring", "sp-keystore", "sp-runtime", + "sp-state-machine", "sp-timestamp", "substrate-prometheus-endpoint", "substrate-test-runtime-client", @@ -15394,7 +15406,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "async-trait", "clap", @@ -16069,7 +16081,7 @@ checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "westend-runtime" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "binary-merkle-tree", "bitvec", @@ -16174,7 +16186,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "1.0.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "frame-support", "polkadot-primitives", @@ -16543,7 +16555,7 @@ dependencies = [ [[package]] name = "xcm-emulator" version = "0.1.0" -source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5da8ffe3dd2f42856ea12328db1b2129bcb49992" +source = "git+https://github.com/moondance-labs/polkadot-sdk?branch=tanssi-polkadot-v1.3.0#5968669019a8340ba5571ec5f2c428cbc7a8e81c" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", diff --git a/Cargo.toml b/Cargo.toml index b54dff9bf..ae29a0d0c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -171,6 +171,7 @@ try-runtime-cli = { git = "https://github.com/moondance-labs/polkadot-sdk", bran # Polkadot (wasm) pallet-xcm = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } pallet-xcm-benchmarks = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } +polkadot-node-primitives = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } polkadot-parachain-primitives = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } polkadot-runtime-common = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } polkadot-runtime-parachains = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } @@ -203,6 +204,7 @@ cumulus-client-cli = { git = "https://github.com/moondance-labs/polkadot-sdk", b cumulus-client-collator = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } cumulus-client-consensus-aura = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } cumulus-client-consensus-common = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } +cumulus-client-consensus-proposer = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } cumulus-client-network = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } cumulus-client-pov-recovery = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } cumulus-client-service = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } diff --git a/client/consensus/Cargo.toml b/client/consensus/Cargo.toml index 326fe99d8..81fe23185 100644 --- a/client/consensus/Cargo.toml +++ b/client/consensus/Cargo.toml @@ -24,6 +24,7 @@ sp-core = { workspace = true } sp-inherents = { workspace = true } sp-keystore = { workspace = true } sp-runtime = { workspace = true } +sp-state-machine = { workspace = true } sp-timestamp = { workspace = true } substrate-prometheus-endpoint = { workspace = true } @@ -31,9 +32,18 @@ substrate-prometheus-endpoint = { workspace = true } tp-consensus = { workspace = true, features = [ "std" ] } # Cumulus dependencies +cumulus-client-collator = { workspace = true } +cumulus-client-consensus-aura = { workspace = true } cumulus-client-consensus-common = { workspace = true } +cumulus-client-consensus-proposer = { workspace = true } cumulus-primitives-core = { workspace = true } cumulus-primitives-parachain-inherent = { workspace = true } +cumulus-relay-chain-interface = { workspace = true } + +# Polkadot +polkadot-node-primitives = { workspace = true } +polkadot-overseer = { workspace = true } +polkadot-primitives = { workspace = true } # Nimbus Dependencies nimbus-consensus = { workspace = true } diff --git a/client/consensus/src/collators.rs b/client/consensus/src/collators.rs new file mode 100644 index 000000000..a325443d0 --- /dev/null +++ b/client/consensus/src/collators.rs @@ -0,0 +1,402 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see . + +pub mod basic; + +use cumulus_client_collator::service::ServiceInterface as CollatorServiceInterface; +use cumulus_client_consensus_common::{ParachainBlockImportMarker, ParachainCandidate}; +use cumulus_client_consensus_proposer::ProposerInterface; +use cumulus_primitives_core::{ + relay_chain::Hash as PHash, DigestItem, ParachainBlockData, PersistedValidationData, +}; +use cumulus_primitives_parachain_inherent::ParachainInherentData; +use cumulus_relay_chain_interface::RelayChainInterface; +use parity_scale_codec::{Codec, Encode}; + +use polkadot_node_primitives::{Collation, MaybeCompressedPoV}; +use polkadot_primitives::Id as ParaId; + +use crate::AuthorityId; +use futures::prelude::*; +use nimbus_primitives::{CompatibleDigestItem as NimbusCompatibleDigestItem, NIMBUS_KEY_ID}; +use sc_consensus::{BlockImport, BlockImportParams, ForkChoiceStrategy, StateAction}; +use sp_application_crypto::{AppCrypto, AppPublic}; +use sp_consensus::BlockOrigin; +use sp_consensus_aura::{digests::CompatibleDigestItem, Slot}; +use sp_core::crypto::{ByteArray, Pair}; +use sp_inherents::{CreateInherentDataProviders, InherentData, InherentDataProvider}; +use sp_keystore::{Keystore, KeystorePtr}; +use sp_runtime::{ + generic::Digest, + traits::{Block as BlockT, HashingFor, Header as HeaderT, Member}, +}; +use sp_state_machine::StorageChanges; +use sp_timestamp::Timestamp; +use std::{convert::TryFrom, error::Error, time::Duration}; + +/// Parameters for instantiating a [`Collator`]. +pub struct Params { + /// A builder for inherent data builders. + pub create_inherent_data_providers: CIDP, + /// The block import handle. + pub block_import: BI, + /// An interface to the relay-chain client. + pub relay_client: RClient, + /// The keystore handle used for accessing parachain key material. + pub keystore: KeystorePtr, + /// The identifier of the parachain within the relay-chain. + pub para_id: ParaId, + /// The block proposer used for building blocks. + pub proposer: Proposer, + /// The collator service used for bundling proposals into collations and announcing + /// to the network. + pub collator_service: CS, +} + +/// A utility struct for writing collation logic that makes use of +/// Tanssi Aura entirely or in part. +pub struct Collator { + create_inherent_data_providers: CIDP, + block_import: BI, + relay_client: RClient, + keystore: KeystorePtr, + para_id: ParaId, + proposer: Proposer, + collator_service: CS, + _marker: std::marker::PhantomData<(Block, Box)>, +} + +impl Collator +where + Block: BlockT, + RClient: RelayChainInterface, + CIDP: CreateInherentDataProviders + 'static, + BI: BlockImport + ParachainBlockImportMarker + Send + Sync + 'static, + Proposer: ProposerInterface, + CS: CollatorServiceInterface, + P: Pair, + P::Public: AppPublic + Member, + P::Signature: TryFrom> + Member + Codec, +{ + /// Instantiate a new instance of the `Tanssi Aura` manager. + pub fn new(params: Params) -> Self { + Collator { + create_inherent_data_providers: params.create_inherent_data_providers, + block_import: params.block_import, + relay_client: params.relay_client, + keystore: params.keystore, + para_id: params.para_id, + proposer: params.proposer, + collator_service: params.collator_service, + _marker: std::marker::PhantomData, + } + } + + /// Explicitly creates the inherent data for parachain block authoring. + pub async fn create_inherent_data( + &self, + relay_parent: PHash, + validation_data: &PersistedValidationData, + parent_hash: Block::Hash, + _timestamp: impl Into>, + ) -> Result<(ParachainInherentData, InherentData), Box> { + let paras_inherent_data = ParachainInherentData::create_at( + relay_parent, + &self.relay_client, + validation_data, + self.para_id, + ) + .await; + + let paras_inherent_data = match paras_inherent_data { + Some(p) => p, + None => { + return Err( + format!("Could not create paras inherent data at {:?}", relay_parent).into(), + ) + } + }; + + let other_inherent_data = self + .create_inherent_data_providers + .create_inherent_data_providers(parent_hash, (relay_parent, validation_data.clone())) + .map_err(|e| e as Box) + .await? + .create_inherent_data() + .await + .map_err(Box::new)?; + + Ok((paras_inherent_data, other_inherent_data)) + } + + /// Propose, seal, and import a block, packaging it into a collation. + /// + /// Provide the slot to build at as well as any other necessary pre-digest logs, + /// the inherent data, and the proposal duration and PoV size limits. + /// + /// The Tanssi Aura pre-digest is set internally. + /// + /// This does not announce the collation to the parachain network or the relay chain. + pub async fn collate( + &mut self, + parent_header: &Block::Header, + slot_claim: &mut SlotClaim, + additional_pre_digest: impl Into>>, + inherent_data: (ParachainInherentData, InherentData), + proposal_duration: Duration, + max_pov_size: usize, + ) -> Result<(Collation, ParachainBlockData, Block::Hash), Box> + { + let mut digest = additional_pre_digest.into().unwrap_or_default(); + digest.append(&mut slot_claim.pre_digest); + + let proposal = self + .proposer + .propose( + &parent_header, + &inherent_data.0, + inherent_data.1, + Digest { logs: digest }, + proposal_duration, + Some(max_pov_size), + ) + .await + .map_err(|e| Box::new(e) as Box)?; + + let sealed_importable = seal_tanssi::<_, P>( + proposal.block, + proposal.storage_changes, + &slot_claim.author_pub, + &self.keystore, + ) + .map_err(|e| e as Box)?; + + let post_hash = sealed_importable.post_hash(); + let block = Block::new( + sealed_importable.post_header(), + sealed_importable + .body + .as_ref() + .expect("body always created with this `propose` fn; qed") + .clone(), + ); + + self.block_import + .import_block(sealed_importable) + .map_err(|e| Box::new(e) as Box) + .await?; + + if let Some((collation, block_data)) = self.collator_service.build_collation( + parent_header, + post_hash, + ParachainCandidate { + block, + proof: proposal.proof, + }, + ) { + tracing::info!( + target: crate::LOG_TARGET, + "PoV size {{ header: {}kb, extrinsics: {}kb, storage_proof: {}kb }}", + block_data.header().encode().len() as f64 / 1024f64, + block_data.extrinsics().encode().len() as f64 / 1024f64, + block_data.storage_proof().encode().len() as f64 / 1024f64, + ); + + if let MaybeCompressedPoV::Compressed(ref pov) = collation.proof_of_validity { + tracing::info!( + target: crate::LOG_TARGET, + "Compressed PoV size: {}kb", + pov.block_data.0.len() as f64 / 1024f64, + ); + } + + Ok((collation, block_data, post_hash)) + } else { + Err( + Box::::from("Unable to produce collation") + as Box, + ) + } + } + + /// Get the underlying collator service. + pub fn collator_service(&self) -> &CS { + &self.collator_service + } +} + +fn pre_digest_data(slot: Slot, claim: P::Public) -> Vec +where + P::Public: Codec, + P::Signature: Codec, +{ + vec![ + >::aura_pre_digest(slot), + // We inject the nimbus digest as well. Crutial to be able to verify signatures + ::nimbus_pre_digest( + // TODO remove this unwrap through trait reqs + nimbus_primitives::NimbusId::from_slice(claim.as_ref()).unwrap(), + ), + ] +} + +#[derive(Debug)] +pub struct SlotClaim { + author_pub: Pub, + pre_digest: Vec, +} + +impl SlotClaim { + pub fn unchecked

(author_pub: Pub, slot: Slot) -> Self + where + P: Pair, + P::Public: Codec, + P::Signature: Codec, + { + SlotClaim { + author_pub: author_pub.clone(), + pre_digest: pre_digest_data::

(slot, author_pub), + } + } + + /// Get the author's public key. + pub fn author_pub(&self) -> &Pub { + &self.author_pub + } + + /// Get the pre-digest. + pub fn pre_digest(&self) -> &Vec { + &self.pre_digest + } +} + +/// Attempt to claim a slot locally. +pub fn tanssi_claim_slot

( + authorities: Vec>, + slot: Slot, + force_authoring: bool, + keystore: &KeystorePtr, +) -> Result>, Box> +where + P: Pair, + P::Public: Codec + std::fmt::Debug, + P::Signature: Codec, +{ + let author_pub = { + let res = claim_slot_inner::

(slot, &authorities, keystore, force_authoring); + match res { + Some(p) => p, + None => return Ok(None), + } + }; + + Ok(Some(SlotClaim::unchecked::

(author_pub, slot))) +} + +/// Attempt to claim a slot using a keystore. +pub fn claim_slot_inner( + slot: Slot, + authorities: &Vec>, + keystore: &KeystorePtr, + force_authoring: bool, +) -> Option +where + P: Pair, + P::Public: Codec + std::fmt::Debug, + P::Signature: Codec, +{ + let expected_author = crate::slot_author::

(slot, authorities.as_slice()); + // if not running with force-authoring, just do the usual slot check + if !force_authoring { + expected_author.and_then(|p| { + if keystore.has_keys(&[(p.to_raw_vec(), NIMBUS_KEY_ID)]) { + Some(p.clone()) + } else { + None + } + }) + } + // if running with force-authoring, as long as you are in the authority set, + // propose + else { + authorities + .iter() + .find(|key| keystore.has_keys(&[(key.to_raw_vec(), NIMBUS_KEY_ID)])) + .cloned() + } +} + +/// Seal a block with a signature in the header. +pub fn seal_tanssi( + pre_sealed: B, + storage_changes: StorageChanges>, + author_pub: &P::Public, + keystore: &KeystorePtr, +) -> Result, Box> +where + P: Pair, + P::Signature: Codec + TryFrom>, + P::Public: AppPublic, +{ + let (pre_header, body) = pre_sealed.deconstruct(); + let pre_hash = pre_header.hash(); + let block_number = *pre_header.number(); + + // sign the pre-sealed hash of the block and then + // add it to a digest item. + let signature = Keystore::sign_with( + keystore, + as AppCrypto>::ID, + as AppCrypto>::CRYPTO_ID, + author_pub.as_slice(), + pre_hash.as_ref(), + ) + .map_err(|e| sp_consensus::Error::CannotSign(format!("{}. Key: {:?}", e, author_pub)))? + .ok_or_else(|| { + sp_consensus::Error::CannotSign(format!( + "Could not find key in keystore. Key: {:?}", + author_pub + )) + })?; + let signature = signature + .clone() + .try_into() + .map_err(|_| sp_consensus::Error::InvalidSignature(signature, author_pub.to_raw_vec()))?; + + let signature_digest_item = ::nimbus_seal(signature); + + // seal the block. + let block_import_params = { + let mut block_import_params = BlockImportParams::new(BlockOrigin::Own, pre_header); + block_import_params.post_digests.push(signature_digest_item); + block_import_params.body = Some(body.clone()); + block_import_params.state_action = + StateAction::ApplyChanges(sc_consensus::StorageChanges::Changes(storage_changes)); + block_import_params.fork_choice = Some(ForkChoiceStrategy::LongestChain); + block_import_params + }; + let post_hash = block_import_params.post_hash(); + + tracing::info!( + target: crate::LOG_TARGET, + "🔖 Pre-sealed block for proposal at {}. Hash now {:?}, previously {:?}.", + block_number, + post_hash, + pre_hash, + ); + + Ok(block_import_params) +} diff --git a/client/consensus/src/collators/basic.rs b/client/consensus/src/collators/basic.rs new file mode 100644 index 000000000..12496deb8 --- /dev/null +++ b/client/consensus/src/collators/basic.rs @@ -0,0 +1,250 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see . + +use cumulus_client_collator::{ + relay_chain_driven::CollationRequest, service::ServiceInterface as CollatorServiceInterface, +}; +use cumulus_client_consensus_common::ParachainBlockImportMarker; +use cumulus_client_consensus_proposer::ProposerInterface; +use cumulus_primitives_core::{ + relay_chain::{BlockId as RBlockId, Hash as PHash}, + PersistedValidationData, +}; +use cumulus_relay_chain_interface::RelayChainInterface; +use parity_scale_codec::{Codec, Decode}; + +use polkadot_node_primitives::CollationResult; +use polkadot_overseer::Handle as OverseerHandle; +use polkadot_primitives::{CollatorPair, Id as ParaId}; + +use futures::{channel::mpsc::Receiver, prelude::*}; +use sc_client_api::{backend::AuxStore, BlockBackend, BlockOf}; +use sc_consensus::BlockImport; +use sc_consensus_slots::InherentDataProviderExt; +use sp_api::ProvideRuntimeApi; +use sp_application_crypto::AppPublic; +use sp_blockchain::HeaderBackend; +use sp_consensus::SyncOracle; +use sp_consensus_aura::SlotDuration; +use sp_core::crypto::Pair; +use sp_inherents::CreateInherentDataProviders; +use sp_keystore::KeystorePtr; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Member}; +use std::{convert::TryFrom, sync::Arc, time::Duration}; + +use crate::collators as collator_util; +use crate::{consensus_orchestrator::RetrieveAuthoritiesFromOrchestrator, AuthorityId}; + +/// Parameters for [`run`]. +pub struct Params { + pub create_inherent_data_providers: CIDP, + pub get_authorities_from_orchestrator: GOH, + pub block_import: BI, + pub para_client: Arc, + pub relay_client: RClient, + pub sync_oracle: SO, + pub keystore: KeystorePtr, + pub collator_key: CollatorPair, + pub para_id: ParaId, + pub overseer_handle: OverseerHandle, + pub slot_duration: SlotDuration, + pub relay_chain_slot_duration: Duration, + pub proposer: Proposer, + pub collator_service: CS, + pub authoring_duration: Duration, + pub force_authoring: bool, + pub collation_request_receiver: Option>, +} + +/// Run tanssi Aura consensus as a relay-chain-driven collator. +pub fn run( + params: Params, +) -> impl Future + Send + 'static +where + Block: BlockT + Send, + Client: ProvideRuntimeApi + + BlockOf + + AuxStore + + HeaderBackend + + BlockBackend + + Send + + Sync + + 'static, + RClient: RelayChainInterface + Send + Clone + 'static, + CIDP: CreateInherentDataProviders + + Send + + 'static + + Clone, + CIDP::InherentDataProviders: Send + InherentDataProviderExt, + BI: BlockImport + ParachainBlockImportMarker + Send + Sync + 'static, + SO: SyncOracle + Send + Sync + Clone + 'static, + Proposer: ProposerInterface + Send + Sync + 'static, + CS: CollatorServiceInterface + Send + Sync + 'static, + P: Pair, + P::Public: AppPublic + Member + Codec, + P::Signature: TryFrom> + Member + Codec, + GOH: RetrieveAuthoritiesFromOrchestrator< + Block, + (PHash, PersistedValidationData), + Vec>, + > + + 'static + + Sync + + Send, +{ + async move { + let mut collation_requests = match params.collation_request_receiver { + Some(receiver) => receiver, + None => { + cumulus_client_collator::relay_chain_driven::init( + params.collator_key, + params.para_id, + params.overseer_handle, + ) + .await + } + }; + + let mut collator = { + let params = collator_util::Params { + create_inherent_data_providers: params.create_inherent_data_providers.clone(), + block_import: params.block_import, + relay_client: params.relay_client.clone(), + keystore: params.keystore.clone(), + para_id: params.para_id, + proposer: params.proposer, + collator_service: params.collator_service, + }; + + collator_util::Collator::::new(params) + }; + + while let Some(request) = collation_requests.next().await { + macro_rules! reject_with_error { + ($err:expr) => {{ + request.complete(None); + tracing::error!(target: crate::LOG_TARGET, err = ?{ $err }); + continue; + }}; + } + + macro_rules! try_request { + ($x:expr) => {{ + match $x { + Ok(x) => x, + Err(e) => reject_with_error!(e), + } + }}; + } + + let validation_data = request.persisted_validation_data(); + + let parent_header = try_request!(Block::Header::decode( + &mut &validation_data.parent_head.0[..] + )); + + let parent_hash = parent_header.hash(); + + // Check whether we can build upon this block + if !collator + .collator_service() + .check_block_status(parent_hash, &parent_header) + { + continue; + } + + let relay_parent_header = match params + .relay_client + .header(RBlockId::hash(*request.relay_parent())) + .await + { + Err(e) => reject_with_error!(e), + Ok(None) => continue, // sanity: would be inconsistent to get `None` here + Ok(Some(h)) => h, + }; + + // Retrieve authorities that are able to produce the block + let authorities = match params + .get_authorities_from_orchestrator + .retrieve_authorities_from_orchestrator( + parent_hash, + (relay_parent_header.hash(), validation_data.clone()), + ) + .await + { + Err(e) => reject_with_error!(e), + Ok(h) => h, + }; + + let inherent_providers = match params + .create_inherent_data_providers + .create_inherent_data_providers( + parent_hash, + (*request.relay_parent(), validation_data.clone()), + ) + .await + { + Err(e) => reject_with_error!(e), + Ok(h) => h, + }; + + let mut claim = match collator_util::tanssi_claim_slot::

( + authorities, + inherent_providers.slot(), + params.force_authoring, + ¶ms.keystore, + ) { + Ok(None) => continue, + Err(e) => reject_with_error!(e), + Ok(Some(h)) => h, + }; + + let (parachain_inherent_data, other_inherent_data) = try_request!( + collator + .create_inherent_data( + *request.relay_parent(), + &validation_data, + parent_hash, + None, + ) + .await + ); + + let (collation, _, post_hash) = try_request!( + collator + .collate( + &parent_header, + &mut claim, + None, + (parachain_inherent_data, other_inherent_data), + params.authoring_duration, + // Set the block limit to 50% of the maximum PoV size. + // + // TODO: If we got benchmarking that includes the proof size, + // we should be able to use the maximum pov size. + (validation_data.max_pov_size / 2) as usize, + ) + .await + ); + + let result_sender = Some(collator.collator_service().announce_with_barrier(post_hash)); + request.complete(Some(CollationResult { + collation, + result_sender, + })); + } + } +} diff --git a/client/consensus/src/consensus_orchestrator.rs b/client/consensus/src/consensus_orchestrator.rs index 159997b7f..2cff90276 100644 --- a/client/consensus/src/consensus_orchestrator.rs +++ b/client/consensus/src/consensus_orchestrator.rs @@ -21,562 +21,16 @@ //! the ParachainConsensus trait to access the orchestrator-dicated authorities, and further //! it implements the TanssiWorker to TanssiOnSlot trait. This trait is use { - cumulus_client_consensus_common::{ParachainCandidate, ParachainConsensus}, - cumulus_primitives_core::{relay_chain::Hash as PHash, PersistedValidationData}, - parity_scale_codec::{Decode, Encode}, + sc_consensus_slots::{SimpleSlotWorker, SlotInfo, SlotResult}, + sp_consensus::Proposer, + sp_runtime::traits::Block as BlockT, }; -use { - futures::{lock::Mutex, prelude::*}, - nimbus_primitives::{ - CompatibleDigestItem as NimbusCompatibleDigestItem, NimbusPair, NIMBUS_KEY_ID, - }, - sc_client_api::{backend::AuxStore, BlockOf}, - sc_consensus::{BlockImport, BlockImportParams, ForkChoiceStrategy, StateAction}, - sc_consensus_aura::{find_pre_digest, CompatibilityMode}, - sc_consensus_slots::{ - BackoffAuthoringBlocksStrategy, SimpleSlotWorker, SlotInfo, SlotResult, StorageChanges, - }, - sc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_DEBUG, CONSENSUS_INFO, CONSENSUS_WARN}, - sp_api::ProvideRuntimeApi, - sp_application_crypto::{AppCrypto, AppPublic}, - sp_blockchain::HeaderBackend, - sp_consensus::{ - BlockOrigin, EnableProofRecording, Environment, ProofRecording, Proposer, SyncOracle, - }, -}; - -use { - crate::{slot_author, AuthorityId}, - log::{debug, info, warn}, - sp_consensus_aura::{digests::CompatibleDigestItem, SlotDuration}, - sp_consensus_slots::Slot, - sp_core::crypto::{ByteArray, Pair, Public}, - sp_inherents::CreateInherentDataProviders, - sp_keystore::{Keystore, KeystorePtr}, - sp_runtime::{ - traits::{Block as BlockT, Header as HeaderT, Member, NumberFor}, - DigestItem, - }, - std::{ - convert::TryFrom, - fmt::Debug, - hash::Hash, - marker::PhantomData, - pin::Pin, - sync::Arc, - time::{Duration, Instant}, - }, -}; pub use { sc_consensus_aura::{slot_duration, AuraVerifier, BuildAuraWorkerParams, SlotProportion}, sc_consensus_slots::InherentDataProviderExt, }; -const LOG_TARGET: &str = "aura::tanssi"; - -/// The implementation of the Tanssi AURA consensus for parachains. -pub struct OrchestratorAuraConsensus { - create_inherent_data_providers: Arc, - get_authorities_from_orchestrator: Arc, - aura_worker: Arc>, - slot_duration: SlotDuration, - _phantom: PhantomData, -} - -impl Clone for OrchestratorAuraConsensus { - fn clone(&self) -> Self { - Self { - create_inherent_data_providers: self.create_inherent_data_providers.clone(), - get_authorities_from_orchestrator: self.get_authorities_from_orchestrator.clone(), - aura_worker: self.aura_worker.clone(), - slot_duration: self.slot_duration, - _phantom: PhantomData, - } - } -} - -/// Build the tanssi aura worker. -/// -/// The caller is responsible for running this worker, otherwise it will do nothing. -pub fn build_orchestrator_aura_worker( - BuildOrchestratorAuraWorkerParams { - client, - block_import, - proposer_factory, - sync_oracle, - justification_sync_link, - backoff_authoring_blocks, - keystore, - block_proposal_slot_portion, - max_block_proposal_slot_portion, - telemetry, - force_authoring, - compatibility_mode, - }: BuildOrchestratorAuraWorkerParams>, -) -> impl TanssiSlotWorker< - B, - Proposer = PF::Proposer, - BlockImport = I, - SyncOracle = SO, - JustificationSyncLink = L, - Claim = P::Public, - AuxData = Vec>, -> -where - B: BlockT, - C: ProvideRuntimeApi + BlockOf + AuxStore + HeaderBackend + Send + Sync, - AuthorityId

: From<::Public>, - PF: Environment + Send + Sync + 'static, - PF::Proposer: Proposer, - P: Pair + Send + Sync, - P::Public: AppPublic + Hash + Member + Encode + Decode, - P::Signature: TryFrom> + Hash + Member + Encode + Decode, - I: BlockImport + Send + Sync + 'static, - Error: std::error::Error + Send + From + 'static, - SO: SyncOracle + Send + Sync + Clone, - L: sc_consensus::JustificationSyncLink, - BS: BackoffAuthoringBlocksStrategy> + Send + Sync + 'static, -{ - OrchestratorAuraWorker { - client, - block_import, - env: proposer_factory, - keystore, - sync_oracle, - justification_sync_link, - force_authoring, - backoff_authoring_blocks, - telemetry, - block_proposal_slot_portion, - max_block_proposal_slot_portion, - compatibility_mode, - _key_type: PhantomData::

, - } -} - -/// Parameters of [`OrchestratorAuraConsensus::build`]. -pub struct BuildOrchestratorAuraConsensusParams { - pub proposer_factory: PF, - pub create_inherent_data_providers: CIDP, - pub get_authorities_from_orchestrator: GOH, - pub block_import: BI, - pub para_client: Arc, - pub backoff_authoring_blocks: Option, - pub sync_oracle: SO, - pub keystore: KeystorePtr, - pub force_authoring: bool, - pub slot_duration: SlotDuration, - pub telemetry: Option, - pub block_proposal_slot_portion: SlotProportion, - pub max_block_proposal_slot_portion: Option, -} - -impl OrchestratorAuraConsensus -where - B: BlockT, - CIDP: CreateInherentDataProviders + 'static, - GOH: 'static + Sync + Send, - CIDP::InherentDataProviders: InherentDataProviderExt, -{ - /// Create a new boxed instance of AURA consensus. - pub fn build( - BuildOrchestratorAuraConsensusParams { - proposer_factory, - create_inherent_data_providers, - get_authorities_from_orchestrator, - block_import, - para_client, - backoff_authoring_blocks, - sync_oracle, - keystore, - force_authoring, - slot_duration, - telemetry, - block_proposal_slot_portion, - max_block_proposal_slot_portion, - }: BuildOrchestratorAuraConsensusParams, - ) -> Box> - where - Client: - ProvideRuntimeApi + BlockOf + AuxStore + HeaderBackend + Send + Sync + 'static, - AuthorityId

: From<::Public>, - BI: BlockImport + Send + Sync + 'static, - SO: SyncOracle + Send + Sync + Clone + 'static, - BS: BackoffAuthoringBlocksStrategy> + Send + Sync + 'static, - PF: Environment + Send + Sync + 'static, - PF::Proposer: Proposer< - B, - Error = Error, - ProofRecording = EnableProofRecording, - Proof = ::Proof, - >, - Error: std::error::Error + Send + From + 'static, - P: Pair + Send + Sync + 'static, - P::Public: AppPublic + Hash + Member + Encode + Decode, - P::Signature: TryFrom> + Hash + Member + Encode + Decode, - GOH: RetrieveAuthoritiesFromOrchestrator< - B, - (PHash, PersistedValidationData), - Vec>, - > + 'static, - { - let worker = build_orchestrator_aura_worker::( - BuildOrchestratorAuraWorkerParams { - client: para_client, - block_import, - justification_sync_link: (), - proposer_factory, - sync_oracle, - force_authoring, - backoff_authoring_blocks, - keystore, - telemetry, - block_proposal_slot_portion, - max_block_proposal_slot_portion, - compatibility_mode: sc_consensus_aura::CompatibilityMode::None, - }, - ); - - Box::new(OrchestratorAuraConsensus { - create_inherent_data_providers: Arc::new(create_inherent_data_providers), - get_authorities_from_orchestrator: Arc::new(get_authorities_from_orchestrator), - aura_worker: Arc::new(Mutex::new(worker)), - slot_duration, - _phantom: PhantomData, - }) - } -} - -impl OrchestratorAuraConsensus -where - B: BlockT, - CIDP: CreateInherentDataProviders + 'static, - CIDP::InherentDataProviders: InherentDataProviderExt, - GOH: RetrieveAuthoritiesFromOrchestrator - + 'static, - W: TanssiSlotWorker + Send + Sync, -{ - /// Create the inherent data. - /// - /// Returns the created inherent data and the inherent data providers used. - async fn inherent_data( - &self, - parent: B::Hash, - validation_data: &PersistedValidationData, - relay_parent: PHash, - ) -> Option { - self.create_inherent_data_providers - .create_inherent_data_providers(parent, (relay_parent, validation_data.clone())) - .await - .map_err(|e| { - tracing::error!( - target: LOG_TARGET, - error = ?e, - "Failed to create inherent data providers.", - ) - }) - .ok() - } -} - -#[async_trait::async_trait] -impl ParachainConsensus for OrchestratorAuraConsensus -where - B: BlockT, - CIDP: CreateInherentDataProviders + Send + Sync + 'static, - CIDP::InherentDataProviders: InherentDataProviderExt + Send, - GOH: RetrieveAuthoritiesFromOrchestrator - + 'static, - W: TanssiSlotWorker + Send + Sync, - W::Proposer: Proposer::Proof>, -{ - async fn produce_candidate( - &mut self, - parent: &B::Header, - relay_parent: PHash, - validation_data: &PersistedValidationData, - ) -> Option> { - let inherent_data_providers = self - .inherent_data(parent.hash(), validation_data, relay_parent) - .await?; - - let header = self - .get_authorities_from_orchestrator - .retrieve_authorities_from_orchestrator( - parent.hash(), - (relay_parent, validation_data.clone()), - ) - .await - .map_err(|e| { - tracing::error!( - target: LOG_TARGET, - error = ?e, - "Failed to get orch head.", - ) - }) - .ok()?; - - let info = SlotInfo::new( - inherent_data_providers.slot(), - Box::new(inherent_data_providers), - self.slot_duration.as_duration(), - parent.clone(), - // Set the block limit to 50% of the maximum PoV size. - // - // TODO: If we got benchmarking that includes the proof size, - // we should be able to use the maximum pov size. - Some((validation_data.max_pov_size / 2) as usize), - ); - - let res = self - .aura_worker - .lock() - .await - .tanssi_on_slot(info, header) - .await?; - - Some(ParachainCandidate { - block: res.block, - proof: res.storage_proof, - }) - } -} - -#[allow(dead_code)] -struct OrchestratorAuraWorker { - client: Arc, - block_import: I, - env: E, - keystore: KeystorePtr, - sync_oracle: SO, - justification_sync_link: L, - force_authoring: bool, - backoff_authoring_blocks: Option, - block_proposal_slot_portion: SlotProportion, - max_block_proposal_slot_portion: Option, - telemetry: Option, - compatibility_mode: CompatibilityMode, - _key_type: PhantomData

, -} - -#[async_trait::async_trait] -impl sc_consensus_slots::SimpleSlotWorker - for OrchestratorAuraWorker> -where - B: BlockT, - C: ProvideRuntimeApi + BlockOf + HeaderBackend + Sync, - AuthorityId

: From<::Public>, - E: Environment + Send + Sync, - E::Proposer: Proposer, - I: BlockImport + Send + Sync + 'static, - P: Pair + Send + Sync, - P::Public: AppPublic + Public + Member + Encode + Decode + Hash, - P::Signature: TryFrom> + Member + Encode + Decode + Hash + Debug, - SO: SyncOracle + Send + Clone + Sync, - L: sc_consensus::JustificationSyncLink, - BS: BackoffAuthoringBlocksStrategy> + Send + Sync + 'static, - Error: std::error::Error + Send + From + 'static, -{ - type BlockImport = I; - type SyncOracle = SO; - type JustificationSyncLink = L; - type CreateProposer = - Pin> + Send + 'static>>; - type Proposer = E::Proposer; - type Claim = P::Public; - type AuxData = Vec>; - - fn logging_target(&self) -> &'static str { - "tanssi_aura" - } - - fn block_import(&mut self) -> &mut Self::BlockImport { - &mut self.block_import - } - - fn aux_data( - &self, - _header: &B::Header, - _slot: Slot, - ) -> Result { - Ok(Default::default()) - } - - fn authorities_len(&self, epoch_data: &Self::AuxData) -> Option { - Some(epoch_data.len()) - } - - async fn claim_slot( - &mut self, - _header: &B::Header, - slot: Slot, - epoch_data: &Self::AuxData, - ) -> Option { - let expected_author = slot_author::

(slot, epoch_data); - // if not running with force-authoring, just do the usual slot check - if !self.force_authoring { - expected_author.and_then(|p| { - if Keystore::has_keys(&*self.keystore, &[(p.to_raw_vec(), NIMBUS_KEY_ID)]) { - Some(p.clone()) - } else { - None - } - }) - } - // if running with force-authoring, as long as you are in the authority set, - // propose - else { - epoch_data - .iter() - .find(|key| { - Keystore::has_keys(&*self.keystore, &[(key.to_raw_vec(), NIMBUS_KEY_ID)]) - }) - .cloned() - } - } - - fn pre_digest_data(&self, slot: Slot, claim: &Self::Claim) -> Vec { - vec![ - >::aura_pre_digest(slot), - // We inject the nimbus digest as well. Crutial to be able to verify signatures - ::nimbus_pre_digest( - // TODO remove this unwrap through trait reqs - nimbus_primitives::NimbusId::from_slice(claim.as_ref()).unwrap(), - ), - ] - } - - async fn block_import_params( - &self, - header: B::Header, - header_hash: &B::Hash, - body: Vec, - storage_changes: StorageChanges, - public: Self::Claim, - _epoch: Self::AuxData, - ) -> Result, sp_consensus::Error> { - // sign the pre-sealed hash of the block and then - // add it to a digest item. - let signature = Keystore::sign_with( - &*self.keystore, - as AppCrypto>::ID, - as AppCrypto>::CRYPTO_ID, - public.as_slice(), - header_hash.as_ref(), - ) - .map_err(|e| sp_consensus::Error::CannotSign(format!("{}. Key: {:?}", e, public)))? - .ok_or_else(|| { - sp_consensus::Error::CannotSign(format!( - "Could not find key in keystore. Key: {:?}", - public - )) - })?; - let signature = signature - .clone() - .try_into() - .map_err(|_| sp_consensus::Error::InvalidSignature(signature, public.to_raw_vec()))?; - - let signature_digest_item = - ::nimbus_seal(signature); - - let mut import_block = BlockImportParams::new(BlockOrigin::Own, header); - import_block.post_digests.push(signature_digest_item); - import_block.body = Some(body); - import_block.state_action = - StateAction::ApplyChanges(sc_consensus::StorageChanges::Changes(storage_changes)); - import_block.fork_choice = Some(ForkChoiceStrategy::LongestChain); - - Ok(import_block) - } - - fn force_authoring(&self) -> bool { - self.force_authoring - } - - fn should_backoff(&self, slot: Slot, chain_head: &B::Header) -> bool { - if let Some(ref strategy) = self.backoff_authoring_blocks { - if let Ok(chain_head_slot) = find_pre_digest::(chain_head) { - return strategy.should_backoff( - *chain_head.number(), - chain_head_slot, - self.client.info().finalized_number, - slot, - self.logging_target(), - ); - } - } - false - } - - fn sync_oracle(&mut self) -> &mut Self::SyncOracle { - &mut self.sync_oracle - } - - fn justification_sync_link(&mut self) -> &mut Self::JustificationSyncLink { - &mut self.justification_sync_link - } - - fn proposer(&mut self, block: &B::Header) -> Self::CreateProposer { - self.env - .init(block) - .map_err(|e| sp_consensus::Error::ClientImport(format!("{:?}", e))) - .boxed() - } - - fn telemetry(&self) -> Option { - self.telemetry.clone() - } - - fn proposing_remaining_duration(&self, slot_info: &SlotInfo) -> std::time::Duration { - let parent_slot = find_pre_digest::(&slot_info.chain_head).ok(); - - sc_consensus_slots::proposing_remaining_duration( - parent_slot, - slot_info, - &self.block_proposal_slot_portion, - self.max_block_proposal_slot_portion.as_ref(), - sc_consensus_slots::SlotLenienceType::Exponential, - self.logging_target(), - ) - } -} - -/// Parameters of [`build_aura_worker`]. -pub struct BuildOrchestratorAuraWorkerParams { - /// The client to interact with the chain. - pub client: Arc, - /// The block import. - pub block_import: I, - /// The proposer factory to build proposer instances. - pub proposer_factory: PF, - /// The sync oracle that can give us the current sync status. - pub sync_oracle: SO, - /// Hook into the sync module to control the justification sync process. - pub justification_sync_link: L, - /// Should we force the authoring of blocks? - pub force_authoring: bool, - /// The backoff strategy when we miss slots. - pub backoff_authoring_blocks: Option, - /// The keystore used by the node. - pub keystore: KeystorePtr, - /// The proportion of the slot dedicated to proposing. - /// - /// The block proposing will be limited to this proportion of the slot from the starting of the - /// slot. However, the proposing can still take longer when there is some lenience factor - /// applied, because there were no blocks produced for some slots. - pub block_proposal_slot_portion: SlotProportion, - /// The maximum proportion of the slot dedicated to proposing with any lenience factor applied - /// due to no blocks being produced. - pub max_block_proposal_slot_portion: Option, - /// Telemetry instance used to report telemetry metrics. - pub telemetry: Option, - /// Compatibility mode that should be used. - /// - /// If in doubt, use `Default::default()`. - pub compatibility_mode: CompatibilityMode, -} - #[async_trait::async_trait] pub trait RetrieveAuthoritiesFromOrchestrator: Send + Sync { /// Create the inherent data providers at the given `parent` block using the given `extra_args`. @@ -619,186 +73,3 @@ pub trait TanssiSlotWorker: SimpleSlotWorker { aux_data: Self::AuxData, ) -> Option>::Proof>>; } - -#[async_trait::async_trait] -impl TanssiSlotWorker - for OrchestratorAuraWorker> -where - B: BlockT, - C: ProvideRuntimeApi + BlockOf + HeaderBackend + Sync, - AuthorityId

: From<::Public>, - E: Environment + Send + Sync, - E::Proposer: Proposer, - I: BlockImport + Send + Sync + 'static, - P: Pair + Send + Sync, - P::Public: AppPublic + Public + Member + Encode + Decode + Hash, - P::Signature: TryFrom> + Member + Encode + Decode + Hash + Debug, - SO: SyncOracle + Send + Clone + Sync, - L: sc_consensus::JustificationSyncLink, - BS: BackoffAuthoringBlocksStrategy> + Send + Sync + 'static, - Error: std::error::Error + Send + From + 'static, -{ - async fn tanssi_on_slot( - &mut self, - slot_info: SlotInfo, - aux_data: Self::AuxData, - ) -> Option>::Proof>> - where - Self: Sync, - { - let slot = slot_info.slot; - let telemetry = self.telemetry(); - let logging_target = self.logging_target(); - - let proposing_remaining_duration = self.proposing_remaining_duration(&slot_info); - - let end_proposing_at = if proposing_remaining_duration == Duration::default() { - debug!( - target: logging_target, - "Skipping proposal slot {} since there's no time left to propose", slot, - ); - - return None; - } else { - Instant::now() + proposing_remaining_duration - }; - - self.notify_slot(&slot_info.chain_head, slot, &aux_data); - - let authorities_len = self.authorities_len(&aux_data); - - if !self.force_authoring() - && self.sync_oracle().is_offline() - && authorities_len.map(|a| a > 1).unwrap_or(false) - { - debug!( - target: logging_target, - "Skipping proposal slot. Waiting for the network." - ); - telemetry!( - telemetry; - CONSENSUS_DEBUG; - "slots.skipping_proposal_slot"; - "authorities_len" => authorities_len, - ); - - return None; - } - - let claim = self - .claim_slot(&slot_info.chain_head, slot, &aux_data) - .await?; - - log::info!("claim valid for slot {:?}", slot); - - if self.should_backoff(slot, &slot_info.chain_head) { - return None; - } - - debug!( - target: logging_target, - "Starting authorship at slot: {slot}" - ); - - telemetry!(telemetry; CONSENSUS_DEBUG; "slots.starting_authorship"; "slot_num" => slot); - - let proposer = match self.proposer(&slot_info.chain_head).await { - Ok(p) => p, - Err(err) => { - warn!( - target: logging_target, - "Unable to author block in slot {slot:?}: {err}" - ); - - telemetry!( - telemetry; - CONSENSUS_WARN; - "slots.unable_authoring_block"; - "slot" => *slot, - "err" => ?err - ); - - return None; - } - }; - - let proposal = self - .propose(proposer, &claim, slot_info, end_proposing_at) - .await?; - - let (block, storage_proof) = (proposal.block, proposal.proof); - let (header, body) = block.deconstruct(); - let header_num = *header.number(); - let header_hash = header.hash(); - let parent_hash = *header.parent_hash(); - - let block_import_params = match self - .block_import_params( - header, - &header_hash, - body.clone(), - proposal.storage_changes, - claim, - aux_data, - ) - .await - { - Ok(bi) => bi, - Err(err) => { - warn!( - target: logging_target, - "Failed to create block import params: {}", err - ); - - return None; - } - }; - - info!( - target: logging_target, - "🔖 Pre-sealed block for proposal at {}. Hash now {:?}, previously {:?}.", - header_num, - block_import_params.post_hash(), - header_hash, - ); - - telemetry!( - telemetry; - CONSENSUS_INFO; - "slots.pre_sealed_block"; - "header_num" => ?header_num, - "hash_now" => ?block_import_params.post_hash(), - "hash_previously" => ?header_hash, - ); - - let header = block_import_params.post_header(); - match self.block_import().import_block(block_import_params).await { - Ok(res) => { - res.handle_justification( - &header.hash(), - *header.number(), - self.justification_sync_link(), - ); - } - Err(err) => { - warn!( - target: logging_target, - "Error with block built on {:?}: {}", parent_hash, err, - ); - - telemetry!( - telemetry; - CONSENSUS_WARN; - "slots.err_with_block_built_on"; - "hash" => ?parent_hash, - "err" => ?err, - ); - } - } - - Some(SlotResult { - block: B::new(header, body), - storage_proof, - }) - } -} diff --git a/client/consensus/src/lib.rs b/client/consensus/src/lib.rs index b074c486f..cc6929a11 100644 --- a/client/consensus/src/lib.rs +++ b/client/consensus/src/lib.rs @@ -22,15 +22,13 @@ use {sp_consensus_slots::Slot, sp_core::crypto::Pair}; +pub mod collators; mod consensus_orchestrator; mod manual_seal; #[cfg(test)] mod tests; -pub use { - consensus_orchestrator::{BuildOrchestratorAuraConsensusParams, OrchestratorAuraConsensus}, - sc_consensus_aura::CompatibilityMode, -}; +pub use sc_consensus_aura::CompatibilityMode; pub use { cumulus_primitives_core::ParaId, diff --git a/client/consensus/src/tests.rs b/client/consensus/src/tests.rs index 1e9866ca7..57ccc861f 100644 --- a/client/consensus/src/tests.rs +++ b/client/consensus/src/tests.rs @@ -20,50 +20,34 @@ // https://github.com/paritytech/substrate/blob/master/client/consensus/aura/src/lib.rs#L832 // Most of the items hereby added are intended to make it work with our current consensus mechanism use { - crate::{ - consensus_orchestrator::{ - build_orchestrator_aura_worker, BuildOrchestratorAuraWorkerParams, - }, - InherentDataProviderExt, LOG_TARGET, - }, + crate::{InherentDataProviderExt, LOG_TARGET}, cumulus_client_consensus_common::ParachainConsensus, - cumulus_primitives_core::PersistedValidationData, futures::prelude::*, futures_timer::Delay, - nimbus_primitives::{ - CompatibleDigestItem, NimbusId, NimbusPair, NIMBUS_ENGINE_ID, NIMBUS_KEY_ID, - }, + nimbus_primitives::{CompatibleDigestItem, NimbusId, NimbusPair, NIMBUS_ENGINE_ID}, parking_lot::Mutex, sc_block_builder::BlockBuilderProvider, - sc_client_api::{BlockchainEvents, HeaderBackend}, sc_consensus::{BoxJustificationImport, ForkChoiceStrategy}, - sc_consensus_aura::SlotProportion, - sc_consensus_slots::{BackoffAuthoringOnFinalizedHeadLagging, SimpleSlotWorker, SlotInfo}, - sc_keystore::LocalKeystore, + sc_consensus_slots::SlotInfo, sc_network_test::{Block as TestBlock, *}, sp_consensus::{ - BlockOrigin, EnableProofRecording, Environment, NoNetwork as DummyOracle, Proposal, - Proposer, SelectChain, SyncOracle, + EnableProofRecording, Environment, Proposal, Proposer, SelectChain, SyncOracle, }, - sp_consensus_aura::{inherents::InherentDataProvider, SlotDuration}, + sp_consensus_aura::SlotDuration, sp_consensus_slots::Slot, - sp_core::{ - crypto::{ByteArray, Pair}, - H256, - }, + sp_core::crypto::{ByteArray, Pair}, sp_inherents::{CreateInherentDataProviders, InherentData}, sp_keyring::sr25519::Keyring, - sp_keystore::Keystore, sp_runtime::{ traits::{Block as BlockT, Header as _}, Digest, DigestItem, }, - sp_timestamp::Timestamp, - std::{sync::Arc, task::Poll, time::Duration}, + std::{sync::Arc, time::Duration}, substrate_test_runtime_client::TestClient, }; // Duration of slot time +#[allow(unused)] const SLOT_DURATION_MS: u64 = 1000; type Error = sp_blockchain::Error; @@ -367,6 +351,7 @@ where } } /// Returns current duration since unix epoch. +#[allow(unused)] pub fn duration_now() -> Duration { use std::time::SystemTime; let now = SystemTime::now(); @@ -380,6 +365,7 @@ pub fn duration_now() -> Duration { } /// Returns the duration until the next slot from now. +#[allow(unused)] pub fn time_until_next_slot(slot_duration: Duration) -> Duration { let now = duration_now().as_millis(); @@ -393,6 +379,8 @@ pub fn time_until_next_slot(slot_duration: Duration) -> Duration { /// Every time a new slot is triggered, `parachain_block_producer.produce_candidate` /// is called and the future it returns is /// polled until completion, unless we are major syncing. +/// TODO: refactor to use the new Tanssi Aura params +#[allow(unused)] pub async fn start_orchestrator_aura_consensus_candidate_producer( slot_duration: SlotDuration, client: C, @@ -429,272 +417,6 @@ pub async fn start_orchestrator_aura_consensus_candidate_producer= &5) - }) - .for_each(move |_| futures::future::ready(())), - ); - - let create_inherent_data_providers = |_, _| async { - let slot = InherentDataProvider::from_timestamp_and_slot_duration( - Timestamp::current(), - SlotDuration::from_millis(SLOT_DURATION_MS), - ); - - Ok((slot,)) - }; - - let sync_oracle = DummyOracle; - let slot_duration = SlotDuration::from_millis(SLOT_DURATION_MS); - - let params = crate::BuildOrchestratorAuraConsensusParams { - proposer_factory: environ, - create_inherent_data_providers: |_, _| async { - let slot = InherentDataProvider::from_timestamp_and_slot_duration( - Timestamp::current(), - SlotDuration::from_millis(SLOT_DURATION_MS), - ); - - Ok((slot,)) - }, - get_authorities_from_orchestrator: move |_block_hash: ::Hash, - (_relay_parent, _validation_data): ( - H256, - PersistedValidationData, - )| { - async move { - let aux_data = vec![ - (Keyring::Alice).public().into(), - (Keyring::Bob).public().into(), - (Keyring::Charlie).public().into(), - ]; - Ok(aux_data) - } - }, - block_import: client.clone(), - para_client: client, - sync_oracle: DummyOracle, - keystore, - force_authoring: false, - backoff_authoring_blocks: Some(BackoffAuthoringOnFinalizedHeadLagging::default()), - slot_duration: SlotDuration::from_millis(SLOT_DURATION_MS), - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(0.5), - max_block_proposal_slot_portion: None, - telemetry: None, - }; - - let parachain_block_producer = - crate::OrchestratorAuraConsensus::build::(params); - - aura_futures.push(start_orchestrator_aura_consensus_candidate_producer( - slot_duration, - select_chain, - parachain_block_producer, - sync_oracle, - create_inherent_data_providers, - )); - } - - future::select( - future::poll_fn(move |cx| { - net.lock().poll(cx); - Poll::<()>::Pending - }), - future::select( - future::join_all(aura_futures), - future::join_all(import_notifications), - ), - ) - .await; -} - -// Checks node slot claim. Again for different slots, different authorities -// should be able to claim -#[tokio::test] -async fn current_node_authority_should_claim_slot() { - let net = AuraTestNet::new(4); - - let mut authorities: Vec = vec![ - Keyring::Alice.public().into(), - Keyring::Bob.public().into(), - Keyring::Charlie.public().into(), - ]; - - let keystore_path = tempfile::tempdir().expect("Creates keystore path"); - let keystore = LocalKeystore::open(keystore_path.path(), None).expect("Creates keystore."); - - let public = keystore - .sr25519_generate_new(NIMBUS_KEY_ID, None) - .expect("Key should be created"); - authorities.push(public.into()); - - let net = Arc::new(Mutex::new(net)); - - let mut net = net.lock(); - let peer = net.peer(3); - let client = peer.client().as_client(); - let environ = DummyFactory(client.clone()); - - let mut worker = - build_orchestrator_aura_worker::( - BuildOrchestratorAuraWorkerParams { - client: client.clone(), - block_import: client, - proposer_factory: environ, - keystore: keystore.into(), - sync_oracle: DummyOracle, - justification_sync_link: (), - force_authoring: false, - backoff_authoring_blocks: Some(BackoffAuthoringOnFinalizedHeadLagging::default()), - telemetry: None, - block_proposal_slot_portion: SlotProportion::new(0.5), - max_block_proposal_slot_portion: None, - compatibility_mode: Default::default(), - }, - ); - - let head = Header::new( - 1, - H256::from_low_u64_be(0), - H256::from_low_u64_be(0), - Default::default(), - Default::default(), - ); - assert!(worker - .claim_slot(&head, 0.into(), &authorities) - .await - .is_none()); - assert!(worker - .claim_slot(&head, 1.into(), &authorities) - .await - .is_none()); - assert!(worker - .claim_slot(&head, 2.into(), &authorities) - .await - .is_none()); - assert!(worker - .claim_slot(&head, 3.into(), &authorities) - .await - .is_some()); - assert!(worker - .claim_slot(&head, 4.into(), &authorities) - .await - .is_none()); - assert!(worker - .claim_slot(&head, 5.into(), &authorities) - .await - .is_none()); - assert!(worker - .claim_slot(&head, 6.into(), &authorities) - .await - .is_none()); - assert!(worker - .claim_slot(&head, 7.into(), &authorities) - .await - .is_some()); -} - -#[tokio::test] -async fn on_slot_returns_correct_block() { - let net = AuraTestNet::new(4); - - let keystore_path = tempfile::tempdir().expect("Creates keystore path"); - let keystore = LocalKeystore::open(keystore_path.path(), None).expect("Creates keystore."); - keystore - .sr25519_generate_new(NIMBUS_KEY_ID, Some(&Keyring::Alice.to_seed())) - .expect("Key should be created"); - - let net = Arc::new(Mutex::new(net)); - - let mut net = net.lock(); - let peer = net.peer(3); - let client = peer.client().as_client(); - let environ = DummyFactory(client.clone()); - - let mut worker = - build_orchestrator_aura_worker::( - BuildOrchestratorAuraWorkerParams { - client: client.clone(), - block_import: client.clone(), - proposer_factory: environ, - keystore: keystore.into(), - sync_oracle: DummyOracle, - justification_sync_link: (), - force_authoring: false, - backoff_authoring_blocks: Some(BackoffAuthoringOnFinalizedHeadLagging::default()), - telemetry: None, - block_proposal_slot_portion: SlotProportion::new(0.5), - max_block_proposal_slot_portion: None, - compatibility_mode: Default::default(), - }, - ); - - let head = client.expect_header(client.info().genesis_hash).unwrap(); - - use crate::consensus_orchestrator::TanssiSlotWorker; - let res = worker - .tanssi_on_slot( - SlotInfo { - slot: 0.into(), - ends_at: std::time::Instant::now() + Duration::from_secs(100), - create_inherent_data: Box::new(()), - duration: Duration::from_millis(1000), - chain_head: head, - block_size_limit: None, - }, - vec![ - (Keyring::Alice).public().into(), - (Keyring::Bob).public().into(), - (Keyring::Charlie).public().into(), - ], - ) - .await - .unwrap(); - - // The returned block should be imported and we should be able to get its header by now. - assert!(client.header(res.block.hash()).unwrap().is_some()); -} - // Tests authorities are correctly returned and eligibility is correctly calculated // thanks to the mocked runtime-apis #[tokio::test] diff --git a/client/node-common/Cargo.toml b/client/node-common/Cargo.toml index 1da6af0cc..409cb8ad2 100644 --- a/client/node-common/Cargo.toml +++ b/client/node-common/Cargo.toml @@ -34,6 +34,7 @@ sc-cli = { workspace = true } sc-client-api = { workspace = true } sc-consensus = { workspace = true } sc-consensus-manual-seal = { workspace = true } +sc-consensus-slots = { workspace = true } sc-executor = { workspace = true } sc-network = { workspace = true } sc-network-common = { workspace = true } @@ -49,6 +50,7 @@ sc-transaction-pool = { workspace = true } sc-transaction-pool-api = { workspace = true } sc-utils = { workspace = true } sp-api = { workspace = true, features = [ "std" ] } +sp-application-crypto = { workspace = true, features = [ "full_crypto", "std" ] } sp-block-builder = { workspace = true } sp-blockchain = { workspace = true } sp-consensus = { workspace = true } @@ -77,6 +79,7 @@ cumulus-client-cli = { workspace = true } cumulus-client-collator = { workspace = true } cumulus-client-consensus-aura = { workspace = true } cumulus-client-consensus-common = { workspace = true } +cumulus-client-consensus-proposer = { workspace = true } cumulus-client-network = { workspace = true } cumulus-client-service = { workspace = true } cumulus-primitives-core = { workspace = true } diff --git a/node/Cargo.toml b/node/Cargo.toml index 0b1b1eb2b..541d68b70 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -95,6 +95,7 @@ cumulus-client-cli = { workspace = true } cumulus-client-collator = { workspace = true } cumulus-client-consensus-aura = { workspace = true } cumulus-client-consensus-common = { workspace = true } +cumulus-client-consensus-proposer = { workspace = true } cumulus-client-network = { workspace = true } cumulus-client-pov-recovery = { workspace = true } cumulus-client-service = { workspace = true } diff --git a/node/src/service.rs b/node/src/service.rs index 53b027e6c..284d753ba 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -23,13 +23,15 @@ use { container_chain_spawner::{CcSpawnMsg, ContainerChainSpawner}, }, cumulus_client_cli::CollatorOptions, - cumulus_client_consensus_aura::SlotProportion, + cumulus_client_collator::service::CollatorService, cumulus_client_consensus_common::{ ParachainBlockImport as TParachainBlockImport, ParachainBlockImportMarker, - ParachainConsensus, }, + cumulus_client_consensus_proposer::Proposer, cumulus_client_pov_recovery::{PoVRecovery, RecoveryDelayRange}, - cumulus_client_service::prepare_node_config, + cumulus_client_service::{ + prepare_node_config, start_relay_chain_tasks, DARecoveryProfile, StartRelayChainTasksParams, + }, cumulus_primitives_core::{ relay_chain::{well_known_keys as RelayWellKnownKeys, CollatorPair, Hash as PHash}, ParaId, @@ -37,8 +39,11 @@ use { cumulus_primitives_parachain_inherent::{ MockValidationDataInherentDataProvider, MockXcmConfig, }, - cumulus_relay_chain_interface::RelayChainInterface, - dancebox_runtime::{opaque::Block, RuntimeApi}, + cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface}, + dancebox_runtime::{ + opaque::{Block, Hash}, + RuntimeApi, + }, dc_orchestrator_chain_interface::{ OrchestratorChainError, OrchestratorChainInterface, OrchestratorChainResult, }, @@ -54,12 +59,12 @@ use { sc_client_api::{ AuxStore, Backend as BackendT, BlockchainEvents, HeaderBackend, UsageProvider, }, - sc_consensus::BasicQueue, sc_consensus::BlockImport, + sc_consensus::{BasicQueue, ImportQueue}, sc_executor::NativeElseWasmExecutor, sc_network::NetworkBlock, sc_network_sync::SyncingService, - sc_service::{Configuration, TFullBackend, TFullClient, TaskManager}, + sc_service::{Configuration, SpawnTaskHandle, TFullBackend, TFullClient, TaskManager}, sc_telemetry::TelemetryHandle, sp_api::StorageProof, sp_consensus::SyncOracle, @@ -69,7 +74,7 @@ use { sp_state_machine::{Backend as StateBackend, StorageValue}, std::{future::Future, pin::Pin, sync::Arc, time::Duration}, substrate_prometheus_endpoint::Registry, - tc_consensus::{BuildOrchestratorAuraConsensusParams, OrchestratorAuraConsensus}, + tc_consensus::collators::basic::{self as basic_tanssi_aura, Params as BasicTanssiAuraParams}, tokio::sync::mpsc::{unbounded_channel, UnboundedSender}, }; @@ -304,7 +309,31 @@ async fn start_node_impl( let sync_keystore = node_builder.keystore_container.keystore(); let mut collate_on_tanssi = None; - let node_builder = if validator { + let announce_block = { + let sync_service = node_builder.network.sync_service.clone(); + Arc::new(move |hash, data| sync_service.announce_block(hash, data)) + }; + + let (mut node_builder, import_queue_service) = node_builder.extract_import_queue_service(); + + start_relay_chain_tasks(StartRelayChainTasksParams { + client: node_builder.client.clone(), + announce_block: announce_block.clone(), + para_id, + relay_chain_interface: relay_chain_interface.clone(), + task_manager: &mut node_builder.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: node_builder.network.sync_service.clone(), + })?; + + if validator { let collator_key = collator_key .clone() .expect("Command line arguments do not allow this. qed"); @@ -321,49 +350,38 @@ async fn start_node_impl( ); } - let parachain_consensus = build_consensus_orchestrator( - node_builder.client.clone(), - block_import, - node_builder.prometheus_registry.as_ref(), - node_builder.telemetry.as_ref().map(|t| t.handle()), - &node_builder.task_manager, - relay_chain_interface.clone(), - node_builder.transaction_pool.clone(), - node_builder.network.sync_service.clone(), - node_builder.keystore_container.keystore(), - force_authoring, - para_id, - )?; + // Params for collate_on_tanssi closure + let node_spawn_handle = node_builder.task_manager.spawn_handle().clone(); + let node_keystore = node_builder.keystore_container.keystore().clone(); + let node_telemetry_handle = node_builder.telemetry.as_ref().map(|t| t.handle()).clone(); + let node_client = node_builder.client.clone(); + let relay_interface = relay_chain_interface.clone(); + let node_sync_service = node_builder.network.sync_service.clone(); + let overseer = overseer_handle.clone(); - let params_generator = node_builder.cumulus_client_collator_params_generator( - para_id, - overseer_handle.clone(), - collator_key.clone(), - parachain_consensus.clone(), - ); - - // TODO: change for async backing collate_on_tanssi = Some(move || async move { - #[allow(deprecated)] - cumulus_client_collator::start_collator(params_generator()).await; + start_consensus_orchestrator( + node_client, + block_import.clone(), + node_builder.prometheus_registry.clone(), + node_telemetry_handle, + node_spawn_handle, + relay_interface, + node_builder.transaction_pool.clone(), + node_sync_service, + node_keystore, + force_authoring, + relay_chain_slot_duration, + para_id, + collator_key.clone(), + overseer, + announce_block.clone(), + ); }); - node_builder - .start_collator( - para_id, - relay_chain_interface.clone(), - relay_chain_slot_duration, - parachain_consensus, - collator_key, - ) - .await? - } else { - node_builder.start_full_node( - para_id, - relay_chain_interface.clone(), - relay_chain_slot_duration, - )? - }; + let call = collate_on_tanssi.clone().unwrap(); + call().await; + } node_builder.network.start_network.start_network(); @@ -461,6 +479,7 @@ pub async fn start_node_impl_container( let node_builder = NodeConfig::new_builder(¶chain_config, None)?; let (block_import, import_queue) = import_queue(¶chain_config, &node_builder); + let import_queue_service = import_queue.service(); log::info!("are we collators? {:?}", collator); let node_builder = node_builder @@ -505,34 +524,33 @@ pub async fn start_node_impl_container( Arc Pin + Send>> + Send + Sync>, > = None; - let node_builder = if collator { - let (node_builder, import_queue) = node_builder.extract_import_queue_service(); + let overseer_handle = relay_chain_interface + .overseer_handle() + .map_err(|e| sc_service::Error::Application(Box::new(e)))?; + let (mut node_builder, node_import_queue_service) = node_builder.extract_import_queue_service(); + + start_relay_chain_tasks(StartRelayChainTasksParams { + client: node_builder.client.clone(), + announce_block: announce_block.clone(), + para_id, + relay_chain_interface: relay_chain_interface.clone(), + task_manager: &mut node_builder.task_manager, + da_recovery_profile: if collator { + DARecoveryProfile::Collator + } else { + DARecoveryProfile::FullNode + }, + import_queue: import_queue_service, + relay_chain_slot_duration, + recovery_handle: Box::new(overseer_handle.clone()), + sync_service: node_builder.network.sync_service.clone(), + })?; + if collator { let collator_key = collator_key .clone() .expect("Command line arguments do not allow this. qed"); - let overseer_handle = relay_chain_interface - .overseer_handle() - .map_err(|e| sc_service::Error::Application(Box::new(e)))?; - - let parachain_consensus = build_consensus_container( - node_builder.client.clone(), - orchestrator_client.clone(), - block_import, - prometheus_registry.as_ref(), - node_builder.telemetry.as_ref().map(|t| t.handle()), - &node_builder.task_manager, - relay_chain_interface.clone(), - orchestrator_chain_interface.clone(), - node_builder.transaction_pool.clone(), - node_builder.network.sync_service.clone(), - keystore, - force_authoring, - para_id, - orchestrator_para_id, - )?; - // Given the sporadic nature of the explicit recovery operation and the // possibility to retry infinite times this value is more than enough. // In practice here we expect no more than one queued messages. @@ -544,7 +562,7 @@ pub async fn start_node_impl_container( para_id, node_builder.client.clone(), relay_chain_interface.clone(), - announce_block, + announce_block.clone(), Some(recovery_chan_tx), ); @@ -563,7 +581,7 @@ pub async fn start_node_impl_container( max: relay_chain_slot_duration, }, node_builder.client.clone(), - import_queue, + node_import_queue_service, relay_chain_interface.clone(), para_id, recovery_chan_rx, @@ -576,13 +594,6 @@ pub async fn start_node_impl_container( pov_recovery.run(), ); - let params_generator = node_builder.cumulus_client_collator_params_generator( - para_id, - overseer_handle, - collator_key, - parachain_consensus, - ); - // Hack to fix logs, if this future is awaited by the ContainerChainSpawner thread, // the logs will say "Orchestrator" instead of "Container-2000". // Wrapping the future in this function fixes that. @@ -594,22 +605,35 @@ pub async fn start_node_impl_container( f.await } + let node_spawn_handle = node_builder.task_manager.spawn_handle().clone(); + let node_client = node_builder.client.clone(); + start_collation = Some(Arc::new(move || { Box::pin(wrap( para_id, - #[allow(deprecated)] - cumulus_client_collator::start_collator(params_generator()), + start_consensus_container( + node_client.clone(), + orchestrator_client.clone(), + block_import.clone(), + prometheus_registry.clone(), + node_builder.telemetry.as_ref().map(|t| t.handle()).clone(), + node_spawn_handle.clone(), + relay_chain_interface.clone(), + orchestrator_chain_interface.clone(), + node_builder.transaction_pool.clone(), + node_builder.network.sync_service.clone(), + keystore.clone(), + force_authoring, + relay_chain_slot_duration, + para_id, + orchestrator_para_id, + collator_key.clone(), + overseer_handle.clone(), + announce_block.clone(), + ), )) })); - - node_builder - } else { - node_builder.start_full_node( - para_id, - relay_chain_interface.clone(), - relay_chain_slot_duration, - )? - }; + } node_builder.network.start_network.start_network(); @@ -636,51 +660,58 @@ fn build_manual_seal_import_queue( )) } -fn build_consensus_container( +// TODO: this function does not need to be async +#[sc_tracing::logging::prefix_logs_with(container_log_str(para_id))] +async fn start_consensus_container( client: Arc, orchestrator_client: Arc, block_import: ParachainBlockImport, - prometheus_registry: Option<&Registry>, + prometheus_registry: Option, telemetry: Option, - task_manager: &TaskManager, + spawner: SpawnTaskHandle, relay_chain_interface: Arc, orchestrator_chain_interface: Arc, transaction_pool: Arc>, sync_oracle: Arc>, keystore: KeystorePtr, force_authoring: bool, + relay_chain_slot_duration: Duration, para_id: ParaId, orchestrator_para_id: ParaId, -) -> Result>, sc_service::Error> { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*orchestrator_client)?; + collator_key: CollatorPair, + overseer_handle: OverseerHandle, + announce_block: Arc>) + Send + Sync>, +) { + let slot_duration = cumulus_client_consensus_aura::slot_duration(&*orchestrator_client) + .expect("start_consensus_container: slot duration should exist"); let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), + spawner.clone(), client.clone(), transaction_pool, - prometheus_registry, + prometheus_registry.as_ref(), telemetry.clone(), ); + let proposer = Proposer::new(proposer_factory); + + let collator_service = CollatorService::new( + client.clone(), + Arc::new(spawner.clone()), + announce_block, + client.clone(), + ); + + let relay_chain_interace_for_cidp = relay_chain_interface.clone(); let relay_chain_interace_for_orch = relay_chain_interface.clone(); let orchestrator_client_for_cidp = orchestrator_client; - let params = tc_consensus::BuildOrchestratorAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |_block_hash, (relay_parent, validation_data)| { - let relay_chain_interface = relay_chain_interface.clone(); + let params = BasicTanssiAuraParams { + create_inherent_data_providers: move |_block_hash, (relay_parent, _validation_data)| { + let relay_chain_interface = relay_chain_interace_for_cidp.clone(); let orchestrator_chain_interface = orchestrator_chain_interface.clone(); async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - para_id, - ) - .await; - let authorities_noting_inherent = ccp_authorities_noting_inherent::ContainerChainAuthoritiesInherentData::create_at( relay_parent, @@ -690,6 +721,7 @@ fn build_consensus_container( ) .await; + // TODO: should we still retrieve timestamp and slot? let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); let slot = @@ -698,24 +730,13 @@ fn build_consensus_container( slot_duration, ); - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - let authorities_noting_inherent = authorities_noting_inherent.ok_or_else(|| { Box::::from( "Failed to create authoritiesnoting inherent", ) })?; - Ok(( - slot, - timestamp, - parachain_inherent, - authorities_noting_inherent, - )) + Ok((slot, timestamp, authorities_noting_inherent)) } }, get_authorities_from_orchestrator: move |_block_hash, (relay_parent, _validation_data)| { @@ -760,70 +781,72 @@ fn build_consensus_container( }, block_import, para_client: client, - backoff_authoring_blocks: Option::<()>::None, + relay_client: relay_chain_interface, sync_oracle, keystore, - force_authoring, + collator_key, + para_id, + overseer_handle, 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, + force_authoring, + relay_chain_slot_duration, + proposer, + collator_service, + // Very limited proposal time. + authoring_duration: Duration::from_millis(500), + collation_request_receiver: None, }; - Ok(tc_consensus::OrchestratorAuraConsensus::build::< - NimbusPair, - _, - _, - _, - _, - _, - _, - >(params)) + let fut = basic_tanssi_aura::run::(params); + spawner.spawn("tanssi-aura-container", None, fut); } -fn build_consensus_orchestrator( +fn start_consensus_orchestrator( client: Arc, block_import: ParachainBlockImport, - prometheus_registry: Option<&Registry>, + prometheus_registry: Option, telemetry: Option, - task_manager: &TaskManager, + spawner: SpawnTaskHandle, relay_chain_interface: Arc, transaction_pool: Arc>, sync_oracle: Arc>, keystore: KeystorePtr, force_authoring: bool, + relay_chain_slot_duration: Duration, para_id: ParaId, -) -> Result>, sc_service::Error> { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; + collator_key: CollatorPair, + overseer_handle: OverseerHandle, + announce_block: Arc>) + Send + Sync>, +) { + let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client) + .expect("start_consensus_orchestrator: slot duration should exist"); let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), + spawner.clone(), client.clone(), transaction_pool, - prometheus_registry, + prometheus_registry.as_ref(), telemetry.clone(), ); + let proposer = Proposer::new(proposer_factory); + + let collator_service = CollatorService::new( + client.clone(), + Arc::new(spawner.clone()), + announce_block, + client.clone(), + ); + + let relay_chain_interace_for_cidp = relay_chain_interface.clone(); let client_set_aside_for_cidp = client.clone(); let client_set_aside_for_orch = client.clone(); - let params = BuildOrchestratorAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |block_hash, (relay_parent, validation_data)| { - let relay_chain_interface = relay_chain_interface.clone(); + let params = BasicTanssiAuraParams { + create_inherent_data_providers: move |block_hash, (relay_parent, _validation_data)| { + let relay_chain_interface = relay_chain_interace_for_cidp.clone(); let client_set_aside_for_cidp = client_set_aside_for_cidp.clone(); async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - para_id, - ) - .await; - let para_ids = client_set_aside_for_cidp .runtime_api() .registered_paras(block_hash)?; @@ -844,19 +867,13 @@ fn build_consensus_orchestrator( slot_duration, ); - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - let author_noting_inherent = author_noting_inherent.ok_or_else(|| { Box::::from( "Failed to create author noting inherent", ) })?; - Ok((slot, timestamp, parachain_inherent, author_noting_inherent)) + Ok((slot, timestamp, author_noting_inherent)) } }, get_authorities_from_orchestrator: @@ -887,27 +904,24 @@ fn build_consensus_orchestrator( }, block_import, para_client: client, - backoff_authoring_blocks: Option::<()>::None, + relay_client: relay_chain_interface, sync_oracle, keystore, - force_authoring, + collator_key, + para_id, + overseer_handle, 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, + relay_chain_slot_duration, + force_authoring, + proposer, + collator_service, + // Very limited proposal time. + authoring_duration: Duration::from_millis(500), + collation_request_receiver: None, }; - Ok(OrchestratorAuraConsensus::build::< - NimbusPair, - _, - _, - _, - _, - _, - _, - >(params)) + let fut = basic_tanssi_aura::run::(params); + spawner.spawn("tanssi-aura", None, fut); } /// Start a parachain node. diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 3077595ad..44ed54a5a 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -189,7 +189,10 @@ impl WeightToFeePolynomial for WeightToFee { pub mod opaque { use { super::*, - sp_runtime::{generic, traits::BlakeTwo256}, + sp_runtime::{ + generic, + traits::{BlakeTwo256, Hash as HashT}, + }, }; pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; @@ -199,6 +202,8 @@ pub mod opaque { pub type Block = generic::Block; /// Opaque block identifier type. pub type BlockId = generic::BlockId; + /// Opaque block hash type. + pub type Hash = ::Output; } impl_opaque_keys! {