From a4c19071784c7bda3651a76c343ada029d9871f1 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Tue, 12 Nov 2019 16:47:54 +0100 Subject: [PATCH] Allow Root to add a claim (#577) * Allow Root to add a claim. * Additional test * Update lock --- polkadot/Cargo.lock | 182 ++++++++++++++++----------------- polkadot/runtime/src/claims.rs | 88 +++++++++------- 2 files changed, 142 insertions(+), 128 deletions(-) diff --git a/polkadot/Cargo.lock b/polkadot/Cargo.lock index df705d410d..ede208c0de 100644 --- a/polkadot/Cargo.lock +++ b/polkadot/Cargo.lock @@ -969,7 +969,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "fork-tree" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3882,7 +3882,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "sr-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-proc-macro 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -3896,7 +3896,7 @@ dependencies = [ [[package]] name = "sr-api-proc-macro" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3908,7 +3908,7 @@ dependencies = [ [[package]] name = "sr-arithmetic" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3921,7 +3921,7 @@ dependencies = [ [[package]] name = "sr-io" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3938,7 +3938,7 @@ dependencies = [ [[package]] name = "sr-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3957,7 +3957,7 @@ dependencies = [ [[package]] name = "sr-staking-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -3967,12 +3967,12 @@ dependencies = [ [[package]] name = "sr-std" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" [[package]] name = "sr-version" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3984,7 +3984,7 @@ dependencies = [ [[package]] name = "srml-authority-discovery" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4001,7 +4001,7 @@ dependencies = [ [[package]] name = "srml-authorship" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4017,7 +4017,7 @@ dependencies = [ [[package]] name = "srml-babe" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4037,7 +4037,7 @@ dependencies = [ [[package]] name = "srml-balances" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4052,7 +4052,7 @@ dependencies = [ [[package]] name = "srml-collective" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4068,7 +4068,7 @@ dependencies = [ [[package]] name = "srml-democracy" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4083,7 +4083,7 @@ dependencies = [ [[package]] name = "srml-elections-phragmen" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -4096,7 +4096,7 @@ dependencies = [ [[package]] name = "srml-executive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4110,7 +4110,7 @@ dependencies = [ [[package]] name = "srml-finality-tracker" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4125,7 +4125,7 @@ dependencies = [ [[package]] name = "srml-grandpa" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4143,7 +4143,7 @@ dependencies = [ [[package]] name = "srml-im-online" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4162,7 +4162,7 @@ dependencies = [ [[package]] name = "srml-indices" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4179,7 +4179,7 @@ dependencies = [ [[package]] name = "srml-membership" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4193,7 +4193,7 @@ dependencies = [ [[package]] name = "srml-metadata" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4204,7 +4204,7 @@ dependencies = [ [[package]] name = "srml-nicks" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4218,7 +4218,7 @@ dependencies = [ [[package]] name = "srml-offences" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4233,7 +4233,7 @@ dependencies = [ [[package]] name = "srml-randomness-collective-flip" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4246,7 +4246,7 @@ dependencies = [ [[package]] name = "srml-session" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4265,7 +4265,7 @@ dependencies = [ [[package]] name = "srml-staking" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4285,7 +4285,7 @@ dependencies = [ [[package]] name = "srml-staking-reward-curve" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4296,7 +4296,7 @@ dependencies = [ [[package]] name = "srml-sudo" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4310,7 +4310,7 @@ dependencies = [ [[package]] name = "srml-support" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4332,7 +4332,7 @@ dependencies = [ [[package]] name = "srml-support-procedural" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4343,7 +4343,7 @@ dependencies = [ [[package]] name = "srml-support-procedural-tools" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4355,7 +4355,7 @@ dependencies = [ [[package]] name = "srml-support-procedural-tools-derive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4365,7 +4365,7 @@ dependencies = [ [[package]] name = "srml-system" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4382,7 +4382,7 @@ dependencies = [ [[package]] name = "srml-system-rpc" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core-client 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4400,7 +4400,7 @@ dependencies = [ [[package]] name = "srml-system-rpc-runtime-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -4409,7 +4409,7 @@ dependencies = [ [[package]] name = "srml-timestamp" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4424,7 +4424,7 @@ dependencies = [ [[package]] name = "srml-transaction-payment" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -4437,7 +4437,7 @@ dependencies = [ [[package]] name = "srml-transaction-payment-rpc" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core-client 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4454,7 +4454,7 @@ dependencies = [ [[package]] name = "srml-transaction-payment-rpc-runtime-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4466,7 +4466,7 @@ dependencies = [ [[package]] name = "srml-treasury" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4556,7 +4556,7 @@ dependencies = [ [[package]] name = "substrate-application-crypto" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4568,7 +4568,7 @@ dependencies = [ [[package]] name = "substrate-authority-discovery" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4590,7 +4590,7 @@ dependencies = [ [[package]] name = "substrate-authority-discovery-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -4612,7 +4612,7 @@ dependencies = [ [[package]] name = "substrate-block-builder" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -4625,7 +4625,7 @@ dependencies = [ [[package]] name = "substrate-block-builder-runtime-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "sr-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", "sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -4636,7 +4636,7 @@ dependencies = [ [[package]] name = "substrate-chain-spec" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4651,7 +4651,7 @@ dependencies = [ [[package]] name = "substrate-chain-spec-derive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4662,7 +4662,7 @@ dependencies = [ [[package]] name = "substrate-cli" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4698,7 +4698,7 @@ dependencies = [ [[package]] name = "substrate-client" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4729,7 +4729,7 @@ dependencies = [ [[package]] name = "substrate-client-db" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", @@ -4753,7 +4753,7 @@ dependencies = [ [[package]] name = "substrate-consensus-babe" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "fork-tree 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -4793,7 +4793,7 @@ dependencies = [ [[package]] name = "substrate-consensus-babe-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4807,7 +4807,7 @@ dependencies = [ [[package]] name = "substrate-consensus-common" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4826,7 +4826,7 @@ dependencies = [ [[package]] name = "substrate-consensus-slots" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", "futures-timer 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4844,7 +4844,7 @@ dependencies = [ [[package]] name = "substrate-consensus-uncles" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -4858,7 +4858,7 @@ dependencies = [ [[package]] name = "substrate-debug-derive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4868,7 +4868,7 @@ dependencies = [ [[package]] name = "substrate-executor" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "cranelift-codegen 0.46.1 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-entity 0.46.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4900,7 +4900,7 @@ dependencies = [ [[package]] name = "substrate-externalities" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "environmental 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4911,7 +4911,7 @@ dependencies = [ [[package]] name = "substrate-finality-grandpa" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "finality-grandpa 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "fork-tree 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -4940,7 +4940,7 @@ dependencies = [ [[package]] name = "substrate-finality-grandpa-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4953,7 +4953,7 @@ dependencies = [ [[package]] name = "substrate-header-metadata" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4963,7 +4963,7 @@ dependencies = [ [[package]] name = "substrate-inherents" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4975,7 +4975,7 @@ dependencies = [ [[package]] name = "substrate-keyring" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -4987,7 +4987,7 @@ dependencies = [ [[package]] name = "substrate-keystore" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5002,7 +5002,7 @@ dependencies = [ [[package]] name = "substrate-network" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5045,7 +5045,7 @@ dependencies = [ [[package]] name = "substrate-offchain" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5073,7 +5073,7 @@ dependencies = [ [[package]] name = "substrate-offchain-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "sr-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", "sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -5082,7 +5082,7 @@ dependencies = [ [[package]] name = "substrate-panic-handler" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5091,7 +5091,7 @@ dependencies = [ [[package]] name = "substrate-peerset" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5104,7 +5104,7 @@ dependencies = [ [[package]] name = "substrate-phragmen" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -5114,7 +5114,7 @@ dependencies = [ [[package]] name = "substrate-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5153,7 +5153,7 @@ dependencies = [ [[package]] name = "substrate-primitives-storage" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5164,7 +5164,7 @@ dependencies = [ [[package]] name = "substrate-rpc" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5191,7 +5191,7 @@ dependencies = [ [[package]] name = "substrate-rpc-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5213,7 +5213,7 @@ dependencies = [ [[package]] name = "substrate-rpc-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -5222,7 +5222,7 @@ dependencies = [ [[package]] name = "substrate-rpc-servers" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-http-server 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5237,7 +5237,7 @@ dependencies = [ [[package]] name = "substrate-runtime-interface" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "environmental 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5252,7 +5252,7 @@ dependencies = [ [[package]] name = "substrate-runtime-interface-proc-macro" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5264,7 +5264,7 @@ dependencies = [ [[package]] name = "substrate-serializer" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5273,7 +5273,7 @@ dependencies = [ [[package]] name = "substrate-service" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5315,7 +5315,7 @@ dependencies = [ [[package]] name = "substrate-session" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "sr-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", "sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -5325,7 +5325,7 @@ dependencies = [ [[package]] name = "substrate-state-db" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5336,7 +5336,7 @@ dependencies = [ [[package]] name = "substrate-state-machine" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5355,7 +5355,7 @@ dependencies = [ [[package]] name = "substrate-telemetry" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5377,7 +5377,7 @@ dependencies = [ [[package]] name = "substrate-transaction-graph" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5391,7 +5391,7 @@ dependencies = [ [[package]] name = "substrate-transaction-pool" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5408,7 +5408,7 @@ dependencies = [ [[package]] name = "substrate-transaction-pool-runtime-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "sr-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", "sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)", @@ -5418,7 +5418,7 @@ dependencies = [ [[package]] name = "substrate-trie" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5437,7 +5437,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "substrate-wasm-interface" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#f76ccb03a7f2fa157445140f3dcf61d1de090a94" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#b0bc70521305b2fa68bd14add6e89c1d7dd9c674" dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/polkadot/runtime/src/claims.rs b/polkadot/runtime/src/claims.rs index 6f40d9c41b..63358f6dd3 100644 --- a/polkadot/runtime/src/claims.rs +++ b/polkadot/runtime/src/claims.rs @@ -20,15 +20,14 @@ use rstd::prelude::*; use sr_io::{hashing::keccak_256, crypto::secp256k1_ecdsa_recover}; use srml_support::{decl_event, decl_storage, decl_module}; use srml_support::traits::{Currency, Get}; -use system::ensure_none; +use system::{ensure_root, ensure_none}; use codec::{Encode, Decode}; #[cfg(feature = "std")] use serde::{self, Serialize, Deserialize, Serializer, Deserializer}; #[cfg(feature = "std")] use sr_primitives::traits::Zero; use sr_primitives::{ - weights::SimpleDispatchInfo, - transaction_validity::{ + RuntimeDebug, weights::SimpleDispatchInfo, transaction_validity::{ TransactionLongevity, TransactionValidity, ValidTransaction, InvalidTransaction }, }; @@ -48,8 +47,7 @@ pub trait Trait: system::Trait { /// An Ethereum address (i.e. 20 bytes, used to represent an Ethereum account). /// /// This gets serialized to the 0x-prefixed hex representation. -#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, Default)] -#[cfg_attr(feature = "std", derive(Debug))] +#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, Default, RuntimeDebug)] pub struct EthereumAddress([u8; 20]); #[cfg(feature = "std")] @@ -150,6 +148,15 @@ decl_module! { // Let's deposit an event to let the outside world know this happened. Self::deposit_event(RawEvent::Claimed(dest, signer, balance_due)); } + + /// Add a new claim, if you are root. + #[weight = SimpleDispatchInfo::FreeOperational] + fn mint_claim(origin, who: EthereumAddress, value: BalanceOf) { + ensure_root(origin)?; + + >::mutate(|t| *t += value); + >::insert(who, value); + } } } @@ -306,31 +313,23 @@ mod tests { type Balances = balances::Module; type Claims = Module; - fn alice_secret() -> secp256k1::SecretKey { + fn alice() -> secp256k1::SecretKey { secp256k1::SecretKey::parse(&keccak256(b"Alice")).unwrap() } - fn alice_public() -> secp256k1::PublicKey { - secp256k1::PublicKey::from_secret_key(&alice_secret()) - } - fn alice_eth() -> EthereumAddress { - let mut res = EthereumAddress::default(); - res.0.copy_from_slice(&keccak256(&alice_public().serialize()[1..65])[12..]); - res - } - fn alice_sig(what: &[u8]) -> EcdsaSignature { - let msg = keccak256(&Claims::ethereum_signable_message(&to_ascii_hex(what)[..])); - let (sig, recovery_id) = secp256k1::sign(&secp256k1::Message::parse(&msg), &alice_secret()); - let mut r = [0u8; 65]; - r[0..64].copy_from_slice(&sig.serialize()[..]); - r[64] = recovery_id.serialize(); - EcdsaSignature(r) - } - fn bob_secret() -> secp256k1::SecretKey { + fn bob() -> secp256k1::SecretKey { secp256k1::SecretKey::parse(&keccak256(b"Bob")).unwrap() } - fn bob_sig(what: &[u8]) -> EcdsaSignature { + fn public(secret: &secp256k1::SecretKey) -> secp256k1::PublicKey { + secp256k1::PublicKey::from_secret_key(secret) + } + fn eth(secret: &secp256k1::SecretKey) -> EthereumAddress { + let mut res = EthereumAddress::default(); + res.0.copy_from_slice(&keccak256(&public(secret).serialize()[1..65])[12..]); + res + } + fn sig(secret: &secp256k1::SecretKey, what: &[u8]) -> EcdsaSignature { let msg = keccak256(&Claims::ethereum_signable_message(&to_ascii_hex(what)[..])); - let (sig, recovery_id) = secp256k1::sign(&secp256k1::Message::parse(&msg), &bob_secret()); + let (sig, recovery_id) = secp256k1::sign(&secp256k1::Message::parse(&msg), secret); let mut r = [0u8; 65]; r[0..64].copy_from_slice(&sig.serialize()[..]); r[64] = recovery_id.serialize(); @@ -344,7 +343,7 @@ mod tests { // We use default for brevity, but you can configure as desired if needed. balances::GenesisConfig::::default().assimilate_storage(&mut t).unwrap(); GenesisConfig::{ - claims: vec![(alice_eth(), 100)], + claims: vec![(eth(&alice()), 100)], }.assimilate_storage(&mut t).unwrap(); t.into() } @@ -353,7 +352,7 @@ mod tests { fn basic_setup_works() { new_test_ext().execute_with(|| { assert_eq!(Claims::total(), 100); - assert_eq!(Claims::claims(&alice_eth()), Some(100)); + assert_eq!(Claims::claims(ð(&alice())), Some(100)); assert_eq!(Claims::claims(&EthereumAddress::default()), None); }); } @@ -371,17 +370,32 @@ mod tests { fn claiming_works() { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(&42), 0); - assert_ok!(Claims::claim(Origin::NONE, 42, alice_sig(&42u64.encode()))); + assert_ok!(Claims::claim(Origin::NONE, 42, sig(&alice(), &42u64.encode()))); assert_eq!(Balances::free_balance(&42), 100); }); } + #[test] + fn add_claim_works() { + new_test_ext().execute_with(|| { + assert_noop!(Claims::mint_claim(Origin::signed(42), eth(&bob()), 200), "RequireRootOrigin"); + assert_eq!(Balances::free_balance(&42), 0); + assert_noop!( + Claims::claim(Origin::NONE, 69, sig(&bob(), &69u64.encode())), + "Ethereum address has no claim" + ); + assert_ok!(Claims::mint_claim(Origin::ROOT, eth(&bob()), 200)); + assert_ok!(Claims::claim(Origin::NONE, 69, sig(&bob(), &69u64.encode()))); + assert_eq!(Balances::free_balance(&69), 200); + }); + } + #[test] fn origin_signed_claiming_fail() { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(&42), 0); assert_err!( - Claims::claim(Origin::signed(42), 42, alice_sig(&42u64.encode())), + Claims::claim(Origin::signed(42), 42, sig(&alice(), &42u64.encode())), "RequireNoOrigin", ); }); @@ -391,8 +405,8 @@ mod tests { fn double_claiming_doesnt_work() { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(&42), 0); - assert_ok!(Claims::claim(Origin::NONE, 42, alice_sig(&42u64.encode()))); - assert_noop!(Claims::claim(Origin::NONE, 42, alice_sig(&42u64.encode())), "Ethereum address has no claim"); + assert_ok!(Claims::claim(Origin::NONE, 42, sig(&alice(), &42u64.encode()))); + assert_noop!(Claims::claim(Origin::NONE, 42, sig(&alice(), &42u64.encode())), "Ethereum address has no claim"); }); } @@ -400,7 +414,7 @@ mod tests { fn non_sender_sig_doesnt_work() { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(&42), 0); - assert_noop!(Claims::claim(Origin::NONE, 42, alice_sig(&69u64.encode())), "Ethereum address has no claim"); + assert_noop!(Claims::claim(Origin::NONE, 42, sig(&alice(), &69u64.encode())), "Ethereum address has no claim"); }); } @@ -408,7 +422,7 @@ mod tests { fn non_claimant_doesnt_work() { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(&42), 0); - assert_noop!(Claims::claim(Origin::NONE, 42, bob_sig(&69u64.encode())), "Ethereum address has no claim"); + assert_noop!(Claims::claim(Origin::NONE, 42, sig(&bob(), &69u64.encode())), "Ethereum address has no claim"); }); } @@ -431,11 +445,11 @@ mod tests { new_test_ext().execute_with(|| { assert_eq!( - >::validate_unsigned(&Call::claim(1, alice_sig(&1u64.encode()))), + >::validate_unsigned(&Call::claim(1, sig(&alice(), &1u64.encode()))), Ok(ValidTransaction { priority: 100, requires: vec![], - provides: vec![("claims", alice_eth()).encode()], + provides: vec![("claims", eth(&alice())).encode()], longevity: TransactionLongevity::max_value(), propagate: true, }) @@ -445,11 +459,11 @@ mod tests { InvalidTransaction::Custom(ValidityError::InvalidEthereumSignature.into()).into(), ); assert_eq!( - >::validate_unsigned(&Call::claim(1, bob_sig(&1u64.encode()))), + >::validate_unsigned(&Call::claim(1, sig(&bob(), &1u64.encode()))), InvalidTransaction::Custom(ValidityError::SignerHasNoClaim.into()).into(), ); assert_eq!( - >::validate_unsigned(&Call::claim(0, bob_sig(&1u64.encode()))), + >::validate_unsigned(&Call::claim(0, sig(&bob(), &1u64.encode()))), InvalidTransaction::Custom(ValidityError::SignerHasNoClaim.into()).into(), ); });