diff --git a/Cargo.lock b/Cargo.lock index 4e37115acc04..8c4df5edb58d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -523,7 +523,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "hash-db", "log", @@ -2504,7 +2504,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", ] @@ -2527,7 +2527,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-support-procedural", @@ -2552,7 +2552,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "Inflector", "array-bytes", @@ -2599,7 +2599,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2610,7 +2610,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2627,7 +2627,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-system", @@ -2656,7 +2656,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-recursion", "futures", @@ -2677,7 +2677,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "bitflags", "environmental", @@ -2711,7 +2711,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "Inflector", "cfg-expr", @@ -2727,7 +2727,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2739,7 +2739,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "proc-macro2", "quote", @@ -2749,7 +2749,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-executive", @@ -2775,18 +2775,19 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "serde", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "cfg-if", "frame-support", @@ -2805,7 +2806,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -2820,7 +2821,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "sp-api", @@ -2829,7 +2830,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "parity-scale-codec", @@ -3011,7 +3012,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "chrono", "frame-election-provider-support", @@ -4931,7 +4932,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "futures", "log", @@ -4950,7 +4951,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "anyhow", "jsonrpsee", @@ -5533,7 +5534,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5548,7 +5549,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-system", @@ -5564,7 +5565,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-system", @@ -5578,7 +5579,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5602,7 +5603,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5622,7 +5623,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5641,7 +5642,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5656,7 +5657,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-system", @@ -5675,7 +5676,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5699,7 +5700,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5717,7 +5718,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5736,7 +5737,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5753,7 +5754,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5770,7 +5771,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5788,7 +5789,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5811,7 +5812,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5824,7 +5825,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5842,7 +5843,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5860,7 +5861,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5883,7 +5884,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5899,7 +5900,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5919,7 +5920,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5936,7 +5937,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5953,7 +5954,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5972,7 +5973,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5989,7 +5990,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6005,7 +6006,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6021,7 +6022,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-system", @@ -6038,7 +6039,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6058,7 +6059,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6069,7 +6070,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-system", @@ -6086,7 +6087,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6110,7 +6111,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6127,7 +6128,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6142,7 +6143,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6160,7 +6161,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6175,7 +6176,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6194,7 +6195,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6211,7 +6212,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-system", @@ -6232,7 +6233,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6248,7 +6249,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-system", @@ -6262,7 +6263,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6285,7 +6286,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6296,7 +6297,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "log", "sp-arithmetic", @@ -6305,7 +6306,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "sp-api", @@ -6314,7 +6315,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6331,7 +6332,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6346,7 +6347,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6364,7 +6365,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6383,7 +6384,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-support", "frame-system", @@ -6399,7 +6400,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6415,7 +6416,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6427,7 +6428,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6444,7 +6445,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6459,7 +6460,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6475,7 +6476,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6490,7 +6491,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6862,7 +6863,7 @@ dependencies = [ "nix 0.26.2", "polkadot-cli", "polkadot-core-primitives", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-overseer", "substrate-rpc-client", "tempfile", @@ -6988,7 +6989,8 @@ dependencies = [ "futures", "log", "polkadot-client", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf-execute-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-metrics", "polkadot-performance-test", "polkadot-service", @@ -7467,6 +7469,9 @@ dependencies = [ "parity-scale-codec", "pin-project", "polkadot-core-primitives", + "polkadot-node-core-pvf-common", + "polkadot-node-core-pvf-execute-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-parachain", @@ -7479,6 +7484,8 @@ dependencies = [ "sp-wasm-interface", "substrate-build-script-utils", "tempfile", + "test-parachain-adder", + "test-parachain-halt", "tokio", "tracing-gum", ] @@ -7507,15 +7514,32 @@ dependencies = [ ] [[package]] -name = "polkadot-node-core-pvf-worker" +name = "polkadot-node-core-pvf-common" version = "0.9.41" dependencies = [ - "assert_matches", "cpu-time", "futures", "libc", "parity-scale-codec", - "polkadot-node-core-pvf", + "polkadot-parachain", + "polkadot-primitives", + "sc-executor-common", + "sc-executor-wasmtime", + "sp-core", + "sp-tracing", + "substrate-build-script-utils", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-execute-worker" +version = "0.9.41" +dependencies = [ + "cpu-time", + "futures", + "parity-scale-codec", + "polkadot-node-core-pvf-common", "polkadot-parachain", "polkadot-primitives", "rayon", @@ -7527,10 +7551,28 @@ dependencies = [ "sp-io", "sp-maybe-compressed-blob", "sp-tracing", - "substrate-build-script-utils", - "tempfile", - "test-parachain-adder", - "test-parachain-halt", + "tikv-jemalloc-ctl", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-prepare-worker" +version = "0.9.41" +dependencies = [ + "futures", + "libc", + "parity-scale-codec", + "polkadot-node-core-pvf-common", + "polkadot-parachain", + "polkadot-primitives", + "rayon", + "sc-executor", + "sc-executor-common", + "sc-executor-wasmtime", + "sp-io", + "sp-maybe-compressed-blob", + "sp-tracing", "tikv-jemalloc-ctl", "tokio", "tracing-gum", @@ -7786,7 +7828,7 @@ dependencies = [ "kusama-runtime", "log", "polkadot-erasure-coding", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-primitives", "polkadot-primitives", "quote", @@ -8292,7 +8334,8 @@ dependencies = [ "polkadot-node-core-backing", "polkadot-node-core-candidate-validation", "polkadot-node-core-dispute-coordinator", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf-execute-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -8878,9 +8921,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] @@ -9583,7 +9626,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "log", "sp-core", @@ -9594,7 +9637,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "futures", @@ -9623,7 +9666,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "futures", "futures-timer", @@ -9646,7 +9689,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9661,7 +9704,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9680,7 +9723,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9691,7 +9734,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "chrono", @@ -9731,7 +9774,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "fnv", "futures", @@ -9758,7 +9801,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "hash-db", "kvdb", @@ -9784,7 +9827,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "futures", @@ -9809,7 +9852,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "fork-tree", @@ -9845,7 +9888,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "futures", "jsonrpsee", @@ -9867,7 +9910,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "async-channel", @@ -9903,7 +9946,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "futures", "jsonrpsee", @@ -9922,7 +9965,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9935,7 +9978,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9975,7 +10018,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "finality-grandpa", "futures", @@ -9995,7 +10038,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "futures", @@ -10018,7 +10061,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -10040,7 +10083,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -10052,7 +10095,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "anyhow", "cfg-if", @@ -10070,7 +10113,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "ansi_term", "futures", @@ -10086,7 +10129,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "parking_lot 0.12.1", @@ -10100,7 +10143,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "async-channel", @@ -10145,7 +10188,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-channel", "cid", @@ -10166,7 +10209,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "async-trait", @@ -10194,7 +10237,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "ahash 0.8.2", "futures", @@ -10213,7 +10256,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "async-channel", @@ -10236,7 +10279,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "async-channel", @@ -10271,14 +10314,13 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "futures", "libp2p", "log", "parity-scale-codec", - "pin-project", "sc-network", "sc-network-common", "sc-peerset", @@ -10291,7 +10333,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "bytes", @@ -10322,7 +10364,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "futures", "libp2p-identity", @@ -10338,7 +10380,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10347,7 +10389,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "futures", "jsonrpsee", @@ -10378,7 +10420,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10397,7 +10439,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "http", "jsonrpsee", @@ -10412,7 +10454,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "futures", @@ -10438,7 +10480,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "directories", @@ -10504,7 +10546,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "log", "parity-scale-codec", @@ -10515,7 +10557,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "clap 4.2.5", "fs4", @@ -10531,7 +10573,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10550,7 +10592,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "futures", "libc", @@ -10569,7 +10611,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "chrono", "futures", @@ -10588,7 +10630,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "ansi_term", "atty", @@ -10619,7 +10661,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10630,7 +10672,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "futures", @@ -10657,7 +10699,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "futures", @@ -10671,7 +10713,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-channel", "futures", @@ -11219,7 +11261,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "hash-db", "log", @@ -11239,7 +11281,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "Inflector", "blake2", @@ -11253,7 +11295,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11266,7 +11308,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "integer-sqrt", "num-traits", @@ -11280,7 +11322,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11293,7 +11335,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "sp-api", @@ -11305,7 +11347,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "futures", "log", @@ -11323,7 +11365,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "futures", @@ -11338,7 +11380,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "parity-scale-codec", @@ -11356,7 +11398,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "parity-scale-codec", @@ -11377,7 +11419,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "lazy_static", "parity-scale-codec", @@ -11396,7 +11438,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "finality-grandpa", "log", @@ -11414,7 +11456,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11426,7 +11468,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "bitflags", @@ -11470,7 +11512,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "blake2b_simd", "byteorder", @@ -11484,7 +11526,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "proc-macro2", "quote", @@ -11495,7 +11537,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11504,7 +11546,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "proc-macro2", "quote", @@ -11514,7 +11556,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "environmental", "parity-scale-codec", @@ -11525,7 +11567,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11540,7 +11582,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "bytes", "ed25519", @@ -11566,7 +11608,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "lazy_static", "sp-core", @@ -11577,7 +11619,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "futures", "parity-scale-codec", @@ -11591,7 +11633,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "thiserror", "zstd 0.12.3+zstd.1.5.2", @@ -11600,7 +11642,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -11611,7 +11653,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11629,7 +11671,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11643,7 +11685,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "sp-api", "sp-core", @@ -11653,7 +11695,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "backtrace", "lazy_static", @@ -11663,7 +11705,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "rustc-hash", "serde", @@ -11673,7 +11715,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "either", "hash256-std-hasher", @@ -11695,7 +11737,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11713,7 +11755,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "Inflector", "proc-macro-crate", @@ -11725,7 +11767,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11739,7 +11781,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11752,7 +11794,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "hash-db", "log", @@ -11772,7 +11814,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "log", "parity-scale-codec", @@ -11790,12 +11832,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11808,7 +11850,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "futures-timer", @@ -11823,7 +11865,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "sp-std", @@ -11835,7 +11877,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "sp-api", "sp-runtime", @@ -11844,7 +11886,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "log", @@ -11860,7 +11902,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11883,7 +11925,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11900,7 +11942,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11911,7 +11953,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11925,7 +11967,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "parity-scale-codec", "scale-info", @@ -12166,7 +12208,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "platforms 2.0.0", ] @@ -12174,7 +12216,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12193,7 +12235,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "hyper", "log", @@ -12205,7 +12247,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "jsonrpsee", @@ -12218,7 +12260,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "jsonrpsee", "log", @@ -12237,7 +12279,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "array-bytes", "async-trait", @@ -12263,7 +12305,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "futures", "substrate-test-utils-derive", @@ -12273,7 +12315,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12284,7 +12326,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "ansi_term", "build-helper", @@ -12464,7 +12506,7 @@ dependencies = [ "log", "parity-scale-codec", "polkadot-cli", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-parachain", @@ -12512,7 +12554,7 @@ dependencies = [ "log", "parity-scale-codec", "polkadot-cli", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-parachain", @@ -13128,7 +13170,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" +source = "git+https://github.com/paritytech/substrate?branch=master#f4cb21c876d4ce19eb9ef09c39bebf83ba01d16d" dependencies = [ "async-trait", "clap 4.2.5", diff --git a/Cargo.toml b/Cargo.toml index 02722fd28653..cc3b4e4c1d35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ tikv-jemallocator = "0.5.0" # Crates in our workspace, defined as dependencies so we can pass them feature flags. polkadot-cli = { path = "cli", features = [ "kusama-native", "westend-native", "rococo-native" ] } -polkadot-node-core-pvf-worker = { path = "node/core/pvf/worker" } +polkadot-node-core-pvf-prepare-worker = { path = "node/core/pvf/prepare-worker" } polkadot-overseer = { path = "node/overseer" } [dev-dependencies] @@ -81,7 +81,9 @@ members = [ "node/core/parachains-inherent", "node/core/provisioner", "node/core/pvf", - "node/core/pvf/worker", + "node/core/pvf/common", + "node/core/pvf/execute-worker", + "node/core/pvf/prepare-worker", "node/core/pvf-checker", "node/core/runtime-api", "node/network/approval-distribution", @@ -208,7 +210,7 @@ try-runtime = [ "polkadot-cli/try-runtime" ] fast-runtime = [ "polkadot-cli/fast-runtime" ] runtime-metrics = [ "polkadot-cli/runtime-metrics" ] pyroscope = ["polkadot-cli/pyroscope"] -jemalloc-allocator = ["polkadot-node-core-pvf-worker/jemalloc-allocator", "polkadot-overseer/jemalloc-allocator"] +jemalloc-allocator = ["polkadot-node-core-pvf-prepare-worker/jemalloc-allocator", "polkadot-overseer/jemalloc-allocator"] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 04596d5a6d0b..1fe9fa696cfd 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -23,7 +23,8 @@ pyroscope_pprofrs = { version = "0.2", optional = true } service = { package = "polkadot-service", path = "../node/service", default-features = false, optional = true } polkadot-client = { path = "../node/client", optional = true } -polkadot-node-core-pvf-worker = { path = "../node/core/pvf/worker", optional = true } +polkadot-node-core-pvf-execute-worker = { path = "../node/core/pvf/execute-worker", optional = true } +polkadot-node-core-pvf-prepare-worker = { path = "../node/core/pvf/prepare-worker", optional = true } polkadot-performance-test = { path = "../node/test/performance-test", optional = true } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -54,7 +55,8 @@ cli = [ "frame-benchmarking-cli", "try-runtime-cli", "polkadot-client", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf-execute-worker", + "polkadot-node-core-pvf-prepare-worker", ] runtime-benchmarks = [ "service/runtime-benchmarks", diff --git a/cli/src/cli.rs b/cli/src/cli.rs index b775bb6b77ad..69c54b428a92 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -114,9 +114,10 @@ pub struct RunCmd { #[arg(long = "grandpa-pause", num_args = 2)] pub grandpa_pause: Vec, - /// Enable the BEEFY gadget (only on Rococo or Wococo for now). + /// Disable the BEEFY gadget + /// (currently enabled by default on Rococo, Wococo and Versi). #[arg(long)] - pub beefy: bool, + pub no_beefy: bool, /// Add the destination address to the jaeger agent. /// diff --git a/cli/src/command.rs b/cli/src/command.rs index 802ba93941c3..378e8e7650c2 100644 --- a/cli/src/command.rs +++ b/cli/src/command.rs @@ -298,12 +298,9 @@ where .map_err(Error::from)?; let chain_spec = &runner.config().chain_spec; - // Disallow BEEFY on production networks. - if cli.run.beefy && - (chain_spec.is_polkadot() || chain_spec.is_kusama() || chain_spec.is_westend()) - { - return Err(Error::Other("BEEFY disallowed on production networks".to_string())) - } + // By default, enable BEEFY on test networks. + let enable_beefy = (chain_spec.is_rococo() || chain_spec.is_wococo() || chain_spec.is_versi()) && + !cli.run.no_beefy; set_default_ss58_version(chain_spec); @@ -346,7 +343,7 @@ where config, service::IsCollator::No, grandpa_pause, - cli.run.beefy, + enable_beefy, jaeger_agent, None, false, @@ -495,7 +492,7 @@ pub fn run() -> Result<()> { #[cfg(not(target_os = "android"))] { - polkadot_node_core_pvf_worker::prepare_worker_entrypoint( + polkadot_node_core_pvf_prepare_worker::worker_entrypoint( &cmd.socket_path, Some(&cmd.node_impl_version), ); @@ -517,7 +514,7 @@ pub fn run() -> Result<()> { #[cfg(not(target_os = "android"))] { - polkadot_node_core_pvf_worker::execute_worker_entrypoint( + polkadot_node_core_pvf_execute_worker::worker_entrypoint( &cmd.socket_path, Some(&cmd.node_impl_version), ); diff --git a/node/core/pvf/Cargo.toml b/node/core/pvf/Cargo.toml index 026930758b86..d00c13fda2b0 100644 --- a/node/core/pvf/Cargo.toml +++ b/node/core/pvf/Cargo.toml @@ -4,6 +4,10 @@ version.workspace = true authors.workspace = true edition.workspace = true +[[bin]] +name = "puppet_worker" +path = "bin/puppet_worker.rs" + [dependencies] always-assert = "0.1" futures = "0.3.21" @@ -13,12 +17,16 @@ libc = "0.2.139" pin-project = "1.0.9" rand = "0.8.5" slotmap = "1.0" +tempfile = "3.3.0" tokio = { version = "1.24.2", features = ["fs", "process"] } parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } polkadot-parachain = { path = "../../../parachain" } polkadot-core-primitives = { path = "../../../core-primitives" } +polkadot-node-core-pvf-common = { path = "common" } +polkadot-node-core-pvf-execute-worker = { path = "execute-worker" } +polkadot-node-core-pvf-prepare-worker = { path = "prepare-worker" } polkadot-node-metrics = { path = "../../metrics" } polkadot-node-primitives = { path = "../../primitives" } polkadot-primitives = { path = "../../../primitives" } @@ -34,4 +42,6 @@ substrate-build-script-utils = { git = "https://github.com/paritytech/substrate" [dev-dependencies] assert_matches = "1.4.0" hex-literal = "0.3.4" -tempfile = "3.3.0" + +adder = { package = "test-parachain-adder", path = "../../../parachain/test-parachains/adder" } +halt = { package = "test-parachain-halt", path = "../../../parachain/test-parachains/halt" } diff --git a/node/core/pvf/worker/bin/puppet_worker.rs b/node/core/pvf/bin/puppet_worker.rs similarity index 92% rename from node/core/pvf/worker/bin/puppet_worker.rs rename to node/core/pvf/bin/puppet_worker.rs index ddd81971292b..7f93519d8454 100644 --- a/node/core/pvf/worker/bin/puppet_worker.rs +++ b/node/core/pvf/bin/puppet_worker.rs @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -polkadot_node_core_pvf_worker::decl_puppet_worker_main!(); +polkadot_node_core_pvf::decl_puppet_worker_main!(); diff --git a/node/core/pvf/common/Cargo.toml b/node/core/pvf/common/Cargo.toml new file mode 100644 index 000000000000..de9fa10804c7 --- /dev/null +++ b/node/core/pvf/common/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "polkadot-node-core-pvf-common" +version.workspace = true +authors.workspace = true +edition.workspace = true + +[dependencies] +cpu-time = "1.0.0" +futures = "0.3.21" +gum = { package = "tracing-gum", path = "../../../gum" } +libc = "0.2.139" +tokio = { version = "1.24.2", features = ["fs", "process", "io-util"] } + +parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } + +polkadot-parachain = { path = "../../../../parachain" } +polkadot-primitives = { path = "../../../../primitives" } + +sc-executor-common = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-executor-wasmtime = { git = "https://github.com/paritytech/substrate", branch = "master" } + +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } + +[build-dependencies] +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/core/pvf/worker/build.rs b/node/core/pvf/common/build.rs similarity index 100% rename from node/core/pvf/worker/build.rs rename to node/core/pvf/common/build.rs diff --git a/node/core/pvf/common/src/error.rs b/node/core/pvf/common/src/error.rs new file mode 100644 index 000000000000..56353c53b4d2 --- /dev/null +++ b/node/core/pvf/common/src/error.rs @@ -0,0 +1,106 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot 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. + +// Polkadot 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 Polkadot. If not, see . + +use crate::prepare::PrepareStats; +use parity_scale_codec::{Decode, Encode}; +use std::fmt; + +/// Result of PVF preparation performed by the validation host. Contains stats about the preparation if +/// successful +pub type PrepareResult = Result; + +/// An error that occurred during the prepare part of the PVF pipeline. +#[derive(Debug, Clone, Encode, Decode)] +pub enum PrepareError { + /// During the prevalidation stage of preparation an issue was found with the PVF. + Prevalidation(String), + /// Compilation failed for the given PVF. + Preparation(String), + /// An unexpected panic has occurred in the preparation worker. + Panic(String), + /// Failed to prepare the PVF due to the time limit. + TimedOut, + /// An IO error occurred. This state is reported by either the validation host or by the worker. + IoErr(String), + /// The temporary file for the artifact could not be created at the given cache path. This state is reported by the + /// validation host (not by the worker). + CreateTmpFileErr(String), + /// The response from the worker is received, but the file cannot be renamed (moved) to the final destination + /// location. This state is reported by the validation host (not by the worker). + RenameTmpFileErr(String), +} + +impl PrepareError { + /// Returns whether this is a deterministic error, i.e. one that should trigger reliably. Those + /// errors depend on the PVF itself and the sc-executor/wasmtime logic. + /// + /// Non-deterministic errors can happen spuriously. Typically, they occur due to resource + /// starvation, e.g. under heavy load or memory pressure. Those errors are typically transient + /// but may persist e.g. if the node is run by overwhelmingly underpowered machine. + pub fn is_deterministic(&self) -> bool { + use PrepareError::*; + match self { + Prevalidation(_) | Preparation(_) | Panic(_) => true, + TimedOut | IoErr(_) | CreateTmpFileErr(_) | RenameTmpFileErr(_) => false, + } + } +} + +impl fmt::Display for PrepareError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + use PrepareError::*; + match self { + Prevalidation(err) => write!(f, "prevalidation: {}", err), + Preparation(err) => write!(f, "preparation: {}", err), + Panic(err) => write!(f, "panic: {}", err), + TimedOut => write!(f, "prepare: timeout"), + IoErr(err) => write!(f, "prepare: io error while receiving response: {}", err), + CreateTmpFileErr(err) => write!(f, "prepare: error creating tmp file: {}", err), + RenameTmpFileErr(err) => write!(f, "prepare: error renaming tmp file: {}", err), + } + } +} + +/// Some internal error occurred. +/// +/// Should only ever be used for validation errors independent of the candidate and PVF, or for errors we ruled out +/// during pre-checking (so preparation errors are fine). +#[derive(Debug, Clone, Encode, Decode)] +pub enum InternalValidationError { + /// Some communication error occurred with the host. + HostCommunication(String), + /// Could not find or open compiled artifact file. + CouldNotOpenFile(String), + /// An error occurred in the CPU time monitor thread. Should be totally unrelated to validation. + CpuTimeMonitorThread(String), + /// Some non-deterministic preparation error occurred. + NonDeterministicPrepareError(PrepareError), +} + +impl fmt::Display for InternalValidationError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + use InternalValidationError::*; + match self { + HostCommunication(err) => + write!(f, "validation: some communication error occurred with the host: {}", err), + CouldNotOpenFile(err) => + write!(f, "validation: could not find or open compiled artifact file: {}", err), + CpuTimeMonitorThread(err) => + write!(f, "validation: an error occurred in the CPU time monitor thread: {}", err), + NonDeterministicPrepareError(err) => write!(f, "validation: prepare: {}", err), + } + } +} diff --git a/node/core/pvf/common/src/execute.rs b/node/core/pvf/common/src/execute.rs new file mode 100644 index 000000000000..de5ce39f7838 --- /dev/null +++ b/node/core/pvf/common/src/execute.rs @@ -0,0 +1,60 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot 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. + +// Polkadot 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 Polkadot. If not, see . + +use crate::error::InternalValidationError; +use parity_scale_codec::{Decode, Encode}; +use polkadot_parachain::primitives::ValidationResult; +use polkadot_primitives::ExecutorParams; +use std::time::Duration; + +/// The payload of the one-time handshake that is done when a worker process is created. Carries +/// data from the host to the worker. +#[derive(Encode, Decode)] +pub struct Handshake { + /// The executor parameters. + pub executor_params: ExecutorParams, +} + +/// The response from an execution job on the worker. +#[derive(Encode, Decode)] +pub enum Response { + /// The job completed successfully. + Ok { + /// The result of parachain validation. + result_descriptor: ValidationResult, + /// The amount of CPU time taken by the job. + duration: Duration, + }, + /// The candidate is invalid. + InvalidCandidate(String), + /// The job timed out. + TimedOut, + /// An unexpected panic has occurred in the execution worker. + Panic(String), + /// Some internal error occurred. + InternalError(InternalValidationError), +} + +impl Response { + /// Creates an invalid response from a context `ctx` and a message `msg` (which can be empty). + pub fn format_invalid(ctx: &'static str, msg: &str) -> Self { + if msg.is_empty() { + Self::InvalidCandidate(ctx.to_string()) + } else { + Self::InvalidCandidate(format!("{}: {}", ctx, msg)) + } + } +} diff --git a/node/core/pvf/common/src/executor_intf.rs b/node/core/pvf/common/src/executor_intf.rs new file mode 100644 index 000000000000..5926f3c5dbc7 --- /dev/null +++ b/node/core/pvf/common/src/executor_intf.rs @@ -0,0 +1,114 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot 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. + +// Polkadot 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 Polkadot. If not, see . + +//! Interface to the Substrate Executor + +use polkadot_primitives::{ExecutorParam, ExecutorParams}; +use sc_executor_common::wasm_runtime::HeapAllocStrategy; +use sc_executor_wasmtime::{Config, DeterministicStackLimit, Semantics}; + +// Memory configuration +// +// When Substrate Runtime is instantiated, a number of WASM pages are allocated for the Substrate +// Runtime instance's linear memory. The exact number of pages is a sum of whatever the WASM blob +// itself requests (by default at least enough to hold the data section as well as have some space +// left for the stack; this is, of course, overridable at link time when compiling the runtime) +// plus the number of pages specified in the `extra_heap_pages` passed to the executor. +// +// By default, rustc (or `lld` specifically) should allocate 1 MiB for the shadow stack, or 16 pages. +// The data section for runtimes are typically rather small and can fit in a single digit number of +// WASM pages, so let's say an extra 16 pages. Thus let's assume that 32 pages or 2 MiB are used for +// these needs by default. +const DEFAULT_HEAP_PAGES_ESTIMATE: u32 = 32; +const EXTRA_HEAP_PAGES: u32 = 2048; + +/// The number of bytes devoted for the stack during wasm execution of a PVF. +pub const NATIVE_STACK_MAX: u32 = 256 * 1024 * 1024; + +// VALUES OF THE DEFAULT CONFIGURATION SHOULD NEVER BE CHANGED +// They are used as base values for the execution environment parametrization. +// To overwrite them, add new ones to `EXECUTOR_PARAMS` in the `session_info` pallet and perform +// a runtime upgrade to make them active. +pub const DEFAULT_CONFIG: Config = Config { + allow_missing_func_imports: true, + cache_path: None, + semantics: Semantics { + heap_alloc_strategy: sc_executor_common::wasm_runtime::HeapAllocStrategy::Dynamic { + maximum_pages: Some(DEFAULT_HEAP_PAGES_ESTIMATE + EXTRA_HEAP_PAGES), + }, + + instantiation_strategy: + sc_executor_wasmtime::InstantiationStrategy::RecreateInstanceCopyOnWrite, + + // Enable deterministic stack limit to pin down the exact number of items the wasmtime stack + // can contain before it traps with stack overflow. + // + // Here is how the values below were chosen. + // + // At the moment of writing, the default native stack size limit is 1 MiB. Assuming a logical item + // (see the docs about the field and the instrumentation algorithm) is 8 bytes, 1 MiB can + // fit 2x 65536 logical items. + // + // Since reaching the native stack limit is undesirable, we halve the logical item limit and + // also increase the native 256x. This hopefully should preclude wasm code from reaching + // the stack limit set by the wasmtime. + deterministic_stack_limit: Some(DeterministicStackLimit { + logical_max: 65536, + native_stack_max: NATIVE_STACK_MAX, + }), + canonicalize_nans: true, + // Rationale for turning the multi-threaded compilation off is to make the preparation time + // easily reproducible and as deterministic as possible. + // + // Currently the prepare queue doesn't distinguish between precheck and prepare requests. + // On the one hand, it simplifies the code, on the other, however, slows down compile times + // for execute requests. This behavior may change in future. + parallel_compilation: false, + + // WASM extensions. Only those that are meaningful to us may be controlled here. By default, + // we're using WASM MVP, which means all the extensions are disabled. Nevertheless, some + // extensions (e.g., sign extension ops) are enabled by Wasmtime and cannot be disabled. + wasm_reference_types: false, + wasm_simd: false, + wasm_bulk_memory: false, + wasm_multi_value: false, + }, +}; + +pub fn params_to_wasmtime_semantics(par: &ExecutorParams) -> Result { + let mut sem = DEFAULT_CONFIG.semantics.clone(); + let mut stack_limit = if let Some(stack_limit) = sem.deterministic_stack_limit.clone() { + stack_limit + } else { + return Err("No default stack limit set".to_owned()) + }; + + for p in par.iter() { + match p { + ExecutorParam::MaxMemoryPages(max_pages) => + sem.heap_alloc_strategy = + HeapAllocStrategy::Dynamic { maximum_pages: Some(*max_pages) }, + ExecutorParam::StackLogicalMax(slm) => stack_limit.logical_max = *slm, + ExecutorParam::StackNativeMax(snm) => stack_limit.native_stack_max = *snm, + ExecutorParam::WasmExtBulkMemory => sem.wasm_bulk_memory = true, + // TODO: Not implemented yet; . + ExecutorParam::PrecheckingMaxMemory(_) => (), + ExecutorParam::PvfPrepTimeout(_, _) | ExecutorParam::PvfExecTimeout(_, _) => (), // Not used here + } + } + sem.deterministic_stack_limit = Some(stack_limit); + Ok(sem) +} diff --git a/node/core/pvf/common/src/lib.rs b/node/core/pvf/common/src/lib.rs new file mode 100644 index 000000000000..028fd9b17947 --- /dev/null +++ b/node/core/pvf/common/src/lib.rs @@ -0,0 +1,57 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot 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. + +// Polkadot 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 Polkadot. If not, see . + +//! Functionality that is shared by the host and the workers. + +pub mod error; +pub mod execute; +pub mod executor_intf; +pub mod prepare; +pub mod pvf; +pub mod worker; + +pub use cpu_time::ProcessTime; + +const LOG_TARGET: &str = "parachain::pvf-common"; + +use std::mem; +use tokio::io::{self, AsyncRead, AsyncReadExt as _, AsyncWrite, AsyncWriteExt as _}; + +#[doc(hidden)] +pub mod tests { + use std::time::Duration; + + pub const TEST_EXECUTION_TIMEOUT: Duration = Duration::from_secs(3); + pub const TEST_PREPARATION_TIMEOUT: Duration = Duration::from_secs(30); +} + +/// Write some data prefixed by its length into `w`. +pub async fn framed_send(w: &mut (impl AsyncWrite + Unpin), buf: &[u8]) -> io::Result<()> { + let len_buf = buf.len().to_le_bytes(); + w.write_all(&len_buf).await?; + w.write_all(buf).await?; + Ok(()) +} + +/// Read some data prefixed by its length from `r`. +pub async fn framed_recv(r: &mut (impl AsyncRead + Unpin)) -> io::Result> { + let mut len_buf = [0u8; mem::size_of::()]; + r.read_exact(&mut len_buf).await?; + let len = usize::from_le_bytes(len_buf); + let mut buf = vec![0; len]; + r.read_exact(&mut buf).await?; + Ok(buf) +} diff --git a/node/core/pvf/common/src/prepare.rs b/node/core/pvf/common/src/prepare.rs new file mode 100644 index 000000000000..ac64e2927a16 --- /dev/null +++ b/node/core/pvf/common/src/prepare.rs @@ -0,0 +1,48 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot 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. + +// Polkadot 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 Polkadot. If not, see . + +use parity_scale_codec::{Decode, Encode}; + +/// Preparation statistics, including the CPU time and memory taken. +#[derive(Debug, Clone, Default, Encode, Decode)] +pub struct PrepareStats { + /// The CPU time that elapsed for the preparation job. + pub cpu_time_elapsed: std::time::Duration, + /// The observed memory statistics for the preparation job. + pub memory_stats: MemoryStats, +} + +/// Helper struct to contain all the memory stats, including `MemoryAllocationStats` and, if +/// supported by the OS, `ru_maxrss`. +#[derive(Clone, Debug, Default, Encode, Decode)] +pub struct MemoryStats { + /// Memory stats from `tikv_jemalloc_ctl`. + #[cfg(any(target_os = "linux", feature = "jemalloc-allocator"))] + pub memory_tracker_stats: Option, + /// `ru_maxrss` from `getrusage`. `None` if an error occurred. + #[cfg(target_os = "linux")] + pub max_rss: Option, +} + +/// Statistics of collected memory metrics. +#[cfg(any(target_os = "linux", feature = "jemalloc-allocator"))] +#[derive(Clone, Debug, Default, Encode, Decode)] +pub struct MemoryAllocationStats { + /// Total resident memory, in bytes. + pub resident: u64, + /// Total allocated memory, in bytes. + pub allocated: u64, +} diff --git a/node/core/pvf/src/pvf.rs b/node/core/pvf/common/src/pvf.rs similarity index 81% rename from node/core/pvf/src/pvf.rs rename to node/core/pvf/common/src/pvf.rs index c134cacb4acf..1661f324083a 100644 --- a/node/core/pvf/src/pvf.rs +++ b/node/core/pvf/common/src/pvf.rs @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use crate::artifacts::ArtifactId; use parity_scale_codec::{Decode, Encode}; use polkadot_parachain::primitives::ValidationCodeHash; use polkadot_primitives::ExecutorParams; @@ -26,9 +25,6 @@ use std::{ time::Duration, }; -#[cfg(test)] -use crate::host::tests::TEST_PREPARATION_TIMEOUT; - /// A struct that carries the exhaustive set of data to prepare an artifact out of plain /// Wasm binary /// @@ -58,13 +54,8 @@ impl PvfPrepData { Self { code, code_hash, executor_params, prep_timeout } } - /// Returns artifact ID that corresponds to the PVF with given executor params - pub(crate) fn as_artifact_id(&self) -> ArtifactId { - ArtifactId::new(self.code_hash, self.executor_params.hash()) - } - /// Returns validation code hash for the PVF - pub(crate) fn code_hash(&self) -> ValidationCodeHash { + pub fn code_hash(&self) -> ValidationCodeHash { self.code_hash } @@ -83,16 +74,17 @@ impl PvfPrepData { self.prep_timeout } - /// Creates a structure for tests - #[cfg(test)] - pub(crate) fn from_discriminator_and_timeout(num: u32, timeout: Duration) -> Self { + /// Creates a structure for tests. + #[doc(hidden)] + pub fn from_discriminator_and_timeout(num: u32, timeout: Duration) -> Self { let descriminator_buf = num.to_le_bytes().to_vec(); Self::from_code(descriminator_buf, ExecutorParams::default(), timeout) } - #[cfg(test)] - pub(crate) fn from_discriminator(num: u32) -> Self { - Self::from_discriminator_and_timeout(num, TEST_PREPARATION_TIMEOUT) + /// Creates a structure for tests. + #[doc(hidden)] + pub fn from_discriminator(num: u32) -> Self { + Self::from_discriminator_and_timeout(num, crate::tests::TEST_PREPARATION_TIMEOUT) } } diff --git a/node/core/pvf/worker/src/common.rs b/node/core/pvf/common/src/worker.rs similarity index 90% rename from node/core/pvf/worker/src/common.rs rename to node/core/pvf/common/src/worker.rs index 00289737a5c8..debe18985b37 100644 --- a/node/core/pvf/worker/src/common.rs +++ b/node/core/pvf/common/src/worker.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . +//! Functionality common to both prepare and execute workers. + use crate::LOG_TARGET; use cpu_time::ProcessTime; use futures::never::Never; @@ -25,6 +27,42 @@ use std::{ }; use tokio::{io, net::UnixStream, runtime::Runtime}; +/// Use this macro to declare a `fn main() {}` that will create an executable that can be used for +/// spawning the desired worker. +#[macro_export] +macro_rules! decl_worker_main { + ($expected_command:expr, $entrypoint:expr) => { + fn main() { + ::sp_tracing::try_init_simple(); + + let args = std::env::args().collect::>(); + if args.len() < 3 { + panic!("wrong number of arguments"); + } + + let mut version = None; + let mut socket_path: &str = ""; + + for i in 2..args.len() { + match args[i].as_ref() { + "--socket-path" => socket_path = args[i + 1].as_str(), + "--node-version" => version = Some(args[i + 1].as_str()), + _ => (), + } + } + + let subcommand = &args[1]; + if subcommand != $expected_command { + panic!( + "trying to run {} binary with the {} subcommand", + $expected_command, subcommand + ) + } + $entrypoint(&socket_path, version); + } + }; +} + /// Some allowed overhead that we account for in the "CPU time monitor" thread's sleeps, on the /// child process. pub const JOB_TIMEOUT_OVERHEAD: Duration = Duration::from_millis(50); diff --git a/node/core/pvf/worker/Cargo.toml b/node/core/pvf/execute-worker/Cargo.toml similarity index 67% rename from node/core/pvf/worker/Cargo.toml rename to node/core/pvf/execute-worker/Cargo.toml index 53d548dbac6f..c360cee8bf5d 100644 --- a/node/core/pvf/worker/Cargo.toml +++ b/node/core/pvf/execute-worker/Cargo.toml @@ -1,27 +1,20 @@ [package] -name = "polkadot-node-core-pvf-worker" +name = "polkadot-node-core-pvf-execute-worker" version.workspace = true authors.workspace = true edition.workspace = true -[[bin]] -name = "puppet_worker" -path = "bin/puppet_worker.rs" - [dependencies] -assert_matches = "1.4.0" cpu-time = "1.0.0" futures = "0.3.21" gum = { package = "tracing-gum", path = "../../../gum" } -libc = "0.2.139" rayon = "1.5.1" -tempfile = "3.3.0" tikv-jemalloc-ctl = { version = "0.5.0", optional = true } -tokio = "1.24.2" +tokio = { version = "1.24.2", features = ["fs", "process"] } parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } -polkadot-node-core-pvf = { path = ".." } +polkadot-node-core-pvf-common = { path = "../common" } polkadot-parachain = { path = "../../../../parachain" } polkadot-primitives = { path = "../../../../primitives" } @@ -37,12 +30,5 @@ sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master [target.'cfg(target_os = "linux")'.dependencies] tikv-jemalloc-ctl = "0.5.0" -[build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } - -[dev-dependencies] -adder = { package = "test-parachain-adder", path = "../../../../parachain/test-parachains/adder" } -halt = { package = "test-parachain-halt", path = "../../../../parachain/test-parachains/halt" } - [features] -jemalloc-allocator = ["dep:tikv-jemalloc-ctl"] +builder = [] diff --git a/node/core/pvf/worker/src/executor_intf.rs b/node/core/pvf/execute-worker/src/executor_intf.rs similarity index 65% rename from node/core/pvf/worker/src/executor_intf.rs rename to node/core/pvf/execute-worker/src/executor_intf.rs index ff286dd74d64..98424a3dcd1d 100644 --- a/node/core/pvf/worker/src/executor_intf.rs +++ b/node/core/pvf/execute-worker/src/executor_intf.rs @@ -16,13 +16,16 @@ //! Interface to the Substrate Executor -use polkadot_primitives::{ExecutorParam, ExecutorParams}; +use polkadot_node_core_pvf_common::executor_intf::{ + params_to_wasmtime_semantics, DEFAULT_CONFIG, NATIVE_STACK_MAX, +}; +use polkadot_primitives::ExecutorParams; use sc_executor_common::{ error::WasmError, runtime_blob::RuntimeBlob, - wasm_runtime::{HeapAllocStrategy, InvokeMethod, WasmModule as _}, + wasm_runtime::{InvokeMethod, WasmModule as _}, }; -use sc_executor_wasmtime::{Config, DeterministicStackLimit, Semantics, WasmtimeRuntime}; +use sc_executor_wasmtime::{Config, WasmtimeRuntime}; use sp_core::storage::{ChildInfo, TrackedStorageKey}; use sp_externalities::MultiRemovalResults; use std::any::{Any, TypeId}; @@ -63,119 +66,6 @@ use std::any::{Any, TypeId}; /// The stack size for the execute thread. pub const EXECUTE_THREAD_STACK_SIZE: usize = 2 * 1024 * 1024 + NATIVE_STACK_MAX as usize; -// Memory configuration -// -// When Substrate Runtime is instantiated, a number of WASM pages are allocated for the Substrate -// Runtime instance's linear memory. The exact number of pages is a sum of whatever the WASM blob -// itself requests (by default at least enough to hold the data section as well as have some space -// left for the stack; this is, of course, overridable at link time when compiling the runtime) -// plus the number of pages specified in the `extra_heap_pages` passed to the executor. -// -// By default, rustc (or `lld` specifically) should allocate 1 MiB for the shadow stack, or 16 pages. -// The data section for runtimes are typically rather small and can fit in a single digit number of -// WASM pages, so let's say an extra 16 pages. Thus let's assume that 32 pages or 2 MiB are used for -// these needs by default. -const DEFAULT_HEAP_PAGES_ESTIMATE: u32 = 32; -const EXTRA_HEAP_PAGES: u32 = 2048; - -/// The number of bytes devoted for the stack during wasm execution of a PVF. -const NATIVE_STACK_MAX: u32 = 256 * 1024 * 1024; - -// VALUES OF THE DEFAULT CONFIGURATION SHOULD NEVER BE CHANGED -// They are used as base values for the execution environment parametrization. -// To overwrite them, add new ones to `EXECUTOR_PARAMS` in the `session_info` pallet and perform -// a runtime upgrade to make them active. -const DEFAULT_CONFIG: Config = Config { - allow_missing_func_imports: true, - cache_path: None, - semantics: Semantics { - heap_alloc_strategy: sc_executor_common::wasm_runtime::HeapAllocStrategy::Dynamic { - maximum_pages: Some(DEFAULT_HEAP_PAGES_ESTIMATE + EXTRA_HEAP_PAGES), - }, - - instantiation_strategy: - sc_executor_wasmtime::InstantiationStrategy::RecreateInstanceCopyOnWrite, - - // Enable deterministic stack limit to pin down the exact number of items the wasmtime stack - // can contain before it traps with stack overflow. - // - // Here is how the values below were chosen. - // - // At the moment of writing, the default native stack size limit is 1 MiB. Assuming a logical item - // (see the docs about the field and the instrumentation algorithm) is 8 bytes, 1 MiB can - // fit 2x 65536 logical items. - // - // Since reaching the native stack limit is undesirable, we halve the logical item limit and - // also increase the native 256x. This hopefully should preclude wasm code from reaching - // the stack limit set by the wasmtime. - deterministic_stack_limit: Some(DeterministicStackLimit { - logical_max: 65536, - native_stack_max: NATIVE_STACK_MAX, - }), - canonicalize_nans: true, - // Rationale for turning the multi-threaded compilation off is to make the preparation time - // easily reproducible and as deterministic as possible. - // - // Currently the prepare queue doesn't distinguish between precheck and prepare requests. - // On the one hand, it simplifies the code, on the other, however, slows down compile times - // for execute requests. This behavior may change in future. - parallel_compilation: false, - - // WASM extensions. Only those that are meaningful to us may be controlled here. By default, - // we're using WASM MVP, which means all the extensions are disabled. Nevertheless, some - // extensions (e.g., sign extension ops) are enabled by Wasmtime and cannot be disabled. - wasm_reference_types: false, - wasm_simd: false, - wasm_bulk_memory: false, - wasm_multi_value: false, - }, -}; - -/// Runs the prevalidation on the given code. Returns a [`RuntimeBlob`] if it succeeds. -pub fn prevalidate(code: &[u8]) -> Result { - let blob = RuntimeBlob::new(code)?; - // It's assumed this function will take care of any prevalidation logic - // that needs to be done. - // - // Do nothing for now. - Ok(blob) -} - -/// Runs preparation on the given runtime blob. If successful, it returns a serialized compiled -/// artifact which can then be used to pass into `Executor::execute` after writing it to the disk. -pub fn prepare( - blob: RuntimeBlob, - executor_params: &ExecutorParams, -) -> Result, sc_executor_common::error::WasmError> { - let semantics = params_to_wasmtime_semantics(executor_params) - .map_err(|e| sc_executor_common::error::WasmError::Other(e))?; - sc_executor_wasmtime::prepare_runtime_artifact(blob, &semantics) -} - -fn params_to_wasmtime_semantics(par: &ExecutorParams) -> Result { - let mut sem = DEFAULT_CONFIG.semantics.clone(); - let mut stack_limit = if let Some(stack_limit) = sem.deterministic_stack_limit.clone() { - stack_limit - } else { - return Err("No default stack limit set".to_owned()) - }; - - for p in par.iter() { - match p { - ExecutorParam::MaxMemoryPages(max_pages) => - sem.heap_alloc_strategy = - HeapAllocStrategy::Dynamic { maximum_pages: Some(*max_pages) }, - ExecutorParam::StackLogicalMax(slm) => stack_limit.logical_max = *slm, - ExecutorParam::StackNativeMax(snm) => stack_limit.native_stack_max = *snm, - ExecutorParam::WasmExtBulkMemory => sem.wasm_bulk_memory = true, - ExecutorParam::PrecheckingMaxMemory(_) => (), // TODO: Not implemented yet - ExecutorParam::PvfPrepTimeout(_, _) | ExecutorParam::PvfExecTimeout(_, _) => (), // Not used here - } - } - sem.deterministic_stack_limit = Some(stack_limit); - Ok(sem) -} - #[derive(Clone)] pub struct Executor { config: Config, diff --git a/node/core/pvf/worker/src/execute.rs b/node/core/pvf/execute-worker/src/lib.rs similarity index 93% rename from node/core/pvf/worker/src/execute.rs rename to node/core/pvf/execute-worker/src/lib.rs index c5b8ddc9dd18..0ac39aafb0c9 100644 --- a/node/core/pvf/worker/src/execute.rs +++ b/node/core/pvf/execute-worker/src/lib.rs @@ -14,20 +14,26 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use crate::{ - common::{ +mod executor_intf; + +pub use executor_intf::Executor; + +// NOTE: Initializing logging in e.g. tests will not have an effect in the workers, as they are +// separate spawned processes. Run with e.g. `RUST_LOG=parachain::pvf-execute-worker=trace`. +const LOG_TARGET: &str = "parachain::pvf-execute-worker"; + +use crate::executor_intf::EXECUTE_THREAD_STACK_SIZE; +use cpu_time::ProcessTime; +use parity_scale_codec::{Decode, Encode}; +use polkadot_node_core_pvf_common::{ + error::InternalValidationError, + execute::{Handshake, Response}, + framed_recv, framed_send, + worker::{ bytes_to_path, cpu_time_monitor_loop, stringify_panic_payload, thread::{self, WaitOutcome}, worker_event_loop, }, - executor_intf::{Executor, EXECUTE_THREAD_STACK_SIZE}, - LOG_TARGET, -}; -use cpu_time::ProcessTime; -use parity_scale_codec::{Decode, Encode}; -use polkadot_node_core_pvf::{ - framed_recv, framed_send, ExecuteHandshake as Handshake, ExecuteResponse as Response, - InternalValidationError, }; use polkadot_parachain::primitives::ValidationResult; use std::{ diff --git a/node/core/pvf/prepare-worker/Cargo.toml b/node/core/pvf/prepare-worker/Cargo.toml new file mode 100644 index 000000000000..07386de35962 --- /dev/null +++ b/node/core/pvf/prepare-worker/Cargo.toml @@ -0,0 +1,33 @@ +[package] +name = "polkadot-node-core-pvf-prepare-worker" +version.workspace = true +authors.workspace = true +edition.workspace = true + +[dependencies] +futures = "0.3.21" +gum = { package = "tracing-gum", path = "../../../gum" } +libc = "0.2.139" +rayon = "1.5.1" +tikv-jemalloc-ctl = { version = "0.5.0", optional = true } +tokio = { version = "1.24.2", features = ["fs", "process"] } + +parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] } + +polkadot-node-core-pvf-common = { path = "../common" } +polkadot-parachain = { path = "../../../../parachain" } +polkadot-primitives = { path = "../../../../primitives" } + +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-executor-common = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-executor-wasmtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } + +[target.'cfg(target_os = "linux")'.dependencies] +tikv-jemalloc-ctl = "0.5.0" + +[features] +builder = [] +jemalloc-allocator = ["dep:tikv-jemalloc-ctl"] diff --git a/node/core/pvf/prepare-worker/src/executor_intf.rs b/node/core/pvf/prepare-worker/src/executor_intf.rs new file mode 100644 index 000000000000..1f88f6a6dd6e --- /dev/null +++ b/node/core/pvf/prepare-worker/src/executor_intf.rs @@ -0,0 +1,42 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot 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. + +// Polkadot 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 Polkadot. If not, see . + +//! Interface to the Substrate Executor + +use polkadot_node_core_pvf_common::executor_intf::params_to_wasmtime_semantics; +use polkadot_primitives::ExecutorParams; +use sc_executor_common::runtime_blob::RuntimeBlob; + +/// Runs the prevalidation on the given code. Returns a [`RuntimeBlob`] if it succeeds. +pub fn prevalidate(code: &[u8]) -> Result { + let blob = RuntimeBlob::new(code)?; + // It's assumed this function will take care of any prevalidation logic + // that needs to be done. + // + // Do nothing for now. + Ok(blob) +} + +/// Runs preparation on the given runtime blob. If successful, it returns a serialized compiled +/// artifact which can then be used to pass into `Executor::execute` after writing it to the disk. +pub fn prepare( + blob: RuntimeBlob, + executor_params: &ExecutorParams, +) -> Result, sc_executor_common::error::WasmError> { + let semantics = params_to_wasmtime_semantics(executor_params) + .map_err(|e| sc_executor_common::error::WasmError::Other(e))?; + sc_executor_wasmtime::prepare_runtime_artifact(blob, &semantics) +} diff --git a/node/core/pvf/worker/src/prepare.rs b/node/core/pvf/prepare-worker/src/lib.rs similarity index 90% rename from node/core/pvf/worker/src/prepare.rs rename to node/core/pvf/prepare-worker/src/lib.rs index fe9c1a85545a..8f36ef397cfb 100644 --- a/node/core/pvf/worker/src/prepare.rs +++ b/node/core/pvf/prepare-worker/src/lib.rs @@ -14,23 +14,31 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . +mod executor_intf; +mod memory_stats; + +pub use executor_intf::{prepare, prevalidate}; + +// NOTE: Initializing logging in e.g. tests will not have an effect in the workers, as they are +// separate spawned processes. Run with e.g. `RUST_LOG=parachain::pvf-prepare-worker=trace`. +const LOG_TARGET: &str = "parachain::pvf-prepare-worker"; + #[cfg(target_os = "linux")] use crate::memory_stats::max_rss_stat::{extract_max_rss_stat, get_max_rss_thread}; #[cfg(any(target_os = "linux", feature = "jemalloc-allocator"))] use crate::memory_stats::memory_tracker::{get_memory_tracker_loop_stats, memory_tracker_loop}; -use crate::{ - common::{ +use parity_scale_codec::{Decode, Encode}; +use polkadot_node_core_pvf_common::{ + error::{PrepareError, PrepareResult}, + framed_recv, framed_send, + prepare::{MemoryStats, PrepareStats}, + pvf::PvfPrepData, + worker::{ bytes_to_path, cpu_time_monitor_loop, stringify_panic_payload, thread::{self, WaitOutcome}, worker_event_loop, }, - prepare, prevalidate, LOG_TARGET, -}; -use cpu_time::ProcessTime; -use parity_scale_codec::{Decode, Encode}; -use polkadot_node_core_pvf::{ - framed_recv, framed_send, CompiledArtifact, MemoryStats, PrepareError, PrepareResult, - PrepareStats, PvfPrepData, + ProcessTime, }; use std::{ path::PathBuf, @@ -39,6 +47,22 @@ use std::{ }; use tokio::{io, net::UnixStream}; +/// Contains the bytes for a successfully compiled artifact. +pub struct CompiledArtifact(Vec); + +impl CompiledArtifact { + /// Creates a `CompiledArtifact`. + pub fn new(code: Vec) -> Self { + Self(code) + } +} + +impl AsRef<[u8]> for CompiledArtifact { + fn as_ref(&self) -> &[u8] { + self.0.as_slice() + } +} + async fn recv_request(stream: &mut UnixStream) -> io::Result<(PvfPrepData, PathBuf)> { let pvf = framed_recv(stream).await?; let pvf = PvfPrepData::decode(&mut &pvf[..]).map_err(|e| { diff --git a/node/core/pvf/worker/src/memory_stats.rs b/node/core/pvf/prepare-worker/src/memory_stats.rs similarity index 97% rename from node/core/pvf/worker/src/memory_stats.rs rename to node/core/pvf/prepare-worker/src/memory_stats.rs index 907f793d87af..e6dc8572c4a3 100644 --- a/node/core/pvf/worker/src/memory_stats.rs +++ b/node/core/pvf/prepare-worker/src/memory_stats.rs @@ -33,11 +33,11 @@ /// NOTE: Requires jemalloc enabled. #[cfg(any(target_os = "linux", feature = "jemalloc-allocator"))] pub mod memory_tracker { - use crate::{ - common::{stringify_panic_payload, thread}, - LOG_TARGET, + use crate::LOG_TARGET; + use polkadot_node_core_pvf_common::{ + prepare::MemoryAllocationStats, + worker::{stringify_panic_payload, thread}, }; - use polkadot_node_core_pvf::MemoryAllocationStats; use std::{thread::JoinHandle, time::Duration}; use tikv_jemalloc_ctl::{epoch, stats, Error}; diff --git a/node/core/pvf/src/artifacts.rs b/node/core/pvf/src/artifacts.rs index d5a660cc3aa5..78d2f88941b8 100644 --- a/node/core/pvf/src/artifacts.rs +++ b/node/core/pvf/src/artifacts.rs @@ -55,8 +55,9 @@ //! older by a predefined parameter. This process is run very rarely (say, once a day). Once the //! artifact is expired it is removed from disk eagerly atomically. -use crate::{error::PrepareError, host::PrepareResultSender, prepare::PrepareStats}; +use crate::host::PrepareResultSender; use always_assert::always; +use polkadot_node_core_pvf_common::{error::PrepareError, prepare::PrepareStats, pvf::PvfPrepData}; use polkadot_parachain::primitives::ValidationCodeHash; use polkadot_primitives::ExecutorParamsHash; use std::{ @@ -65,22 +66,6 @@ use std::{ time::{Duration, SystemTime}, }; -/// Contains the bytes for a successfully compiled artifact. -pub struct CompiledArtifact(Vec); - -impl CompiledArtifact { - /// Creates a `CompiledArtifact`. - pub fn new(code: Vec) -> Self { - Self(code) - } -} - -impl AsRef<[u8]> for CompiledArtifact { - fn as_ref(&self) -> &[u8] { - self.0.as_slice() - } -} - /// Identifier of an artifact. Encodes a code hash of the PVF and a hash of executor parameter set. #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct ArtifactId { @@ -96,6 +81,11 @@ impl ArtifactId { Self { code_hash, executor_params_hash } } + /// Returns an artifact ID that corresponds to the PVF with given executor params. + pub fn from_pvf_prep_data(pvf: &PvfPrepData) -> Self { + Self::new(pvf.code_hash(), pvf.executor_params().hash()) + } + /// Tries to recover the artifact id from the given file name. #[cfg(test)] pub fn from_file_name(file_name: &str) -> Option { @@ -304,7 +294,7 @@ mod tests { #[tokio::test] async fn artifacts_removes_cache_on_startup() { - let fake_cache_path = crate::worker_common::tmpfile("test-cache").await.unwrap(); + let fake_cache_path = crate::worker_intf::tmpfile("test-cache").await.unwrap(); let fake_artifact_path = { let mut p = fake_cache_path.clone(); p.push("wasmtime_0x1234567890123456789012345678901234567890123456789012345678901234"); diff --git a/node/core/pvf/src/error.rs b/node/core/pvf/src/error.rs index 33f3f00810f2..7372cd233c49 100644 --- a/node/core/pvf/src/error.rs +++ b/node/core/pvf/src/error.rs @@ -14,65 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use crate::prepare::PrepareStats; -use parity_scale_codec::{Decode, Encode}; -use std::fmt; - -/// Result of PVF preparation performed by the validation host. Contains stats about the preparation if -/// successful -pub type PrepareResult = Result; - -/// An error that occurred during the prepare part of the PVF pipeline. -#[derive(Debug, Clone, Encode, Decode)] -pub enum PrepareError { - /// During the prevalidation stage of preparation an issue was found with the PVF. - Prevalidation(String), - /// Compilation failed for the given PVF. - Preparation(String), - /// An unexpected panic has occurred in the preparation worker. - Panic(String), - /// Failed to prepare the PVF due to the time limit. - TimedOut, - /// An IO error occurred. This state is reported by either the validation host or by the worker. - IoErr(String), - /// The temporary file for the artifact could not be created at the given cache path. This state is reported by the - /// validation host (not by the worker). - CreateTmpFileErr(String), - /// The response from the worker is received, but the file cannot be renamed (moved) to the final destination - /// location. This state is reported by the validation host (not by the worker). - RenameTmpFileErr(String), -} - -impl PrepareError { - /// Returns whether this is a deterministic error, i.e. one that should trigger reliably. Those - /// errors depend on the PVF itself and the sc-executor/wasmtime logic. - /// - /// Non-deterministic errors can happen spuriously. Typically, they occur due to resource - /// starvation, e.g. under heavy load or memory pressure. Those errors are typically transient - /// but may persist e.g. if the node is run by overwhelmingly underpowered machine. - pub fn is_deterministic(&self) -> bool { - use PrepareError::*; - match self { - Prevalidation(_) | Preparation(_) | Panic(_) => true, - TimedOut | IoErr(_) | CreateTmpFileErr(_) | RenameTmpFileErr(_) => false, - } - } -} - -impl fmt::Display for PrepareError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - use PrepareError::*; - match self { - Prevalidation(err) => write!(f, "prevalidation: {}", err), - Preparation(err) => write!(f, "preparation: {}", err), - Panic(err) => write!(f, "panic: {}", err), - TimedOut => write!(f, "prepare: timeout"), - IoErr(err) => write!(f, "prepare: io error while receiving response: {}", err), - CreateTmpFileErr(err) => write!(f, "prepare: error creating tmp file: {}", err), - RenameTmpFileErr(err) => write!(f, "prepare: error renaming tmp file: {}", err), - } - } -} +use polkadot_node_core_pvf_common::error::{InternalValidationError, PrepareError}; /// A error raised during validation of the candidate. #[derive(Debug, Clone)] @@ -122,37 +64,6 @@ pub enum InvalidCandidate { Panic(String), } -/// Some internal error occurred. -/// -/// Should only ever be used for validation errors independent of the candidate and PVF, or for errors we ruled out -/// during pre-checking (so preparation errors are fine). -#[derive(Debug, Clone, Encode, Decode)] -pub enum InternalValidationError { - /// Some communication error occurred with the host. - HostCommunication(String), - /// Could not find or open compiled artifact file. - CouldNotOpenFile(String), - /// An error occurred in the CPU time monitor thread. Should be totally unrelated to validation. - CpuTimeMonitorThread(String), - /// Some non-deterministic preparation error occurred. - NonDeterministicPrepareError(PrepareError), -} - -impl fmt::Display for InternalValidationError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - use InternalValidationError::*; - match self { - HostCommunication(err) => - write!(f, "validation: some communication error occurred with the host: {}", err), - CouldNotOpenFile(err) => - write!(f, "validation: could not find or open compiled artifact file: {}", err), - CpuTimeMonitorThread(err) => - write!(f, "validation: an error occurred in the CPU time monitor thread: {}", err), - NonDeterministicPrepareError(err) => write!(f, "validation: prepare: {}", err), - } - } -} - impl From for ValidationError { fn from(error: InternalValidationError) -> Self { Self::InternalError(error) diff --git a/node/core/pvf/src/execute/mod.rs b/node/core/pvf/src/execute/mod.rs index 8e3b17d71569..669b9dc04d7c 100644 --- a/node/core/pvf/src/execute/mod.rs +++ b/node/core/pvf/src/execute/mod.rs @@ -24,4 +24,3 @@ mod queue; mod worker_intf; pub use queue::{start, PendingExecutionRequest, ToQueue}; -pub use worker_intf::{Handshake as ExecuteHandshake, Response as ExecuteResponse}; diff --git a/node/core/pvf/src/execute/queue.rs b/node/core/pvf/src/execute/queue.rs index 61cebc5e2c46..395697616b36 100644 --- a/node/core/pvf/src/execute/queue.rs +++ b/node/core/pvf/src/execute/queue.rs @@ -21,7 +21,7 @@ use crate::{ artifacts::{ArtifactId, ArtifactPathId}, host::ResultSender, metrics::Metrics, - worker_common::{IdleWorker, WorkerHandle}, + worker_intf::{IdleWorker, WorkerHandle}, InvalidCandidate, ValidationError, LOG_TARGET, }; use futures::{ diff --git a/node/core/pvf/src/execute/worker_intf.rs b/node/core/pvf/src/execute/worker_intf.rs index 4c26aeb0260a..6e54e17e515a 100644 --- a/node/core/pvf/src/execute/worker_intf.rs +++ b/node/core/pvf/src/execute/worker_intf.rs @@ -18,17 +18,20 @@ use crate::{ artifacts::ArtifactPathId, - error::InternalValidationError, - worker_common::{ - framed_recv, framed_send, path_to_bytes, spawn_with_program_path, IdleWorker, SpawnErr, - WorkerHandle, JOB_TIMEOUT_WALL_CLOCK_FACTOR, + worker_intf::{ + path_to_bytes, spawn_with_program_path, IdleWorker, SpawnErr, WorkerHandle, + JOB_TIMEOUT_WALL_CLOCK_FACTOR, }, LOG_TARGET, }; use futures::FutureExt; use futures_timer::Delay; use parity_scale_codec::{Decode, Encode}; - +use polkadot_node_core_pvf_common::{ + error::InternalValidationError, + execute::{Handshake, Response}, + framed_recv, framed_send, +}; use polkadot_parachain::primitives::ValidationResult; use polkadot_primitives::ExecutorParams; use std::{path::Path, time::Duration}; @@ -208,42 +211,3 @@ async fn recv_response(stream: &mut UnixStream) -> io::Result { ) }) } - -/// The payload of the one-time handshake that is done when a worker process is created. Carries -/// data from the host to the worker. -#[derive(Encode, Decode)] -pub struct Handshake { - /// The executor parameters. - pub executor_params: ExecutorParams, -} - -/// The response from an execution job on the worker. -#[derive(Encode, Decode)] -pub enum Response { - /// The job completed successfully. - Ok { - /// The result of parachain validation. - result_descriptor: ValidationResult, - /// The amount of CPU time taken by the job. - duration: Duration, - }, - /// The candidate is invalid. - InvalidCandidate(String), - /// The job timed out. - TimedOut, - /// An unexpected panic has occurred in the execution worker. - Panic(String), - /// Some internal error occurred. - InternalError(InternalValidationError), -} - -impl Response { - /// Creates an invalid response from a context `ctx` and a message `msg` (which can be empty). - pub fn format_invalid(ctx: &'static str, msg: &str) -> Self { - if msg.is_empty() { - Self::InvalidCandidate(ctx.to_string()) - } else { - Self::InvalidCandidate(format!("{}: {}", ctx, msg)) - } - } -} diff --git a/node/core/pvf/src/host.rs b/node/core/pvf/src/host.rs index bfc775a32dee..67f4a66e9748 100644 --- a/node/core/pvf/src/host.rs +++ b/node/core/pvf/src/host.rs @@ -22,16 +22,19 @@ use crate::{ artifacts::{ArtifactId, ArtifactPathId, ArtifactState, Artifacts}, - error::PrepareError, execute::{self, PendingExecutionRequest}, metrics::Metrics, - prepare, PrepareResult, Priority, PvfPrepData, ValidationError, LOG_TARGET, + prepare, Priority, ValidationError, LOG_TARGET, }; use always_assert::never; use futures::{ channel::{mpsc, oneshot}, Future, FutureExt, SinkExt, StreamExt, }; +use polkadot_node_core_pvf_common::{ + error::{PrepareError, PrepareResult}, + pvf::PvfPrepData, +}; use polkadot_parachain::primitives::ValidationResult; use std::{ collections::HashMap, @@ -423,7 +426,7 @@ async fn handle_precheck_pvf( pvf: PvfPrepData, result_sender: PrepareResultSender, ) -> Result<(), Fatal> { - let artifact_id = pvf.as_artifact_id(); + let artifact_id = ArtifactId::from_pvf_prep_data(&pvf); if let Some(state) = artifacts.artifact_state_mut(&artifact_id) { match state { @@ -467,7 +470,7 @@ async fn handle_execute_pvf( inputs: ExecutePvfInputs, ) -> Result<(), Fatal> { let ExecutePvfInputs { pvf, exec_timeout, params, priority, result_tx } = inputs; - let artifact_id = pvf.as_artifact_id(); + let artifact_id = ArtifactId::from_pvf_prep_data(&pvf); let executor_params = (*pvf.executor_params()).clone(); if let Some(state) = artifacts.artifact_state_mut(&artifact_id) { @@ -590,7 +593,7 @@ async fn handle_heads_up( let now = SystemTime::now(); for active_pvf in active_pvfs { - let artifact_id = active_pvf.as_artifact_id(); + let artifact_id = ArtifactId::from_pvf_prep_data(&active_pvf); if let Some(state) = artifacts.artifact_state_mut(&artifact_id) { match state { ArtifactState::Prepared { last_time_needed, .. } => { @@ -854,9 +857,10 @@ fn pulse_every(interval: std::time::Duration) -> impl futures::Stream #[cfg(test)] pub(crate) mod tests { use super::*; - use crate::{prepare::PrepareStats, InvalidCandidate, PrepareError}; + use crate::InvalidCandidate; use assert_matches::assert_matches; use futures::future::BoxFuture; + use polkadot_node_core_pvf_common::{error::PrepareError, prepare::PrepareStats}; const TEST_EXECUTION_TIMEOUT: Duration = Duration::from_secs(3); pub(crate) const TEST_PREPARATION_TIMEOUT: Duration = Duration::from_secs(30); @@ -877,7 +881,7 @@ pub(crate) mod tests { /// Creates a new PVF which artifact id can be uniquely identified by the given number. fn artifact_id(descriminator: u32) -> ArtifactId { - PvfPrepData::from_discriminator(descriminator).as_artifact_id() + ArtifactId::from_pvf_prep_data(&PvfPrepData::from_discriminator(descriminator)) } fn artifact_path(descriminator: u32) -> PathBuf { diff --git a/node/core/pvf/src/lib.rs b/node/core/pvf/src/lib.rs index 9b302150fd36..d8b801292ca8 100644 --- a/node/core/pvf/src/lib.rs +++ b/node/core/pvf/src/lib.rs @@ -95,27 +95,31 @@ mod host; mod metrics; mod prepare; mod priority; -mod pvf; -mod worker_common; +mod worker_intf; -pub use artifacts::CompiledArtifact; -pub use error::{ - InternalValidationError, InvalidCandidate, PrepareError, PrepareResult, ValidationError, -}; -pub use execute::{ExecuteHandshake, ExecuteResponse}; -#[cfg(any(target_os = "linux", feature = "jemalloc-allocator"))] -pub use prepare::MemoryAllocationStats; -pub use prepare::{MemoryStats, PrepareStats}; -pub use priority::Priority; -pub use pvf::PvfPrepData; +#[doc(hidden)] +pub mod testing; + +// Used by `decl_puppet_worker_main!`. +#[doc(hidden)] +pub use sp_tracing; +pub use error::{InvalidCandidate, ValidationError}; pub use host::{start, Config, ValidationHost}; pub use metrics::Metrics; -pub use worker_common::{framed_recv, framed_send, JOB_TIMEOUT_WALL_CLOCK_FACTOR}; +pub use priority::Priority; +pub use worker_intf::{framed_recv, framed_send, JOB_TIMEOUT_WALL_CLOCK_FACTOR}; + +// Re-export some common types. +pub use polkadot_node_core_pvf_common::{ + error::{InternalValidationError, PrepareError}, + prepare::PrepareStats, + pvf::PvfPrepData, +}; -const LOG_TARGET: &str = "parachain::pvf"; +// Re-export worker entrypoints. +pub use polkadot_node_core_pvf_execute_worker::worker_entrypoint as execute_worker_entrypoint; +pub use polkadot_node_core_pvf_prepare_worker::worker_entrypoint as prepare_worker_entrypoint; -#[doc(hidden)] -pub mod testing { - pub use crate::worker_common::{spawn_with_program_path, SpawnErr}; -} +/// The log target for this crate. +pub const LOG_TARGET: &str = "parachain::pvf"; diff --git a/node/core/pvf/src/metrics.rs b/node/core/pvf/src/metrics.rs index 12bcd9eadad3..62f8c6dc5157 100644 --- a/node/core/pvf/src/metrics.rs +++ b/node/core/pvf/src/metrics.rs @@ -16,7 +16,7 @@ //! Prometheus metrics related to the validation host. -use crate::prepare::MemoryStats; +use polkadot_node_core_pvf_common::prepare::MemoryStats; use polkadot_node_metrics::metrics::{self, prometheus}; /// Validation host metrics. diff --git a/node/core/pvf/src/prepare/mod.rs b/node/core/pvf/src/prepare/mod.rs index de40c48464c4..580f67f73fa0 100644 --- a/node/core/pvf/src/prepare/mod.rs +++ b/node/core/pvf/src/prepare/mod.rs @@ -28,36 +28,3 @@ mod worker_intf; pub use pool::start as start_pool; pub use queue::{start as start_queue, FromQueue, ToQueue}; - -use parity_scale_codec::{Decode, Encode}; - -/// Preparation statistics, including the CPU time and memory taken. -#[derive(Debug, Clone, Default, Encode, Decode)] -pub struct PrepareStats { - /// The CPU time that elapsed for the preparation job. - pub cpu_time_elapsed: std::time::Duration, - /// The observed memory statistics for the preparation job. - pub memory_stats: MemoryStats, -} - -/// Helper struct to contain all the memory stats, including `MemoryAllocationStats` and, if -/// supported by the OS, `ru_maxrss`. -#[derive(Clone, Debug, Default, Encode, Decode)] -pub struct MemoryStats { - /// Memory stats from `tikv_jemalloc_ctl`. - #[cfg(any(target_os = "linux", feature = "jemalloc-allocator"))] - pub memory_tracker_stats: Option, - /// `ru_maxrss` from `getrusage`. `None` if an error occurred. - #[cfg(target_os = "linux")] - pub max_rss: Option, -} - -/// Statistics of collected memory metrics. -#[cfg(any(target_os = "linux", feature = "jemalloc-allocator"))] -#[derive(Clone, Debug, Default, Encode, Decode)] -pub struct MemoryAllocationStats { - /// Total resident memory, in bytes. - pub resident: u64, - /// Total allocated memory, in bytes. - pub allocated: u64, -} diff --git a/node/core/pvf/src/prepare/pool.rs b/node/core/pvf/src/prepare/pool.rs index d151f097805e..ae8ecff5285c 100644 --- a/node/core/pvf/src/prepare/pool.rs +++ b/node/core/pvf/src/prepare/pool.rs @@ -16,16 +16,18 @@ use super::worker_intf::{self, Outcome}; use crate::{ - error::{PrepareError, PrepareResult}, metrics::Metrics, - pvf::PvfPrepData, - worker_common::{IdleWorker, WorkerHandle}, + worker_intf::{IdleWorker, WorkerHandle}, LOG_TARGET, }; use always_assert::never; use futures::{ channel::mpsc, future::BoxFuture, stream::FuturesUnordered, Future, FutureExt, StreamExt, }; +use polkadot_node_core_pvf_common::{ + error::{PrepareError, PrepareResult}, + pvf::PvfPrepData, +}; use slotmap::HopSlotMap; use std::{ fmt, diff --git a/node/core/pvf/src/prepare/queue.rs b/node/core/pvf/src/prepare/queue.rs index f84d5ab0e56e..5e19a4c7217a 100644 --- a/node/core/pvf/src/prepare/queue.rs +++ b/node/core/pvf/src/prepare/queue.rs @@ -17,11 +17,10 @@ //! A queue that handles requests for PVF preparation. use super::pool::{self, Worker}; -use crate::{ - artifacts::ArtifactId, metrics::Metrics, PrepareResult, Priority, PvfPrepData, LOG_TARGET, -}; +use crate::{artifacts::ArtifactId, metrics::Metrics, Priority, LOG_TARGET}; use always_assert::{always, never}; use futures::{channel::mpsc, stream::StreamExt as _, Future, SinkExt}; +use polkadot_node_core_pvf_common::{error::PrepareResult, pvf::PvfPrepData}; use std::{ collections::{HashMap, VecDeque}, path::PathBuf, @@ -231,7 +230,7 @@ async fn handle_enqueue( ); queue.metrics.prepare_enqueued(); - let artifact_id = pvf.as_artifact_id(); + let artifact_id = ArtifactId::from_pvf_prep_data(&pvf); if never!( queue.artifact_id_to_job.contains_key(&artifact_id), "second Enqueue sent for a known artifact" @@ -339,7 +338,7 @@ async fn handle_worker_concluded( // this can't be None; // qed. let job_data = never_none!(queue.jobs.remove(job)); - let artifact_id = job_data.pvf.as_artifact_id(); + let artifact_id = ArtifactId::from_pvf_prep_data(&job_data.pvf); queue.artifact_id_to_job.remove(&artifact_id); @@ -425,7 +424,7 @@ async fn spawn_extra_worker(queue: &mut Queue, critical: bool) -> Result<(), Fat async fn assign(queue: &mut Queue, worker: Worker, job: Job) -> Result<(), Fatal> { let job_data = &mut queue.jobs[job]; - let artifact_id = job_data.pvf.as_artifact_id(); + let artifact_id = ArtifactId::from_pvf_prep_data(&job_data.pvf); let artifact_path = artifact_id.path(&queue.cache_path); job_data.worker = Some(worker); @@ -488,11 +487,10 @@ pub fn start( #[cfg(test)] mod tests { use super::*; - use crate::{ - error::PrepareError, host::tests::TEST_PREPARATION_TIMEOUT, prepare::PrepareStats, - }; + use crate::host::tests::TEST_PREPARATION_TIMEOUT; use assert_matches::assert_matches; use futures::{future::BoxFuture, FutureExt}; + use polkadot_node_core_pvf_common::{error::PrepareError, prepare::PrepareStats}; use slotmap::SlotMap; use std::task::Poll; @@ -616,7 +614,10 @@ mod tests { result: Ok(PrepareStats::default()), }); - assert_eq!(test.poll_and_recv_from_queue().await.artifact_id, pvf(1).as_artifact_id()); + assert_eq!( + test.poll_and_recv_from_queue().await.artifact_id, + ArtifactId::from_pvf_prep_data(&pvf(1)) + ); } #[tokio::test] @@ -735,7 +736,10 @@ mod tests { // Since there is still work, the queue requested one extra worker to spawn to handle the // remaining enqueued work items. assert_eq!(test.poll_and_recv_to_pool().await, pool::ToPool::Spawn); - assert_eq!(test.poll_and_recv_from_queue().await.artifact_id, pvf(1).as_artifact_id()); + assert_eq!( + test.poll_and_recv_from_queue().await.artifact_id, + ArtifactId::from_pvf_prep_data(&pvf(1)) + ); } #[tokio::test] diff --git a/node/core/pvf/src/prepare/worker_intf.rs b/node/core/pvf/src/prepare/worker_intf.rs index daf94aadc672..47522d3f0856 100644 --- a/node/core/pvf/src/prepare/worker_intf.rs +++ b/node/core/pvf/src/prepare/worker_intf.rs @@ -17,17 +17,20 @@ //! Host interface to the prepare worker. use crate::{ - error::{PrepareError, PrepareResult}, metrics::Metrics, - prepare::PrepareStats, - pvf::PvfPrepData, - worker_common::{ - framed_recv, framed_send, path_to_bytes, spawn_with_program_path, tmpfile_in, IdleWorker, - SpawnErr, WorkerHandle, JOB_TIMEOUT_WALL_CLOCK_FACTOR, + worker_intf::{ + path_to_bytes, spawn_with_program_path, tmpfile_in, IdleWorker, SpawnErr, WorkerHandle, + JOB_TIMEOUT_WALL_CLOCK_FACTOR, }, LOG_TARGET, }; use parity_scale_codec::{Decode, Encode}; +use polkadot_node_core_pvf_common::{ + error::{PrepareError, PrepareResult}, + framed_recv, framed_send, + prepare::PrepareStats, + pvf::PvfPrepData, +}; use sp_core::hexdisplay::HexDisplay; use std::{ diff --git a/node/core/pvf/worker/src/testing.rs b/node/core/pvf/src/testing.rs similarity index 93% rename from node/core/pvf/worker/src/testing.rs rename to node/core/pvf/src/testing.rs index 7497d4aed31c..cc07d7aeef02 100644 --- a/node/core/pvf/worker/src/testing.rs +++ b/node/core/pvf/src/testing.rs @@ -19,6 +19,9 @@ //! N.B. This is not guarded with some feature flag. Overexposing items here may affect the final //! artifact even for production builds. +#[doc(hidden)] +pub use crate::worker_intf::{spawn_with_program_path, SpawnErr}; + use polkadot_primitives::ExecutorParams; /// A function that emulates the stitches together behaviors of the preparation and the execution @@ -27,7 +30,8 @@ pub fn validate_candidate( code: &[u8], params: &[u8], ) -> Result, Box> { - use crate::executor_intf::{prepare, prevalidate, Executor}; + use polkadot_node_core_pvf_execute_worker::Executor; + use polkadot_node_core_pvf_prepare_worker::{prepare, prevalidate}; let code = sp_maybe_compressed_blob::decompress(code, 10 * 1024 * 1024) .expect("Decompressing code failed"); diff --git a/node/core/pvf/src/worker_common.rs b/node/core/pvf/src/worker_intf.rs similarity index 100% rename from node/core/pvf/src/worker_common.rs rename to node/core/pvf/src/worker_intf.rs diff --git a/node/core/pvf/worker/tests/it/adder.rs b/node/core/pvf/tests/it/adder.rs similarity index 100% rename from node/core/pvf/worker/tests/it/adder.rs rename to node/core/pvf/tests/it/adder.rs diff --git a/node/core/pvf/worker/tests/it/main.rs b/node/core/pvf/tests/it/main.rs similarity index 100% rename from node/core/pvf/worker/tests/it/main.rs rename to node/core/pvf/tests/it/main.rs diff --git a/node/core/pvf/worker/tests/it/worker_common.rs b/node/core/pvf/tests/it/worker_common.rs similarity index 100% rename from node/core/pvf/worker/tests/it/worker_common.rs rename to node/core/pvf/tests/it/worker_common.rs diff --git a/node/core/pvf/worker/src/lib.rs b/node/core/pvf/worker/src/lib.rs deleted file mode 100644 index 456362cf8f57..000000000000 --- a/node/core/pvf/worker/src/lib.rs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot 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. - -// Polkadot 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 Polkadot. If not, see . - -mod common; -mod execute; -mod executor_intf; -mod memory_stats; -mod prepare; - -#[doc(hidden)] -pub mod testing; - -#[doc(hidden)] -pub use sp_tracing; - -pub use execute::worker_entrypoint as execute_worker_entrypoint; -pub use prepare::worker_entrypoint as prepare_worker_entrypoint; - -pub use executor_intf::{prepare, prevalidate}; - -// NOTE: Initializing logging in e.g. tests will not have an effect in the workers, as they are -// separate spawned processes. Run with e.g. `RUST_LOG=parachain::pvf-worker=trace`. -const LOG_TARGET: &str = "parachain::pvf-worker"; - -/// Use this macro to declare a `fn main() {}` that will create an executable that can be used for -/// spawning the desired worker. -#[macro_export(local_inner_macros)] -macro_rules! decl_worker_main { - ($command:tt) => { - fn main() { - $crate::sp_tracing::try_init_simple(); - - let args = std::env::args().collect::>(); - - let mut version = None; - let mut socket_path: &str = ""; - - for i in 1..args.len() { - match args[i].as_ref() { - "--socket-path" => socket_path = args[i + 1].as_str(), - "--node-version" => version = Some(args[i + 1].as_str()), - _ => (), - } - } - - decl_worker_main_command!($command, socket_path, version) - } - }; -} - -#[macro_export] -#[doc(hidden)] -macro_rules! decl_worker_main_command { - (prepare, $socket_path:expr, $version: expr) => { - $crate::prepare_worker_entrypoint(&$socket_path, $version) - }; - (execute, $socket_path:expr, $version: expr) => { - $crate::execute_worker_entrypoint(&$socket_path, $version) - }; -} diff --git a/node/malus/Cargo.toml b/node/malus/Cargo.toml index a36822b041a3..8e23e623174f 100644 --- a/node/malus/Cargo.toml +++ b/node/malus/Cargo.toml @@ -20,7 +20,8 @@ polkadot-node-subsystem-types = { path = "../subsystem-types" } polkadot-node-core-dispute-coordinator = { path = "../core/dispute-coordinator" } polkadot-node-core-candidate-validation = { path = "../core/candidate-validation" } polkadot-node-core-backing = { path = "../core/backing" } -polkadot-node-core-pvf-worker = { path = "../core/pvf/worker" } +polkadot-node-core-pvf-execute-worker = { path = "../core/pvf/execute-worker" } +polkadot-node-core-pvf-prepare-worker = { path = "../core/pvf/prepare-worker" } polkadot-node-primitives = { path = "../primitives" } polkadot-primitives = { path = "../../primitives" } color-eyre = { version = "0.6.1", default-features = false } diff --git a/node/malus/src/malus.rs b/node/malus/src/malus.rs index 36cf0cca06bf..d09f8be990a4 100644 --- a/node/malus/src/malus.rs +++ b/node/malus/src/malus.rs @@ -97,7 +97,7 @@ impl MalusCli { #[cfg(not(target_os = "android"))] { - polkadot_node_core_pvf_worker::prepare_worker_entrypoint( + polkadot_node_core_pvf_prepare_worker::worker_entrypoint( &cmd.socket_path, None, ); @@ -111,7 +111,7 @@ impl MalusCli { #[cfg(not(target_os = "android"))] { - polkadot_node_core_pvf_worker::execute_worker_entrypoint( + polkadot_node_core_pvf_execute_worker::worker_entrypoint( &cmd.socket_path, None, ); diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 800a8af9e2a0..e55f2456160b 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -1158,15 +1158,11 @@ where let gadget = beefy::start_beefy_gadget::<_, _, _, _, _, _, _>(beefy_params); - // Wococo's purpose is to be a testbed for BEEFY, so if it fails we'll + // BEEFY currently only runs on testnets, if it fails we'll // bring the node down with it to make sure it is noticed. - if chain_spec.is_wococo() { - task_manager - .spawn_essential_handle() - .spawn_blocking("beefy-gadget", None, gadget); - } else { - task_manager.spawn_handle().spawn_blocking("beefy-gadget", None, gadget); - } + task_manager + .spawn_essential_handle() + .spawn_blocking("beefy-gadget", None, gadget); if is_offchain_indexing_enabled { task_manager.spawn_handle().spawn_blocking( diff --git a/node/test/performance-test/Cargo.toml b/node/test/performance-test/Cargo.toml index 70f072c03ae1..4e3001b3ee66 100644 --- a/node/test/performance-test/Cargo.toml +++ b/node/test/performance-test/Cargo.toml @@ -10,7 +10,7 @@ quote = "1.0.26" env_logger = "0.9" log = "0.4" -polkadot-node-core-pvf-worker = { path = "../../core/pvf/worker" } +polkadot-node-core-pvf-prepare-worker = { path = "../../core/pvf/prepare-worker" } polkadot-erasure-coding = { path = "../../../erasure-coding" } polkadot-node-primitives = { path = "../../primitives" } polkadot-primitives = { path = "../../../primitives" } diff --git a/node/test/performance-test/src/lib.rs b/node/test/performance-test/src/lib.rs index 1afa43cc62ba..15073912654a 100644 --- a/node/test/performance-test/src/lib.rs +++ b/node/test/performance-test/src/lib.rs @@ -65,9 +65,9 @@ pub fn measure_pvf_prepare(wasm_code: &[u8]) -> Result .or(Err(PerfCheckError::CodeDecompressionFailed))?; // Recreate the pipeline from the pvf prepare worker. - let blob = - polkadot_node_core_pvf_worker::prevalidate(code.as_ref()).map_err(PerfCheckError::from)?; - polkadot_node_core_pvf_worker::prepare(blob, &ExecutorParams::default()) + let blob = polkadot_node_core_pvf_prepare_worker::prevalidate(code.as_ref()) + .map_err(PerfCheckError::from)?; + polkadot_node_core_pvf_prepare_worker::prepare(blob, &ExecutorParams::default()) .map_err(PerfCheckError::from)?; Ok(start.elapsed()) diff --git a/parachain/test-parachains/adder/collator/Cargo.toml b/parachain/test-parachains/adder/collator/Cargo.toml index ee20cb0b0d17..7fe4aefc688d 100644 --- a/parachain/test-parachains/adder/collator/Cargo.toml +++ b/parachain/test-parachains/adder/collator/Cargo.toml @@ -34,7 +34,7 @@ sc-service = { git = "https://github.com/paritytech/substrate", branch = "master # This one is tricky. Even though it is not used directly by the collator, we still need it for the # `puppet_worker` binary, which is required for the integration test. However, this shouldn't be # a big problem since it is used transitively anyway. -polkadot-node-core-pvf-worker = { path = "../../../../node/core/pvf/worker" } +polkadot-node-core-pvf = { path = "../../../../node/core/pvf" } [dev-dependencies] polkadot-parachain = { path = "../../.." } diff --git a/parachain/test-parachains/adder/collator/bin/puppet_worker.rs b/parachain/test-parachains/adder/collator/bin/puppet_worker.rs index ddd81971292b..7f93519d8454 100644 --- a/parachain/test-parachains/adder/collator/bin/puppet_worker.rs +++ b/parachain/test-parachains/adder/collator/bin/puppet_worker.rs @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -polkadot_node_core_pvf_worker::decl_puppet_worker_main!(); +polkadot_node_core_pvf::decl_puppet_worker_main!(); diff --git a/parachain/test-parachains/adder/collator/src/lib.rs b/parachain/test-parachains/adder/collator/src/lib.rs index 4b2b9248de22..02a4598f9e47 100644 --- a/parachain/test-parachains/adder/collator/src/lib.rs +++ b/parachain/test-parachains/adder/collator/src/lib.rs @@ -272,7 +272,7 @@ mod tests { } fn validate_collation(collator: &Collator, parent_head: HeadData, collation: Collation) { - use polkadot_node_core_pvf_worker::testing::validate_candidate; + use polkadot_node_core_pvf::testing::validate_candidate; let block_data = match collation.proof_of_validity { MaybeCompressedPoV::Raw(pov) => pov.block_data, diff --git a/parachain/test-parachains/undying/collator/Cargo.toml b/parachain/test-parachains/undying/collator/Cargo.toml index 1b2ccf3be0ca..2b9d80401f5d 100644 --- a/parachain/test-parachains/undying/collator/Cargo.toml +++ b/parachain/test-parachains/undying/collator/Cargo.toml @@ -34,7 +34,7 @@ sc-service = { git = "https://github.com/paritytech/substrate", branch = "master # This one is tricky. Even though it is not used directly by the collator, we still need it for the # `puppet_worker` binary, which is required for the integration test. However, this shouldn't be # a big problem since it is used transitively anyway. -polkadot-node-core-pvf-worker = { path = "../../../../node/core/pvf/worker" } +polkadot-node-core-pvf = { path = "../../../../node/core/pvf" } [dev-dependencies] polkadot-parachain = { path = "../../.." } diff --git a/parachain/test-parachains/undying/collator/bin/puppet_worker.rs b/parachain/test-parachains/undying/collator/bin/puppet_worker.rs index ddd81971292b..7f93519d8454 100644 --- a/parachain/test-parachains/undying/collator/bin/puppet_worker.rs +++ b/parachain/test-parachains/undying/collator/bin/puppet_worker.rs @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -polkadot_node_core_pvf_worker::decl_puppet_worker_main!(); +polkadot_node_core_pvf::decl_puppet_worker_main!(); diff --git a/parachain/test-parachains/undying/collator/src/lib.rs b/parachain/test-parachains/undying/collator/src/lib.rs index dcaf9b63296d..838590fa16f5 100644 --- a/parachain/test-parachains/undying/collator/src/lib.rs +++ b/parachain/test-parachains/undying/collator/src/lib.rs @@ -354,7 +354,7 @@ mod tests { } fn validate_collation(collator: &Collator, parent_head: HeadData, collation: Collation) { - use polkadot_node_core_pvf_worker::testing::validate_candidate; + use polkadot_node_core_pvf::testing::validate_candidate; let block_data = match collation.proof_of_validity { MaybeCompressedPoV::Raw(pov) => pov.block_data, diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index b598d2ea0ef0..fe6b54535396 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -20,6 +20,7 @@ use frame_support::{ ensure, traits::{Currency, Get, IsSubType, VestingSchedule}, weights::Weight, + DefaultNoBound, }; pub use pallet::*; use parity_scale_codec::{Decode, Encode}; @@ -28,10 +29,8 @@ use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{self, Deserialize, Deserializer, Serialize, Serializer}; use sp_io::{crypto::secp256k1_ecdsa_recover, hashing::keccak_256}; -#[cfg(feature = "std")] -use sp_runtime::traits::Zero; use sp_runtime::{ - traits::{CheckedSub, DispatchInfoOf, SignedExtension}, + traits::{CheckedSub, DispatchInfoOf, SignedExtension, Zero}, transaction_validity::{ InvalidTransaction, TransactionValidity, TransactionValidityError, ValidTransaction, }, @@ -229,19 +228,13 @@ pub mod pallet { pub(super) type Preclaims = StorageMap<_, Identity, T::AccountId, EthereumAddress>; #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig { pub claims: Vec<(EthereumAddress, BalanceOf, Option, Option)>, pub vesting: Vec<(EthereumAddress, (BalanceOf, BalanceOf, T::BlockNumber))>, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - GenesisConfig { claims: Default::default(), vesting: Default::default() } - } - } - #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { diff --git a/runtime/common/src/paras_registrar.rs b/runtime/common/src/paras_registrar.rs index 5ecef73fae1c..8c080286ac61 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -195,7 +195,6 @@ pub mod pallet { pub next_free_para_id: ParaId, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { GenesisConfig { next_free_para_id: LOWEST_PUBLIC_ID } diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 05b0ca1fc538..386a06d92d56 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -19,7 +19,7 @@ //! Configuration can change only at session boundaries and is buffered until then. use crate::{inclusion::MAX_UPWARD_MESSAGE_SIZE_BOUND, shared}; -use frame_support::pallet_prelude::*; +use frame_support::{pallet_prelude::*, DefaultNoBound}; use frame_system::pallet_prelude::*; use parity_scale_codec::{Decode, Encode}; use polkadot_parachain::primitives::{MAX_HORIZONTAL_MESSAGE_NUM, MAX_UPWARD_MESSAGE_NUM}; @@ -525,17 +525,11 @@ pub mod pallet { pub(crate) type BypassConsistencyCheck = StorageValue<_, bool, ValueQuery>; #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig { pub config: HostConfiguration, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - GenesisConfig { config: Default::default() } - } - } - #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { diff --git a/runtime/parachains/src/hrmp.rs b/runtime/parachains/src/hrmp.rs index f33e753f62e5..ee725da37f1f 100644 --- a/runtime/parachains/src/hrmp.rs +++ b/runtime/parachains/src/hrmp.rs @@ -18,7 +18,7 @@ use crate::{ configuration::{self, HostConfiguration}, dmp, ensure_parachain, initializer, paras, }; -use frame_support::{pallet_prelude::*, traits::ReservableCurrency}; +use frame_support::{pallet_prelude::*, traits::ReservableCurrency, DefaultNoBound}; use frame_system::pallet_prelude::*; use parity_scale_codec::{Decode, Encode}; use polkadot_parachain::primitives::HorizontalMessages; @@ -435,17 +435,11 @@ pub mod pallet { /// configuration pallet. /// 2. `sender` and `recipient` must be valid paras. #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig { preopen_hrmp_channels: Vec<(ParaId, ParaId, u32, u32)>, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - GenesisConfig { preopen_hrmp_channels: Default::default() } - } - } - #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { @@ -621,7 +615,6 @@ pub mod pallet { } } -#[cfg(feature = "std")] fn initialize_storage(preopen_hrmp_channels: &[(ParaId, ParaId, u32, u32)]) { let host_config = configuration::Pallet::::config(); for &(sender, recipient, max_capacity, max_message_size) in preopen_hrmp_channels { @@ -634,7 +627,6 @@ fn initialize_storage(preopen_hrmp_channels: &[(ParaId, ParaId, u32, >::process_hrmp_open_channel_requests(&host_config); } -#[cfg(feature = "std")] fn preopen_hrmp_channel( sender: ParaId, recipient: ParaId, diff --git a/runtime/parachains/src/paras/mod.rs b/runtime/parachains/src/paras/mod.rs index bf2a3790385b..b4778a4988b9 100644 --- a/runtime/parachains/src/paras/mod.rs +++ b/runtime/parachains/src/paras/mod.rs @@ -114,7 +114,7 @@ use crate::{ shared, }; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; -use frame_support::{pallet_prelude::*, traits::EstimateNextSessionRotation}; +use frame_support::{pallet_prelude::*, traits::EstimateNextSessionRotation, DefaultNoBound}; use frame_system::pallet_prelude::*; use parity_scale_codec::{Decode, Encode}; use primitives::{ @@ -771,17 +771,11 @@ pub mod pallet { StorageMap<_, Identity, ValidationCodeHash, ValidationCode>; #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig { pub paras: Vec<(ParaId, ParaGenesisArgs)>, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - GenesisConfig { paras: Default::default() } - } - } - #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { diff --git a/xcm/pallet-xcm/src/lib.rs b/xcm/pallet-xcm/src/lib.rs index 041e76b2f69f..29c10de003ae 100644 --- a/xcm/pallet-xcm/src/lib.rs +++ b/xcm/pallet-xcm/src/lib.rs @@ -638,7 +638,6 @@ pub mod pallet { pub safe_xcm_version: Option, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { Self { safe_xcm_version: Some(XCM_VERSION) } diff --git a/zombienet_tests/functional/0003-beefy-and-mmr.toml b/zombienet_tests/functional/0003-beefy-and-mmr.toml index bea5ac1ba64f..a8d97bc30f85 100644 --- a/zombienet_tests/functional/0003-beefy-and-mmr.toml +++ b/zombienet_tests/functional/0003-beefy-and-mmr.toml @@ -9,8 +9,8 @@ command = "polkadot" [[relaychain.node_groups]] name = "validator" count = 3 -args = ["--log=beefy=debug", "--beefy", "--enable-offchain-indexing=true"] +args = ["--log=beefy=debug", "--enable-offchain-indexing=true"] [[relaychain.nodes]] name = "validator-unstable" -args = ["--log=beefy=debug", "--beefy", "--enable-offchain-indexing=true"] +args = ["--log=beefy=debug", "--enable-offchain-indexing=true"]