From 1a269fc3cd9cab9089ef2ab9d0ff4a063c4a450a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 15 Jul 2021 14:33:19 +0200 Subject: [PATCH 1/4] Update MMR leaf. --- Cargo.lock | 324 +++++++++++++++++++++++++++----------- runtime/common/Cargo.toml | 8 +- runtime/common/src/lib.rs | 29 +--- runtime/common/src/mmr.rs | 226 -------------------------- runtime/rococo/Cargo.toml | 2 + runtime/rococo/src/lib.rs | 48 ++++-- 6 files changed, 268 insertions(+), 369 deletions(-) delete mode 100644 runtime/common/src/mmr.rs diff --git a/Cargo.lock b/Cargo.lock index fe2440e4eb07..0e0229e9fe15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -450,6 +450,19 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "bae" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec107f431ee3d8a8e45e6dd117adab769556ef463959e77bf6a4888d5fd500cf" +dependencies = [ + "heck", + "proc-macro-error 0.4.12", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "base-x" version = "0.2.8" @@ -492,7 +505,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#4808f96849676024b156581485eae64f95133e97" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#2e450ac733d55b2f5e42a304afa287be6abcc53b" dependencies = [ "beefy-primitives", "fnv", @@ -521,7 +534,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#4808f96849676024b156581485eae64f95133e97" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#2e450ac733d55b2f5e42a304afa287be6abcc53b" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -539,10 +552,15 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "beefy-merkle-tree" +version = "0.1.0" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#2e450ac733d55b2f5e42a304afa287be6abcc53b" + [[package]] name = "beefy-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#4808f96849676024b156581485eae64f95133e97" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#2e450ac733d55b2f5e42a304afa287be6abcc53b" dependencies = [ "parity-scale-codec", "sp-api", @@ -1970,7 +1988,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "parity-scale-codec", ] @@ -1988,7 +2006,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "frame-support", "frame-system", @@ -2059,7 +2077,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "14.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "parity-scale-codec", "serde", @@ -2070,7 +2088,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "bitflags", "frame-metadata", @@ -2096,7 +2114,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2108,7 +2126,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -2120,7 +2138,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "proc-macro2", "quote", @@ -2150,7 +2168,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -3242,11 +3260,12 @@ checksum = "f4e48ecdd757b22fae87e87aad2dbadf11c56499c6509763c8ef20db16ffb0e9" [[package]] name = "jsonrpsee-proc-macros" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b4c85cfa6767333f3e5f3b2f2f765dad2727b0033ee270ae07c599bf43ed5ae" +checksum = "f37924e16300e249a52a22cabb5632f846dc9760b39355f5e8bc70cd23dc6300" dependencies = [ "Inflector", + "bae", "proc-macro-crate 1.0.0", "proc-macro2", "quote", @@ -3271,6 +3290,24 @@ dependencies = [ "thiserror", ] +[[package]] +name = "jsonrpsee-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d67724d368c59e08b557a516cf8fcc51100e7a708850f502e1044b151fe89788" +dependencies = [ + "async-trait", + "beef", + "futures-channel", + "futures-util", + "hyper 0.14.5", + "log", + "serde", + "serde_json", + "soketto 0.6.0", + "thiserror", +] + [[package]] name = "jsonrpsee-ws-client" version = "0.2.0" @@ -3280,7 +3317,7 @@ dependencies = [ "async-trait", "fnv", "futures 0.3.15", - "jsonrpsee-types", + "jsonrpsee-types 0.2.0", "log", "pin-project 1.0.7", "rustls 0.19.1", @@ -3295,6 +3332,30 @@ dependencies = [ "url 2.2.0", ] +[[package]] +name = "jsonrpsee-ws-client" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2834b6e7f57ce9a4412ed4d6dc95125d2c8612e68f86b9d9a07369164e4198" +dependencies = [ + "async-trait", + "fnv", + "futures 0.3.15", + "jsonrpsee-types 0.3.0", + "log", + "pin-project 1.0.7", + "rustls 0.19.1", + "rustls-native-certs 0.5.0", + "serde", + "serde_json", + "soketto 0.6.0", + "thiserror", + "tokio 0.2.21", + "tokio-rustls 0.15.0", + "tokio-util", + "url 2.2.0", +] + [[package]] name = "keccak" version = "0.1.0" @@ -4339,7 +4400,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f5653449cd45d502a53480ee08d7a599e8f4893d2bacb33c63d65bc20af6c1a" dependencies = [ "proc-macro-crate 0.1.5", - "proc-macro-error", + "proc-macro-error 1.0.4", "proc-macro2", "quote", "syn", @@ -4677,7 +4738,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#4808f96849676024b156581485eae64f95133e97" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#2e450ac733d55b2f5e42a304afa287be6abcc53b" dependencies = [ "beefy-primitives", "frame-support", @@ -4689,6 +4750,30 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-beefy-mmr" +version = "0.1.0" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#2e450ac733d55b2f5e42a304afa287be6abcc53b" +dependencies = [ + "beefy-merkle-tree", + "beefy-primitives", + "frame-support", + "frame-system", + "hex", + "libsecp256k1", + "log", + "pallet-beefy", + "pallet-mmr", + "pallet-mmr-primitives", + "pallet-session", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-bounties" version = "4.0.0-dev" @@ -5101,7 +5186,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "frame-support", "frame-system", @@ -5207,7 +5292,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "frame-benchmarking", "frame-support", @@ -6742,7 +6827,6 @@ dependencies = [ name = "polkadot-runtime-common" version = "0.9.8" dependencies = [ - "beefy-primitives", "bitvec", "frame-benchmarking", "frame-support", @@ -6755,9 +6839,8 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", - "pallet-beefy", + "pallet-beefy-mmr", "pallet-election-provider-multi-phase", - "pallet-mmr", "pallet-offences", "pallet-session", "pallet-staking", @@ -7248,16 +7331,42 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-error" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7" +dependencies = [ + "proc-macro-error-attr 0.4.12", + "proc-macro2", + "quote", + "syn", + "version_check", +] + [[package]] name = "proc-macro-error" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ - "proc-macro-error-attr", + "proc-macro-error-attr 1.0.4", + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de" +dependencies = [ "proc-macro2", "quote", "syn", + "syn-mid", "version_check", ] @@ -7724,7 +7833,7 @@ dependencies = [ "env_logger 0.8.4", "hex", "jsonrpsee-proc-macros", - "jsonrpsee-ws-client", + "jsonrpsee-ws-client 0.3.0", "log", "parity-scale-codec", "serde", @@ -7815,6 +7924,7 @@ dependencies = [ "pallet-babe", "pallet-balances", "pallet-beefy", + "pallet-beefy-mmr", "pallet-bridge-dispatch", "pallet-bridge-grandpa", "pallet-bridge-messages", @@ -8017,7 +8127,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "log", "sp-core", @@ -8080,7 +8190,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8096,7 +8206,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8116,7 +8226,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8165,7 +8275,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "derive_more", "fnv", @@ -8229,7 +8339,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "parking_lot 0.11.1", @@ -8242,7 +8352,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "derive_more", @@ -8312,7 +8422,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8325,7 +8435,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "futures 0.3.15", @@ -8353,7 +8463,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "sc-client-api", "sp-authorship", @@ -8364,7 +8474,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "derive_more", "lazy_static", @@ -8393,7 +8503,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "derive_more", "parity-scale-codec", @@ -8410,7 +8520,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "log", "parity-scale-codec", @@ -8425,7 +8535,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8445,7 +8555,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "derive_more", @@ -8549,7 +8659,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "derive_more", @@ -8588,7 +8698,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-std", "async-trait", @@ -8641,7 +8751,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", @@ -8686,7 +8796,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "futures 0.3.15", "libp2p", @@ -8708,7 +8818,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "futures 0.3.15", "hash-db", @@ -8743,7 +8853,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "derive_more", "futures 0.3.15", @@ -8768,7 +8878,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "futures 0.1.29", "jsonrpc-core", @@ -8888,7 +8998,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "chrono", "futures 0.3.15", @@ -8908,7 +9018,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "ansi_term 0.12.1", "atty", @@ -8945,7 +9055,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8985,7 +9095,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "derive_more", "futures 0.3.15", @@ -9425,10 +9535,25 @@ dependencies = [ "sha-1 0.9.6", ] +[[package]] +name = "soketto" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a74e48087dbeed4833785c2f3352b59140095dc192dce966a3bfc155020a439f" +dependencies = [ + "base64 0.13.0", + "bytes 1.0.1", + "futures 0.3.15", + "httparse", + "log", + "rand 0.8.4", + "sha-1 0.9.6", +] + [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "hash-db", "log", @@ -9445,7 +9570,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -9457,7 +9582,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "parity-scale-codec", "serde", @@ -9469,7 +9594,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "integer-sqrt", "num-traits", @@ -9495,7 +9620,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "parity-scale-codec", @@ -9507,7 +9632,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "parity-scale-codec", "sp-api", @@ -9519,7 +9644,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "futures 0.3.15", "log", @@ -9537,7 +9662,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "futures 0.3.15", @@ -9564,7 +9689,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "merlin", @@ -9586,7 +9711,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -9596,7 +9721,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -9608,7 +9733,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "base58", "blake2-rfc", @@ -9652,7 +9777,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -9661,7 +9786,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "proc-macro2", "quote", @@ -9671,7 +9796,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "environmental", "parity-scale-codec", @@ -9682,7 +9807,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "finality-grandpa", "log", @@ -9699,7 +9824,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9713,7 +9838,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "futures 0.3.15", "hash-db", @@ -9749,7 +9874,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "derive_more", @@ -9766,7 +9891,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "ruzstd", "zstd", @@ -9799,7 +9924,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "sp-api", "sp-core", @@ -9809,7 +9934,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "backtrace", ] @@ -9817,7 +9942,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "rustc-hash", "serde", @@ -9828,7 +9953,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "either", "hash256-std-hasher", @@ -9849,7 +9974,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9866,7 +9991,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -9878,7 +10003,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "serde", "serde_json", @@ -9887,7 +10012,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "parity-scale-codec", "sp-api", @@ -9900,7 +10025,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -9910,7 +10035,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "hash-db", "log", @@ -9933,12 +10058,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9951,7 +10076,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "log", "sp-core", @@ -9964,7 +10089,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -9981,7 +10106,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "erased-serde", "log", @@ -10023,7 +10148,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "hash-db", "memory-db", @@ -10037,7 +10162,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "futures 0.3.15", "futures-core", @@ -10049,7 +10174,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10064,7 +10189,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "parity-scale-codec", "proc-macro-crate 1.0.0", @@ -10076,7 +10201,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10106,8 +10231,8 @@ dependencies = [ "frame-system", "hex", "jsonrpsee", - "jsonrpsee-types", - "jsonrpsee-ws-client", + "jsonrpsee-types 0.2.0", + "jsonrpsee-ws-client 0.2.0", "kusama-runtime", "lazy_static", "log", @@ -10220,7 +10345,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90" dependencies = [ "heck", - "proc-macro-error", + "proc-macro-error 1.0.4", "proc-macro2", "quote", "syn", @@ -10320,7 +10445,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e0638a1a518fe3f93269f1db4360ae9b4cc698e3" +source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" dependencies = [ "async-std", "derive_more", @@ -10419,6 +10544,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "syn-mid" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa8e7560a164edb1621a55d18a0c59abf49d360f47aa7b821061dd7eea7fac9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "synstructure" version = "0.12.4" @@ -11171,7 +11307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59" dependencies = [ "cfg-if 0.1.10", - "rand 0.7.3", + "rand 0.3.23", "static_assertions", ] diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 1b5e7c2ae18b..cd259361956d 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -14,7 +14,6 @@ serde = { version = "1.0.123", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" -beefy-primitives = { git = "https://github.com/paritytech/grandpa-bridge-gadget", branch = "master", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -36,8 +35,7 @@ pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "m pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-beefy = { git = "https://github.com/paritytech/grandpa-bridge-gadget", branch = "master", default-features = false } -pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-beefy-mmr = { git = "https://github.com/paritytech/grandpa-bridge-gadget", branch = "master", default-features = false } frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features=false, optional = true } @@ -67,7 +65,6 @@ libsecp256k1 = "0.3.5" default = ["std"] no_std = [] std = [ - "beefy-primitives/std", "bitvec/std", "parity-scale-codec/std", "log/std", @@ -83,8 +80,7 @@ std = [ "frame-support/std", "pallet-authorship/std", "pallet-balances/std", - "pallet-beefy/std", - "pallet-mmr/std", + "pallet-beefy-mmr/std", "pallet-session/std", "pallet-staking/std", "pallet-timestamp/std", diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 7d23da786839..7c4179913a5c 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -24,7 +24,6 @@ pub mod auctions; pub mod crowdloan; pub mod purchase; pub mod impls; -pub mod mmr; pub mod paras_sudo_wrapper; pub mod paras_registrar; pub mod slot_range; @@ -37,8 +36,7 @@ mod mock; #[cfg(test)] mod integration_tests; -use beefy_primitives::crypto::AuthorityId as BeefyId; -use primitives::v1::{AccountId, AssignmentId, BlockNumber, ValidatorId}; +use primitives::v1::{AssignmentId, BlockNumber, ValidatorId}; use sp_runtime::{Perquintill, Perbill, FixedPointNumber}; use frame_system::limits; use frame_support::{ @@ -181,20 +179,6 @@ impl OneSessionHandler for AssignmentSe fn on_disabled(_: usize) { } } -/// Generates a `BeefyId` from the given `AccountId`. The resulting `BeefyId` is -/// a dummy value and this is a utility function meant to be used when migration -/// session keys. -pub fn dummy_beefy_id_from_account_id(a: AccountId) -> BeefyId { - let mut id = BeefyId::default(); - let id_raw: &mut [u8] = id.as_mut(); - - // NOTE: AccountId is 32 bytes, whereas BeefyId is 33 bytes. - id_raw[1..].copy_from_slice(a.as_ref()); - id_raw[0..4].copy_from_slice(b"beef"); - - id -} - #[cfg(test)] mod multiplier_tests { use super::*; @@ -297,15 +281,4 @@ mod multiplier_tests { println!("block = {} multiplier {:?}", blocks, multiplier); } } - - #[test] - fn generate_dummy_unique_beefy_id_from_account_id() { - let acc1 = AccountId::new([0; 32]); - let acc2 = AccountId::new([1; 32]); - - let beefy_id1 = dummy_beefy_id_from_account_id(acc1); - let beefy_id2 = dummy_beefy_id_from_account_id(acc2); - - assert_ne!(beefy_id1, beefy_id2); - } } diff --git a/runtime/common/src/mmr.rs b/runtime/common/src/mmr.rs deleted file mode 100644 index 2cf2bf115cd0..000000000000 --- a/runtime/common/src/mmr.rs +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2020 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 . - -//! A pallet responsible for creating Merkle Mountain Range (MMR) leaf for current block. - -use beefy_primitives::ValidatorSetId; -use sp_core::H256; -use sp_runtime::traits::Convert; -use sp_std::prelude::*; -use frame_support::RuntimeDebug; -use pallet_mmr::primitives::LeafDataProvider; -use parity_scale_codec::{Encode, Decode}; -use runtime_parachains::paras; -pub use pallet::*; - -/// A BEEFY consensus digest item with MMR root hash. -pub struct DepositBeefyDigest(sp_std::marker::PhantomData); - -impl pallet_mmr::primitives::OnNewRoot for DepositBeefyDigest where - T: pallet_mmr::Config, - T: pallet_beefy::Config, -{ - fn on_new_root(root: &::Hash) { - let digest = sp_runtime::generic::DigestItem::Consensus( - beefy_primitives::BEEFY_ENGINE_ID, - parity_scale_codec::Encode::encode( - &beefy_primitives::ConsensusLog::<::BeefyId>::MmrRoot(*root) - ), - ); - >::deposit_log(digest); - } -} - -/// Convert BEEFY secp256k1 public keys into uncompressed form -pub struct UncompressBeefyEcdsaKeys; -impl Convert> for UncompressBeefyEcdsaKeys { - fn convert(a: beefy_primitives::crypto::AuthorityId) -> Vec { - use sp_core::crypto::Public; - let compressed_key = a.as_slice(); - // TODO [ToDr] Temporary workaround until we have a better way to get uncompressed keys. - secp256k1::PublicKey::parse_slice(compressed_key, Some(secp256k1::PublicKeyFormat::Compressed)) - .map(|pub_key| pub_key.serialize().to_vec()) - .map_err(|_| { - log::error!(target: "runtime::beefy", "Invalid BEEFY PublicKey format!"); - }) - .unwrap_or_default() - } -} - -/// A leaf that gets added every block to the MMR constructed by [pallet_mmr]. -#[derive(RuntimeDebug, PartialEq, Eq, Clone, Encode, Decode)] -pub struct MmrLeaf { - /// Current block parent number and hash. - pub parent_number_and_hash: (BlockNumber, Hash), - /// A merkle root of all registered parachain heads. - pub parachain_heads: MerkleRoot, - /// A merkle root of the next BEEFY authority set. - pub beefy_next_authority_set: BeefyNextAuthoritySet, -} - -/// Details of the next BEEFY authority set. -#[derive(RuntimeDebug, Default, PartialEq, Eq, Clone, Encode, Decode)] -pub struct BeefyNextAuthoritySet { - /// Id of the next set. - /// - /// Id is required to correlate BEEFY signed commitments with the validator set. - /// Light Client can easily verify that the commitment witness it is getting is - /// produced by the latest validator set. - pub id: ValidatorSetId, - /// Number of validators in the set. - /// - /// Some BEEFY Light Clients may use an interactive protocol to verify only subset - /// of signatures. We put set length here, so that these clients can verify the minimal - /// number of required signatures. - pub len: u32, - /// Merkle Root Hash build from BEEFY AuthorityIds. - /// - /// This is used by Light Clients to confirm that the commitments are signed by the correct - /// validator set. Light Clients using interactive protocol, might verify only subset of - /// signatures, hence don't require the full list here (will receive inclusion proofs). - pub root: MerkleRoot, -} - -type MerkleRootOf = ::Hash; - -/// A type that is able to return current list of parachain heads that end up in the MMR leaf. -pub trait ParachainHeadsProvider { - /// Return a list of encoded parachain heads. - fn encoded_heads() -> Vec>; -} - -/// A default implementation for runtimes without parachains. -impl ParachainHeadsProvider for () { - fn encoded_heads() -> Vec> { - Default::default() - } -} - -impl ParachainHeadsProvider for paras::Pallet { - fn encoded_heads() -> Vec> { - paras::Pallet::::parachains() - .into_iter() - .map(paras::Pallet::::para_head) - .map(|maybe_para_head| maybe_para_head.encode()) - .collect() - } -} - -#[frame_support::pallet] -pub mod pallet { - use frame_support::pallet_prelude::*; - use super::*; - - #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] - pub struct Pallet(_); - - /// The module's configuration trait. - #[pallet::config] - #[pallet::disable_frame_system_supertrait_check] - pub trait Config: pallet_mmr::Config + pallet_beefy::Config { - /// Convert BEEFY AuthorityId to a form that would end up in the Merkle Tree. - /// - /// For instance for ECDSA (secp256k1) we want to store uncompressed public keys (65 bytes) - /// to simplify using them on Ethereum chain, but the rest of the Substrate codebase - /// is storing them compressed (33 bytes) for efficiency reasons. - type BeefyAuthorityToMerkleLeaf: Convert<::BeefyId, Vec>; - - /// Retrieve a list of current parachain heads. - /// - /// The trait is implemented for `paras` module, but since not all chains might have parachains, - /// and we want to keep the MMR leaf structure uniform, it's possible to use `()` as well to - /// simply put dummy data to the leaf. - type ParachainHeads: ParachainHeadsProvider; - } - - /// Details of next BEEFY authority set. - /// - /// This storage entry is used as cache for calls to [`update_beefy_next_authority_set`]. - #[pallet::storage] - #[pallet::getter(fn beefy_next_authorities)] - pub type BeefyNextAuthorities = StorageValue< - _, - BeefyNextAuthoritySet>, - ValueQuery, - >; -} - -impl LeafDataProvider for Pallet where - MerkleRootOf: From, -{ - type LeafData = MmrLeaf< - ::BlockNumber, - ::Hash, - MerkleRootOf, - >; - - fn leaf_data() -> Self::LeafData { - MmrLeaf { - parent_number_and_hash: frame_system::Pallet::::leaf_data(), - parachain_heads: Pallet::::parachain_heads_merkle_root(), - beefy_next_authority_set: Pallet::::update_beefy_next_authority_set(), - } - } -} - -impl Pallet where - MerkleRootOf: From, - ::BeefyId: -{ - /// Returns latest root hash of a merkle tree constructed from all registered parachain headers. - /// - /// NOTE this does not include parathreads - only parachains are part of the merkle tree. - /// - /// NOTE This is an initial and inefficient implementation, which re-constructs - /// the merkle tree every block. Instead we should update the merkle root in [Self::on_initialize] - /// call of this pallet and update the merkle tree efficiently (use on-chain storage to persist inner nodes). - fn parachain_heads_merkle_root() -> MerkleRootOf { - let para_heads = T::ParachainHeads::encoded_heads(); - sp_io::trie::keccak_256_ordered_root(para_heads).into() - } - - /// Returns details of the next BEEFY authority set. - /// - /// Details contain authority set id, authority set length and a merkle root, - /// constructed from uncompressed secp256k1 public keys of the next BEEFY authority set. - /// - /// This function will use a storage-cached entry in case the set didn't change, or compute and cache - /// new one in case it did. - fn update_beefy_next_authority_set() -> BeefyNextAuthoritySet> { - let id = pallet_beefy::Pallet::::validator_set_id() + 1; - let current_next = Self::beefy_next_authorities(); - // avoid computing the merkle tree if validator set id didn't change. - if id == current_next.id { - return current_next; - } - - let beefy_public_keys = pallet_beefy::Pallet::::next_authorities() - .into_iter() - .map(T::BeefyAuthorityToMerkleLeaf::convert) - .collect::>(); - let len = beefy_public_keys.len() as u32; - let root: MerkleRootOf = sp_io::trie::keccak_256_ordered_root(beefy_public_keys).into(); - let next_set = BeefyNextAuthoritySet { - id, - len, - root, - }; - // cache the result - BeefyNextAuthorities::::put(&next_set); - next_set - } -} diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index d59aac3a0834..5e8dfd4f606b 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -35,6 +35,7 @@ pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-beefy = { git = "https://github.com/paritytech/grandpa-bridge-gadget", branch = "master", default-features = false } +pallet-beefy-mmr = { git = "https://github.com/paritytech/grandpa-bridge-gadget", branch = "master", default-features = false } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -104,6 +105,7 @@ std = [ "pallet-bridge-messages/std", "pallet-collective/std", "pallet-beefy/std", + "pallet-beefy-mmr/std", "pallet-grandpa/std", "pallet-sudo/std", "pallet-membership/std", diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 22597283915d..9b31c91622e3 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -32,7 +32,6 @@ use primitives::v1::{ SessionInfo as SessionInfoData, }; use runtime_common::{ - mmr as mmr_common, SlowAdjustingFeeUpdate, impls::ToAuthor, BlockHashCount, BlockWeights, BlockLength, RocksDbWeight, }; use runtime_parachains::{ @@ -65,6 +64,7 @@ use sp_core::{OpaqueMetadata, RuntimeDebug}; use sp_staking::SessionIndex; use pallet_session::historical as session_historical; use beefy_primitives::crypto::AuthorityId as BeefyId; +use beefy_primitives::mmr::MmrLeafVersion; use pallet_mmr_primitives as mmr; use frame_system::EnsureRoot; use runtime_common::{paras_sudo_wrapper, paras_registrar, xcm_sender, auctions, crowdloan, slots}; @@ -237,7 +237,7 @@ construct_runtime! { // Bridges support. Mmr: pallet_mmr::{Pallet, Call, Storage}, Beefy: pallet_beefy::{Pallet, Config, Storage}, - MmrLeaf: mmr_common::{Pallet, Storage}, + MmrLeaf: pallet_beefy_mmr::{Pallet, Storage}, // It might seem strange that we add both sides of the bridge to the same runtime. We do this because this // runtime as shared by both the Rococo and Wococo chains. When running as Rococo we only use @@ -825,27 +825,45 @@ impl pallet_mmr::Config for Runtime { const INDEXING_PREFIX: &'static [u8] = b"mmr"; type Hashing = Keccak256; type Hash = ::Output; - type OnNewRoot = mmr_common::DepositBeefyDigest; + type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; type WeightInfo = (); - type LeafData = mmr_common::Pallet; + type LeafData = pallet_beefy_mmr::Pallet; } -impl mmr_common::Config for Runtime { - type BeefyAuthorityToMerkleLeaf = mmr_common::UncompressBeefyEcdsaKeys; - type ParachainHeads = Paras; +pub struct ParasProvider; +impl pallet_beefy_mmr::ParachainHeadsProvider for ParasProvider { + fn parachain_heads() -> Vec<(u32, Vec)> { + Paras::parachains() + .into_iter() + .filter_map(|id| { + Paras::para_head(&id).map(|head| (id.into(), head.0)) + }) + .collect() + } +} + +parameter_types! { + /// TODO [ToDr] Docs! + pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0); +} + +impl pallet_beefy_mmr::Config for Runtime { + type LeafVersion = LeafVersion; + type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum; + type ParachainHeads = ParasProvider; } parameter_types! { - // This is a pretty unscientific cap. - // - // Note that once this is hit the pallet will essentially throttle incoming requests down to one - // call per block. + /// This is a pretty unscientific cap. + /// + /// Note that once this is hit the pallet will essentially throttle incoming requests down to one + /// call per block. pub const MaxRequests: u32 = 4 * HOURS as u32; - // Number of headers to keep. - // - // Assuming the worst case of every header being finalized, we will keep headers at least for a - // week. + /// Number of headers to keep. + /// + /// Assuming the worst case of every header being finalized, we will keep headers at least for a + /// week. pub const HeadersToKeep: u32 = 7 * DAYS as u32; } From d4e05f6c7b31d6f463ace27e1135f8ec61ebfe30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 15 Jul 2021 15:49:18 +0200 Subject: [PATCH 2/4] Revert to older substrate. --- Cargo.lock | 156 ++++++++++++++++++++++++++--------------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1646de414084..41056ca89f19 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1975,7 +1975,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "parity-scale-codec", ] @@ -1993,7 +1993,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "frame-support", "frame-system", @@ -2064,7 +2064,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "14.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "parity-scale-codec", "serde", @@ -2075,7 +2075,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "bitflags", "frame-metadata", @@ -2101,7 +2101,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2113,7 +2113,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -2125,7 +2125,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "proc-macro2", "quote", @@ -2155,7 +2155,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -5166,7 +5166,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "frame-support", "frame-system", @@ -5272,7 +5272,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "frame-benchmarking", "frame-support", @@ -8139,7 +8139,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "log", "sp-core", @@ -8202,7 +8202,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8218,7 +8218,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8238,7 +8238,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8287,7 +8287,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "derive_more", "fnv", @@ -8351,7 +8351,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "parking_lot 0.11.1", @@ -8364,7 +8364,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "derive_more", @@ -8434,7 +8434,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8482,7 +8482,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "futures 0.3.15", @@ -8510,7 +8510,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "sc-client-api", "sp-authorship", @@ -8521,7 +8521,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "derive_more", "lazy_static", @@ -8550,7 +8550,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "derive_more", "parity-scale-codec", @@ -8567,7 +8567,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "log", "parity-scale-codec", @@ -8582,7 +8582,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8602,7 +8602,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "derive_more", @@ -8706,7 +8706,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "derive_more", @@ -8745,7 +8745,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-std", "async-trait", @@ -8798,7 +8798,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", @@ -8843,7 +8843,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "futures 0.3.15", "libp2p", @@ -8865,7 +8865,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "futures 0.3.15", "hash-db", @@ -8900,7 +8900,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "derive_more", "futures 0.3.15", @@ -8925,7 +8925,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "futures 0.1.29", "jsonrpc-core", @@ -9045,7 +9045,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "chrono", "futures 0.3.15", @@ -9065,7 +9065,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "ansi_term 0.12.1", "atty", @@ -9102,7 +9102,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -9142,7 +9142,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "derive_more", "futures 0.3.15", @@ -9600,7 +9600,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "hash-db", "log", @@ -9617,7 +9617,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -9629,7 +9629,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "parity-scale-codec", "serde", @@ -9641,7 +9641,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "integer-sqrt", "num-traits", @@ -9667,7 +9667,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "parity-scale-codec", @@ -9679,7 +9679,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "parity-scale-codec", "sp-api", @@ -9691,7 +9691,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "futures 0.3.15", "log", @@ -9709,7 +9709,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "futures 0.3.15", @@ -9736,7 +9736,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "merlin", @@ -9758,7 +9758,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -9768,7 +9768,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -9780,7 +9780,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "base58", "blake2-rfc", @@ -9824,7 +9824,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -9833,7 +9833,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "proc-macro2", "quote", @@ -9843,7 +9843,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "environmental", "parity-scale-codec", @@ -9854,7 +9854,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "finality-grandpa", "log", @@ -9871,7 +9871,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9885,7 +9885,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "futures 0.3.15", "hash-db", @@ -9921,7 +9921,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "derive_more", @@ -9938,7 +9938,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "ruzstd", "zstd", @@ -9971,7 +9971,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "sp-api", "sp-core", @@ -9981,7 +9981,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "backtrace", ] @@ -9989,7 +9989,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "rustc-hash", "serde", @@ -10000,7 +10000,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "either", "hash256-std-hasher", @@ -10021,7 +10021,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10038,7 +10038,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -10050,7 +10050,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "serde", "serde_json", @@ -10059,7 +10059,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "parity-scale-codec", "sp-api", @@ -10072,7 +10072,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -10082,7 +10082,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "hash-db", "log", @@ -10105,12 +10105,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10123,7 +10123,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "log", "sp-core", @@ -10136,7 +10136,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -10153,7 +10153,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "erased-serde", "log", @@ -10195,7 +10195,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "hash-db", "memory-db", @@ -10209,7 +10209,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "futures 0.3.15", "futures-core", @@ -10221,7 +10221,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10236,7 +10236,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "parity-scale-codec", "proc-macro-crate 1.0.0", @@ -10248,7 +10248,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10490,7 +10490,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#0c971e0e154efe7918cc687ab99d477901fb4219" +source = "git+https://github.com/paritytech/substrate?branch=master#bfca1a91f7607d7395591f7341335fd4a27064da" dependencies = [ "async-std", "derive_more", @@ -11386,7 +11386,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59" dependencies = [ "cfg-if 0.1.10", - "rand 0.3.23", + "rand 0.7.3", "static_assertions", ] From 5c35143bf29ed4139a7fda1e51a88b46e77d0be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 15 Jul 2021 16:32:00 +0200 Subject: [PATCH 3/4] Add version docs. --- runtime/rococo/src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 1ec4992fd8f2..ef922cf60c84 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -843,7 +843,19 @@ impl pallet_beefy_mmr::ParachainHeadsProvider for ParasProvider { } parameter_types! { - /// TODO [ToDr] Docs! + /// Version of the produced MMR leaf. + /// + /// The version consists of two parts; + /// - `major` (3 bits) + /// - `minor` (5 bits) + /// + /// `major` should be updated only if decoding the previous MMR Leaf format from the payload + /// is not possible (i.e. backward incompatible change). + /// `minor` should be updated if fields are added to the previous MMR Leaf, which given SCALE + /// encoding does not prevent old leafs from being decoded. + /// + /// Hence we expect `major` to be changed really rarely (think never). + /// See [MmrLeafVersion] type documentation for more details. pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0); } From bbfa8e3d5c71f73b1869b3dae3648aa25f2587de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 15 Jul 2021 23:56:12 +0200 Subject: [PATCH 4/4] Fix spellcheck. --- runtime/rococo/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index ef922cf60c84..06dbd19ed853 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -855,7 +855,7 @@ parameter_types! { /// encoding does not prevent old leafs from being decoded. /// /// Hence we expect `major` to be changed really rarely (think never). - /// See [MmrLeafVersion] type documentation for more details. + /// See [`MmrLeafVersion`] type documentation for more details. pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0); }