From e1d45d180d58401debced3fbfff0571c41c36727 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Fri, 10 Jun 2022 14:37:36 +0800 Subject: [PATCH] Companion of paritytech/substrate#9448 --- Cargo.lock | 290 ++++++++++--------- frame/staking/README.md | 104 ------- frame/staking/src/impls.rs | 22 +- frame/staking/src/lib.rs | 17 ++ frame/staking/src/mock.rs | 30 +- frame/staking/src/slashing.rs | 62 +++- frame/staking/src/substrate_tests.rs | 146 +++++++++- frame/wormhole/backing/ethereum/src/mock.rs | 13 +- node/runtime/pangolin/src/pallets/session.rs | 7 +- node/runtime/pangolin/src/pallets/staking.rs | 3 + node/runtime/pangoro/src/pallets/session.rs | 7 +- node/runtime/pangoro/src/pallets/staking.rs | 3 + 12 files changed, 387 insertions(+), 317 deletions(-) delete mode 100644 frame/staking/README.md diff --git a/Cargo.lock b/Cargo.lock index 8e3a608555..b616521240 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -441,7 +441,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "scale-info", @@ -2257,6 +2257,7 @@ version = "2.8.11" dependencies = [ "array-bytes", "async-trait", + "beefy-primitives", "darwinia-balances-rpc-runtime-api", "darwinia-bridge-ethereum", "darwinia-claims", @@ -2863,7 +2864,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", ] @@ -2949,7 +2950,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -2969,7 +2970,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "Inflector", "chrono", @@ -2995,7 +2996,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -3009,7 +3010,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -3037,7 +3038,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "bitflags", "frame-metadata", @@ -3064,7 +3065,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -3076,7 +3077,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -3088,7 +3089,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "proc-macro2", "quote", @@ -3098,7 +3099,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "log", @@ -3115,7 +3116,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-benchmarking", "frame-support", @@ -3130,7 +3131,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "sp-api", @@ -3139,7 +3140,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "sp-api", @@ -5579,7 +5580,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -5595,7 +5596,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -5611,7 +5612,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -5626,7 +5627,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5650,7 +5651,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5680,7 +5681,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "beefy-primitives", "frame-support", @@ -5696,7 +5697,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -5794,7 +5795,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5811,7 +5812,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5827,7 +5828,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-election-provider-support", "frame-support", @@ -5847,7 +5848,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -5956,7 +5957,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5979,7 +5980,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5995,7 +5996,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6014,7 +6015,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6031,7 +6032,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6045,7 +6046,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6062,7 +6063,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6076,7 +6077,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6090,7 +6091,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6106,7 +6107,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6127,7 +6128,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6141,7 +6142,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6155,7 +6156,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6172,7 +6173,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6190,7 +6191,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6207,7 +6208,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -6224,7 +6225,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6235,7 +6236,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6251,7 +6252,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -6266,7 +6267,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-support", "frame-system", @@ -7319,7 +7320,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "env_logger", "jsonrpsee-proc-macros", @@ -7525,7 +7526,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "log", "sp-core", @@ -7536,7 +7537,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "derive_more", @@ -7563,7 +7564,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "futures-timer 3.0.2", @@ -7586,7 +7587,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7602,7 +7603,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7618,7 +7619,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -7629,7 +7630,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "chrono", "fdlimit", @@ -7667,7 +7668,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "fnv", "futures 0.3.21", @@ -7695,7 +7696,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "hash-db", "kvdb", @@ -7720,7 +7721,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "futures 0.3.21", @@ -7744,7 +7745,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "derive_more", @@ -7773,7 +7774,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "derive_more", @@ -7816,7 +7817,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "derive_more", "futures 0.3.21", @@ -7840,7 +7841,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7853,7 +7854,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "assert_matches", "async-trait", @@ -7887,7 +7888,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "futures 0.3.21", @@ -7913,7 +7914,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "sc-client-api", "sp-authorship", @@ -7924,7 +7925,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "lazy_static", "libsecp256k1 0.6.0", @@ -7950,7 +7951,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "derive_more", "environmental", @@ -7968,7 +7969,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "log", "parity-scale-codec", @@ -7984,7 +7985,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8002,7 +8003,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "derive_more", @@ -8039,7 +8040,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "derive_more", "finality-grandpa", @@ -8063,7 +8064,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "ansi_term", "futures 0.3.21", @@ -8080,7 +8081,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "derive_more", @@ -8095,7 +8096,7 @@ dependencies = [ [[package]] name = "sc-light" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "hash-db", "parity-scale-codec", @@ -8113,7 +8114,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-std", "async-trait", @@ -8164,7 +8165,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "futures-timer 3.0.2", @@ -8180,7 +8181,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "bytes 1.1.0", "fnv", @@ -8207,7 +8208,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "libp2p", @@ -8220,7 +8221,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8229,7 +8230,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "hash-db", @@ -8260,7 +8261,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -8285,7 +8286,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -8302,7 +8303,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "directories", @@ -8367,7 +8368,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "log", "parity-scale-codec", @@ -8381,7 +8382,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -8403,7 +8404,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "chrono", "futures 0.3.21", @@ -8421,10 +8422,11 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "ansi_term", "atty", + "chrono", "lazy_static", "log", "once_cell", @@ -8450,7 +8452,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -8461,7 +8463,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "intervalier", @@ -8488,7 +8490,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "derive_more", "futures 0.3.21", @@ -8502,7 +8504,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "futures-timer 3.0.2", @@ -8608,9 +8610,9 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ "zeroize", ] @@ -8946,7 +8948,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "hash-db", "log", @@ -8963,7 +8965,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.3", @@ -8975,7 +8977,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "scale-info", @@ -8988,7 +8990,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "integer-sqrt", "num-traits", @@ -9003,7 +9005,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "scale-info", @@ -9016,7 +9018,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "parity-scale-codec", @@ -9028,7 +9030,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "sp-api", @@ -9040,7 +9042,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "log", @@ -9058,7 +9060,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "futures 0.3.21", @@ -9077,7 +9079,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "parity-scale-codec", @@ -9095,7 +9097,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "merlin", @@ -9118,7 +9120,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "scale-info", @@ -9129,7 +9131,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -9141,7 +9143,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "base58", "blake2-rfc", @@ -9186,7 +9188,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "kvdb", "parking_lot 0.11.2", @@ -9206,7 +9208,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "proc-macro2", "quote", @@ -9216,7 +9218,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "environmental", "parity-scale-codec", @@ -9227,7 +9229,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "finality-grandpa", "log", @@ -9245,7 +9247,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9259,7 +9261,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "hash-db", @@ -9283,7 +9285,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "lazy_static", "sp-core", @@ -9294,7 +9296,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "derive_more", @@ -9311,7 +9313,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "zstd", ] @@ -9319,7 +9321,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "scale-info", @@ -9334,7 +9336,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -9345,7 +9347,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "sp-api", "sp-core", @@ -9355,7 +9357,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "backtrace", ] @@ -9363,7 +9365,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "rustc-hash", "serde", @@ -9373,7 +9375,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "either", "hash256-std-hasher", @@ -9395,7 +9397,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9412,7 +9414,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -9424,7 +9426,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "serde", "serde_json", @@ -9433,7 +9435,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "scale-info", @@ -9447,7 +9449,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "scale-info", @@ -9458,7 +9460,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "hash-db", "log", @@ -9481,12 +9483,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9499,7 +9501,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "log", "sp-core", @@ -9512,7 +9514,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -9528,7 +9530,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "erased-serde", "log", @@ -9546,7 +9548,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "sp-api", "sp-runtime", @@ -9555,7 +9557,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-trait", "log", @@ -9571,7 +9573,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "hash-db", "memory-db", @@ -9586,7 +9588,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9602,7 +9604,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -9613,7 +9615,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9732,7 +9734,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "platforms", ] @@ -9751,7 +9753,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.21", @@ -9773,7 +9775,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "async-std", "derive_more", @@ -9787,7 +9789,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "futures 0.3.21", "substrate-test-utils-derive", @@ -9797,7 +9799,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -9808,7 +9810,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "ansi_term", "build-helper", @@ -10372,7 +10374,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#a30e1b2206b0ff23ebf21b24cad8595342e96b72" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.3#4e5b971771eb9b8a10a95c5540292b1b47874ce9" dependencies = [ "jsonrpsee-ws-client", "log", diff --git a/frame/staking/README.md b/frame/staking/README.md deleted file mode 100644 index 0e9abc972e..0000000000 --- a/frame/staking/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# Staking - -The Staking module is the means by which a set of network maintainers (known as _authorities_ -in some contexts and _validators_ in others) are chosen based upon those who voluntarily place -funds under deposit. Under deposit, those funds are rewarded under normal operation but are -held at pain of _slash_ (expropriation) should the staked maintainer be found not to be -discharging its duties properly. - -## Terminology - -- **Staking**: The process of locking up funds for some time, placing them at risk of slashing -(loss) in order to become a rewarded maintainer of the network. -- **Validating**: The process of running a node to actively maintain the network, either by -producing blocks or guaranteeing finality of the chain. -- **Nominating**: The process of placing staked funds behind one or more validators in order to -share in any reward, and punishment, they take. -- **Stash account**: The account holding an owner's funds used for staking. -- **Controller account**: The account that controls an owner's funds for staking. -- **Era**: A (whole) number of sessions, which is the period that the validator set (and each -validator's active nominator set) is recalculated and where rewards are paid out. -- **Slash**: The punishment of a staker by reducing its funds. - -## Weights - -| Call | Origin | darwinia | substrate | -| ------------------------------------- | ------ | --------- | --------- | -| fn cancel\_deferred\_slash | R | 1,000,000 | 1,000,000 | -| fn validate(...) | S | 750,000 | 750,000 | -| fn nominate(...) | S | 750,000 | 750,000 | -| fn set\_controller(...) | S | 750,000 | 750,000 | -| fn try\_claim\_deposits\_with\_punish | S | 750,000 | - | -| fn deposit\_extra(...) | S | 500,000 | - | -| fn bond(...) | S | 500,000 | 500,000 | -| fn bond\_extra(...) | S | 500,000 | 500,000 | -| fn chill(...) | S | 500,000 | 500,000 | -| fn set\_payee(...) | S | 500,000 | 500,000 | -| fn payout\_nominator | R | 500,000 | 500,000 | -| fn set\_history\_depth | R | 500,000 | 500,000 | -| fn unbond(...) | S | 500,000 | 400,000 | -| fn clain\_mature\_deposits | S | 100,000 | 10,000 | -| fn set\_invulnerables | R | 10,000 | 10,000 | -| fn force\_unstake | R | 10,000 | 10,000 | -| fn force\_new\_era_\always | R | 10,000 | 10,000 | -| fn set\_validator\_count(...) | R | 10,000 | 5,000 | -| fn force\_no\_eras | R | 10,000 | 5,000 | -| fn reap\_stash | R | 10,000 | - | - -## FAQ - -### Q1: What is the relationship between stash and controller? - -Stash account holding an owner's funds used for staking, controller account controls an owner's funds for staking. - -### Q2: What does staker mean? - -Almost any interaction with the Staking module requires a process of **bonding** (also known -as being a *staker*). To become *bonded*, a fund-holding account known as the *stash account*, -which holds some or all of the funds that become frozen in place as part of the staking process, -is paired with an active **controller** account, which issues instructions on how they shall be -used. - -### Q3: What are the differents from BlockNumber, Era, Session and TimeStamp? - -We config the relationships manually, for example: - -```rust -pub fn start_session(session_index: SessionIndex) { - for i in Session::current_index()..session_index { - Staking::on_finalize(System::block_number()); - System::set_block_number((i + 1).into()); - Timestamp::set_timestamp(System::block_number() * 1000); - Session::on_initialize(System::block_number()); - } - assert_eq!(Session::current_index(), session_index); -} -``` - -| Unit | Value | -| ----------- | -------- | -| BlockNumber | 4 | -| Session | 3 | -| Timestamp | 3 * 1000 | -| Era | 1 | - -### Q4: What is the process of rewrad? - -```rust -// 1. Insert stash account into Payment map. ->::insert(11, RewardDestination::Controller); -// 2. Add reward points to validators using their stash account ID. -Staking::reward_by_ids(vec![(11, 50)]); -// 3. Make all validator and nominator request their payment -make_all_reward_payment(0); // 0 means 0 era. -``` - -**What happend exactly?** - -`make_all_reward_payment` triggers reward process: - -+ `make_all_reward_payment` - + reward nominators - + payout from nominators to controller - + reward validators - + payout from validators to controller diff --git a/frame/staking/src/impls.rs b/frame/staking/src/impls.rs index 412879e2ef..c080021934 100644 --- a/frame/staking/src/impls.rs +++ b/frame/staking/src/impls.rs @@ -482,6 +482,12 @@ impl Pallet { Self::start_era(start_session); } } + + for (index, disabled) in >::get() { + if disabled { + T::SessionInterface::disable_validator(index); + } + } } /// End a session potentially ending an era. @@ -565,6 +571,9 @@ impl Pallet { >::insert(&active_era.index, validator_payout); T::RingCurrency::deposit_creating(&Self::account_id(), validator_payout); T::RingRewardRemainder::on_unbalanced(T::RingCurrency::issue(rest)); + + // Clear offending validators. + >::kill(); } } @@ -1541,12 +1550,9 @@ where /// /// This is needed because `Staking` sets the `ValidatorIdOf` of the `pallet_session::Config` pub trait SessionInterface: frame_system::Config { - /// Disable a given validator by stash ID. - /// - /// Returns `true` if new era should be forced at the end of this session. - /// This allows preventing a situation where there is too many validators - /// disabled and block production stalls. - fn disable_validator(validator: &AccountId) -> Result; + /// Disable the validator at the given index, returns `false` if the validator was already + /// disabled or the index is out of bounds. + fn disable_validator(validator_index: u32) -> bool; /// Get the validators from session. fn validators() -> Vec; /// Prune historical session tries up to but not including the given index. @@ -1563,8 +1569,8 @@ where T::SessionManager: pallet_session::SessionManager>, T::ValidatorIdOf: Convert, Option>>, { - fn disable_validator(validator: &AccountId) -> Result { - >::disable(validator) + fn disable_validator(validator_index: u32) -> bool { + >::disable_index(validator_index) } fn validators() -> Vec> { diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 8d00ec295b..c715e8f953 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -388,6 +388,10 @@ pub mod pallet { #[pallet::constant] type MaxNominatorRewardedPerValidator: Get; + /// The fraction of the validator set that is safe to be offending. + /// After the threshold is reached a new era will be forced. + type OffendingValidatorsThreshold: Get; + /// Something that can provide a sorted list of voters in a somewhat sorted way. The /// original use case for this was designed with [`pallet_bags_list::Pallet`] in mind. If /// the bags-list is not desired, [`impls::UseNominatorsMap`] is likely the desired option. @@ -821,6 +825,19 @@ pub mod pallet { #[pallet::getter(fn current_planned_session)] pub type CurrentPlannedSession = StorageValue<_, SessionIndex, ValueQuery>; + /// Indices of validators that have offended in the active era and whether they are currently + /// disabled. + /// + /// This value should be a superset of disabled validators since not all offences lead to the + /// validator being disabled (if there was no slash). This is needed to track the percentage of + /// validators that have offended in the current era, ensuring a new era is forced if + /// `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find + /// whether a given validator has previously offended using binary search. It gets cleared when + /// the era ends. + #[pallet::storage] + #[pallet::getter(fn offending_validators)] + pub type OffendingValidators = StorageValue<_, Vec<(u32, bool)>, ValueQuery>; + /// True if network has been upgraded to this version. /// Storage version of the pallet. /// diff --git a/frame/staking/src/mock.rs b/frame/staking/src/mock.rs index cd2d620aec..d33898b8d0 100644 --- a/frame/staking/src/mock.rs +++ b/frame/staking/src/mock.rs @@ -90,23 +90,14 @@ impl OneSessionHandler for OtherSessionHandler { { } - fn on_new_session<'a, I: 'a>(_: bool, validators: I, _: I) + fn on_new_session<'a, I: 'a>(_: bool, _: I, _: I) where I: Iterator, AccountId: 'a, { - SESSION_VALIDATORS.with(|x| { - *x.borrow_mut() = (validators.map(|x| x.0.clone()).collect(), HashSet::new()) - }); } - fn on_disabled(validator_index: usize) { - SESSION_VALIDATORS.with(|d| { - let mut d = d.borrow_mut(); - let value = d.0[validator_index]; - d.1.insert(value); - }) - } + fn on_disabled(_: u32) {} } impl sp_runtime::BoundToRuntimeAppPublic for OtherSessionHandler { type Public = UintAuthorityId; @@ -114,7 +105,12 @@ impl sp_runtime::BoundToRuntimeAppPublic for OtherSessionHandler { pub fn is_disabled(controller: AccountId) -> bool { let stash = Staking::ledger(&controller).unwrap().stash; - SESSION_VALIDATORS.with(|d| d.borrow().1.contains(&stash)) + let validator_index = match Session::validators().iter().position(|v| *v == stash) { + Some(index) => index as u32, + None => return false, + }; + + Session::disabled_validators().contains(&validator_index) } parameter_types! { @@ -155,12 +151,10 @@ sp_runtime::impl_opaque_keys! { } } parameter_types! { - pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(25); pub static Period: BlockNumber = 5; pub static Offset: BlockNumber = 0; } impl pallet_session::Config for Test { - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; type Event = Event; type Keys = SessionKeys; type NextSessionRotation = pallet_session::PeriodicSessions; @@ -237,12 +231,12 @@ parameter_types! { pub const StakingPalletId: PalletId = PalletId(*b"da/staki"); pub const BondingDurationInEra: EraIndex = 3; pub const MaxNominatorRewardedPerValidator: u32 = 64; + pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(75); pub const Cap: Balance = CAP; pub const TotalPower: Power = TOTAL_POWER; pub static SessionsPerEra: SessionIndex = 3; pub static BondingDurationInBlockNumber: BlockNumber = bonding_duration_in_blocks(); pub static SlashDeferDuration: EraIndex = 0; - pub static SessionValidators: (Vec, HashSet) = Default::default(); pub static RingRewardRemainderUnbalanced: Balance = 0; } impl Config for Test { @@ -257,6 +251,7 @@ impl Config for Test { type KtonSlash = (); type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type NextNewSession = Session; + type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type PalletId = StakingPalletId; type RingCurrency = Ring; type RingReward = (); @@ -537,11 +532,6 @@ impl ExtBuilder { .assimilate_storage(&mut storage); let mut ext = sp_io::TestExternalities::from(storage); - ext.execute_with(|| { - let validators = Session::validators(); - SESSION_VALIDATORS.with(|x| *x.borrow_mut() = (validators.clone(), HashSet::new())); - }); - if self.initialize_first_session { // We consider all test to start after timestamp is initialized This must be ensured by // having `timestamp::on_initialize` called before `staking::on_initialize`. Also, if diff --git a/frame/staking/src/slashing.rs b/frame/staking/src/slashing.rs index 23be5af081..ffffcb3512 100644 --- a/frame/staking/src/slashing.rs +++ b/frame/staking/src/slashing.rs @@ -56,7 +56,7 @@ use scale_info::TypeInfo; // --- paritytech --- use frame_support::{ ensure, - traits::{Currency, Imbalance, OnUnbalanced, UnixTime}, + traits::{Currency, Get, Imbalance, OnUnbalanced, UnixTime}, }; use sp_runtime::{ traits::{Saturating, Zero}, @@ -364,15 +364,13 @@ pub fn compute_slash( // not continue in the next election. also end the slashing span. spans.end_span(now); >::chill_stash(stash); - - // make sure to disable validator till the end of this session - if T::SessionInterface::disable_validator(stash).unwrap_or(false) { - // force a new era, to select a new validator set - >::ensure_new_era() - } } } + // add the validator to the offenders list and make sure it is disabled for + // the duration of the era + add_offending_validator::(params.stash, true); + let mut nominators_slashed = vec![]; reward_payout += slash_nominators::(params, prior_slash_p, &mut nominators_slashed); @@ -402,13 +400,53 @@ fn kick_out_if_recent(params: SlashParams) { if spans.era_span(params.slash_era).map(|s| s.index) == Some(spans.span_index()) { spans.end_span(params.now); >::chill_stash(params.stash); + } + + // add the validator to the offenders list but since there's no slash being + // applied there's no need to disable the validator + add_offending_validator::(params.stash, false); +} + +/// Add the given validator to the offenders list and optionally disable it. +/// If after adding the validator `OffendingValidatorsThreshold` is reached +/// a new era will be forced. +fn add_offending_validator(stash: &T::AccountId, disable: bool) { + as Store>::OffendingValidators::mutate(|offending| { + let validators = T::SessionInterface::validators(); + let validator_index = match validators.iter().position(|i| i == stash) { + Some(index) => index, + None => return, + }; - // make sure to disable validator till the end of this session - if T::SessionInterface::disable_validator(params.stash).unwrap_or(false) { - // force a new era, to select a new validator set - >::ensure_new_era() + let validator_index_u32 = validator_index as u32; + + match offending.binary_search_by_key(&validator_index_u32, |(index, _)| *index) { + // this is a new offending validator + Err(index) => { + offending.insert(index, (validator_index_u32, disable)); + + let offending_threshold = + T::OffendingValidatorsThreshold::get() * validators.len() as u32; + + if offending.len() >= offending_threshold as usize { + // force a new era, to select a new validator set + >::ensure_new_era() + } + + if disable { + T::SessionInterface::disable_validator(validator_index_u32); + } + }, + Ok(index) => { + if disable && !offending[index].1 { + // the validator had previously offended without being disabled, + // let's make sure we disable it now + offending[index].1 = true; + T::SessionInterface::disable_validator(validator_index_u32); + } + }, } - } + }); } /// Slash nominators. Accepts general parameters and the prior slash percentage of the validator. diff --git a/frame/staking/src/substrate_tests.rs b/frame/staking/src/substrate_tests.rs index 13d6577c9b..6a56af6fbe 100644 --- a/frame/staking/src/substrate_tests.rs +++ b/frame/staking/src/substrate_tests.rs @@ -2710,10 +2710,11 @@ fn slash_in_old_span_does_not_deselect() { 1, ); - // not forcing for zero-slash and previous span. - assert_eq!(Staking::force_era(), Forcing::NotForcing); - assert!(>::contains_key(11)); - assert!(Session::validators().contains(&11)); + // the validator doesn't get chilled again + assert!(::Validators::iter().find(|(stash, _)| *stash == 11).is_some()); + + // but we are still forcing a new era + assert_eq!(Staking::force_era(), Forcing::ForceNew); on_offence_in_era( &[OffenceDetails { @@ -2725,10 +2726,13 @@ fn slash_in_old_span_does_not_deselect() { 1, ); - // or non-zero. - assert_eq!(Staking::force_era(), Forcing::NotForcing); - assert!(>::contains_key(11)); - assert!(Session::validators().contains(&11)); + // the validator doesn't get chilled again + assert!(::Validators::iter().find(|(stash, _)| *stash == 11).is_some()); + + // but it's disabled + assert!(is_disabled(10)); + // and we are still forcing a new era + assert_eq!(Staking::force_era(), Forcing::ForceNew); }); } @@ -3373,6 +3377,132 @@ fn slash_kicks_validators_not_nominators_and_disables_nominator_for_kicked_valid }); } +#[test] +fn non_slashable_offence_doesnt_disable_validator() { + ExtBuilder::default().build_and_execute(|| { + mock::start_active_era(1); + assert_eq_uvec!(Session::validators(), vec![11, 21]); + + let exposure_11 = Staking::eras_stakers(Staking::active_era().unwrap().index, &11); + let exposure_21 = Staking::eras_stakers(Staking::active_era().unwrap().index, &21); + + // offence with no slash associated + on_offence_now( + &[OffenceDetails { offender: (11, exposure_11.clone()), reporters: vec![] }], + &[Perbill::zero()], + ); + + // offence that slashes 25% of the bond + on_offence_now( + &[OffenceDetails { offender: (21, exposure_21.clone()), reporters: vec![] }], + &[Perbill::from_percent(25)], + ); + + // the offence for validator 10 wasn't slashable so it wasn't disabled + assert!(!is_disabled(10)); + // whereas validator 20 gets disabled + assert!(is_disabled(20)); + }); +} + +#[test] +fn offence_threshold_triggers_new_era() { + ExtBuilder::default() + .validator_count(4) + .set_status(41, StakerStatus::Validator) + .build_and_execute(|| { + mock::start_active_era(1); + assert_eq_uvec!(Session::validators(), vec![11, 21, 31, 41]); + + assert_eq!( + ::OffendingValidatorsThreshold::get(), + Perbill::from_percent(75), + ); + + // we have 4 validators and an offending validator threshold of 75%, + // once the third validator commits an offence a new era should be forced + + let exposure_11 = Staking::eras_stakers(Staking::active_era().unwrap().index, &11); + let exposure_21 = Staking::eras_stakers(Staking::active_era().unwrap().index, &21); + let exposure_31 = Staking::eras_stakers(Staking::active_era().unwrap().index, &31); + + on_offence_now( + &[OffenceDetails { offender: (11, exposure_11.clone()), reporters: vec![] }], + &[Perbill::zero()], + ); + + assert_eq!(ForceEra::::get(), Forcing::NotForcing); + + on_offence_now( + &[OffenceDetails { offender: (21, exposure_21.clone()), reporters: vec![] }], + &[Perbill::zero()], + ); + + assert_eq!(ForceEra::::get(), Forcing::NotForcing); + + on_offence_now( + &[OffenceDetails { offender: (31, exposure_31.clone()), reporters: vec![] }], + &[Perbill::zero()], + ); + + assert_eq!(ForceEra::::get(), Forcing::ForceNew); + }); +} + +#[test] +fn disabled_validators_are_kept_disabled_for_whole_era() { + ExtBuilder::default() + .validator_count(4) + .set_status(41, StakerStatus::Validator) + .build_and_execute(|| { + mock::start_active_era(1); + assert_eq_uvec!(Session::validators(), vec![11, 21, 31, 41]); + assert_eq!(::SessionsPerEra::get(), 3); + + let exposure_11 = Staking::eras_stakers(Staking::active_era().unwrap().index, &11); + let exposure_21 = Staking::eras_stakers(Staking::active_era().unwrap().index, &21); + + on_offence_now( + &[OffenceDetails { offender: (11, exposure_11.clone()), reporters: vec![] }], + &[Perbill::zero()], + ); + + on_offence_now( + &[OffenceDetails { offender: (21, exposure_21.clone()), reporters: vec![] }], + &[Perbill::from_percent(25)], + ); + + // validator 10 should not be disabled since the offence wasn't slashable + assert!(!is_disabled(10)); + // validator 20 gets disabled since it got slashed + assert!(is_disabled(20)); + + advance_session(); + + // disabled validators should carry-on through all sessions in the era + assert!(!is_disabled(10)); + assert!(is_disabled(20)); + + // validator 10 should now get disabled + on_offence_now( + &[OffenceDetails { offender: (11, exposure_11.clone()), reporters: vec![] }], + &[Perbill::from_percent(25)], + ); + + advance_session(); + + // and both are disabled in the last session of the era + assert!(is_disabled(10)); + assert!(is_disabled(20)); + + mock::start_active_era(2); + + // when a new era starts disabled validators get cleared + assert!(!is_disabled(10)); + assert!(!is_disabled(20)); + }); +} + #[test] fn claim_reward_at_the_last_era_and_no_double_claim_and_invalid_claim() { // should check that: diff --git a/frame/wormhole/backing/ethereum/src/mock.rs b/frame/wormhole/backing/ethereum/src/mock.rs index 7d0f9199e1..340d784125 100644 --- a/frame/wormhole/backing/ethereum/src/mock.rs +++ b/frame/wormhole/backing/ethereum/src/mock.rs @@ -97,23 +97,17 @@ pub struct TestSessionHandler; impl pallet_session::SessionHandler for TestSessionHandler { const KEY_TYPE_IDS: &'static [KeyTypeId] = &[key_types::DUMMY]; - fn on_genesis_session(_validators: &[(AccountId, Ks)]) {} + fn on_genesis_session(_: &[(AccountId, Ks)]) {} - fn on_new_session( - _changed: bool, - _validators: &[(AccountId, Ks)], - _queued_validators: &[(AccountId, Ks)], - ) { - } + fn on_new_session(_: bool, _: &[(AccountId, Ks)], _: &[(AccountId, Ks)]) {} - fn on_disabled(_validator_index: usize) {} + fn on_disabled(_: u32) {} } frame_support::parameter_types! { pub const Period: BlockNumber = 1; pub const Offset: BlockNumber = 0; } impl pallet_session::Config for Test { - type DisabledValidatorsThreshold = (); type Event = (); type Keys = UintAuthorityId; type NextSessionRotation = pallet_session::PeriodicSessions; @@ -177,6 +171,7 @@ impl darwinia_staking::Config for Test { type KtonSlash = (); type MaxNominatorRewardedPerValidator = (); type NextNewSession = Session; + type OffendingValidatorsThreshold = (); type PalletId = StakingPalletId; type RingCurrency = Ring; type RingReward = (); diff --git a/node/runtime/pangolin/src/pallets/session.rs b/node/runtime/pangolin/src/pallets/session.rs index 0d1028f714..af81fd5c0d 100644 --- a/node/runtime/pangolin/src/pallets/session.rs +++ b/node/runtime/pangolin/src/pallets/session.rs @@ -1,6 +1,6 @@ // --- paritytech --- use pallet_session::{historical::NoteHistoricalRoot, Config}; -use sp_runtime::{traits::OpaqueKeys, Perbill}; +use sp_runtime::{traits::OpaqueKeys, }; use sp_std::prelude::*; // --- darwinia-network --- use crate::*; @@ -16,12 +16,7 @@ sp_runtime::impl_opaque_keys! { } } -frame_support::parameter_types! { - pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17); -} - impl Config for Runtime { - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; type Event = Event; type Keys = SessionKeys; type NextSessionRotation = Babe; diff --git a/node/runtime/pangolin/src/pallets/staking.rs b/node/runtime/pangolin/src/pallets/staking.rs index 32d5b3f78c..6baf0626b9 100644 --- a/node/runtime/pangolin/src/pallets/staking.rs +++ b/node/runtime/pangolin/src/pallets/staking.rs @@ -2,6 +2,7 @@ use frame_support::PalletId; use sp_npos_elections::NposSolution; use sp_staking::SessionIndex; +use sp_runtime::Perbill; // --- darwinia-network --- use crate::*; use darwinia_staking::{Config, EraIndex, UseNominatorsMap}; @@ -16,6 +17,7 @@ frame_support::parameter_types! { pub const BondingDurationInBlockNumber: BlockNumber = 14 * DAYS; pub const SlashDeferDuration: EraIndex = BondingDurationInEra::get() - 1; pub const MaxNominatorRewardedPerValidator: u32 = 64; + pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); pub const Cap: Balance = RING_HARD_CAP; pub const TotalPower: Power = TOTAL_POWER; } @@ -33,6 +35,7 @@ impl Config for Runtime { // send the slashed funds to the treasury. type KtonSlash = KtonTreasury; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; + type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type NextNewSession = Session; type PalletId = StakingPalletId; type RingCurrency = Ring; diff --git a/node/runtime/pangoro/src/pallets/session.rs b/node/runtime/pangoro/src/pallets/session.rs index 0d1028f714..c05a07ad32 100644 --- a/node/runtime/pangoro/src/pallets/session.rs +++ b/node/runtime/pangoro/src/pallets/session.rs @@ -1,6 +1,6 @@ // --- paritytech --- use pallet_session::{historical::NoteHistoricalRoot, Config}; -use sp_runtime::{traits::OpaqueKeys, Perbill}; +use sp_runtime::traits::OpaqueKeys; use sp_std::prelude::*; // --- darwinia-network --- use crate::*; @@ -16,12 +16,7 @@ sp_runtime::impl_opaque_keys! { } } -frame_support::parameter_types! { - pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17); -} - impl Config for Runtime { - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; type Event = Event; type Keys = SessionKeys; type NextSessionRotation = Babe; diff --git a/node/runtime/pangoro/src/pallets/staking.rs b/node/runtime/pangoro/src/pallets/staking.rs index 439abfc114..cf6b8ba713 100644 --- a/node/runtime/pangoro/src/pallets/staking.rs +++ b/node/runtime/pangoro/src/pallets/staking.rs @@ -2,6 +2,7 @@ use frame_support::PalletId; use sp_npos_elections::NposSolution; use sp_staking::SessionIndex; +use sp_runtime::Perbill; // --- darwinia-network --- use crate::*; use darwinia_staking::{Config, EraIndex, UseNominatorsMap}; @@ -17,6 +18,7 @@ frame_support::parameter_types! { // slightly less than 14 days. pub const SlashDeferDuration: EraIndex = BondingDurationInEra::get() - 1; pub const MaxNominatorRewardedPerValidator: u32 = 64; + pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); pub const Cap: Balance = RING_HARD_CAP; pub const TotalPower: Power = TOTAL_POWER; } @@ -34,6 +36,7 @@ impl Config for Runtime { // send the slashed funds to the treasury. type KtonSlash = (); type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; + type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type NextNewSession = Session; type PalletId = StakingPalletId; type RingCurrency = Ring;