mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
Update to Substrate master (#176)
* Update to master This introduces a new type `CollatorId`, currently just `SessionKey` but which would forseeably change to its own thing. It seems to work like this (despite there being a lot of the new-incompatible `AccountId` replaced). No idea if it does anything sensible, though. * Cleanups * Fix tests * Remove commented code * Specify commit hash * Remove commented code * Correct version * Update runtime/Cargo.toml Co-Authored-By: gavofyork <github@gavwood.com> * PairT instead of _Pair * Update lock file * Remove rev causing upset
This commit is contained in:
Generated
+172
-113
@@ -12,7 +12,7 @@ dependencies = [
|
|||||||
name = "adder"
|
name = "adder"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"polkadot-parachain 0.1.0",
|
"polkadot-parachain 0.1.0",
|
||||||
"tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -235,7 +235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "bitmask"
|
name = "bitmask"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
source = "git+https://github.com/paritytech/bitmask#c2d8d196e30b018d1385be8357fdca61b978facf"
|
source = "git+https://github.com/paritytech/bitmask#a84e147be602631617badd18b6b9af83391db4a9"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitvec"
|
name = "bitvec"
|
||||||
@@ -718,7 +718,7 @@ dependencies = [
|
|||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -757,9 +757,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "fork-tree"
|
name = "fork-tree"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -875,6 +875,15 @@ dependencies = [
|
|||||||
"crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hashbrown"
|
||||||
|
version = "0.1.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "heapsize"
|
name = "heapsize"
|
||||||
version = "0.4.2"
|
version = "0.4.2"
|
||||||
@@ -1024,7 +1033,7 @@ name = "impl-codec"
|
|||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1867,6 +1876,9 @@ dependencies = [
|
|||||||
name = "once_cell"
|
name = "once_cell"
|
||||||
version = "0.1.8"
|
version = "0.1.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "opaque-debug"
|
name = "opaque-debug"
|
||||||
@@ -1930,7 +1942,7 @@ source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parity-codec"
|
name = "parity-codec"
|
||||||
version = "3.1.0"
|
version = "3.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2094,6 +2106,16 @@ dependencies = [
|
|||||||
"syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
"syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pbkdf2"
|
||||||
|
version = "0.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "peeking_take_while"
|
name = "peeking_take_while"
|
||||||
version = "0.1.2"
|
version = "0.1.2"
|
||||||
@@ -2128,7 +2150,7 @@ dependencies = [
|
|||||||
"kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)",
|
"kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)",
|
||||||
"kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)",
|
"kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"polkadot-primitives 0.1.0",
|
"polkadot-primitives 0.1.0",
|
||||||
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -2152,7 +2174,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"polkadot-cli 0.3.0",
|
"polkadot-cli 0.3.0",
|
||||||
"polkadot-primitives 0.1.0",
|
"polkadot-primitives 0.1.0",
|
||||||
"polkadot-runtime 0.1.0",
|
"polkadot-runtime 0.1.0",
|
||||||
@@ -2165,7 +2187,7 @@ dependencies = [
|
|||||||
name = "polkadot-erasure-coding"
|
name = "polkadot-erasure-coding"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"polkadot-primitives 0.1.0",
|
"polkadot-primitives 0.1.0",
|
||||||
"reed-solomon-erasure 4.0.0 (git+https://github.com/paritytech/reed-solomon-erasure)",
|
"reed-solomon-erasure 4.0.0 (git+https://github.com/paritytech/reed-solomon-erasure)",
|
||||||
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -2188,7 +2210,7 @@ dependencies = [
|
|||||||
"arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"polkadot-availability-store 0.1.0",
|
"polkadot-availability-store 0.1.0",
|
||||||
@@ -2208,7 +2230,7 @@ name = "polkadot-parachain"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2220,7 +2242,7 @@ dependencies = [
|
|||||||
name = "polkadot-primitives"
|
name = "polkadot-primitives"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"polkadot-parachain 0.1.0",
|
"polkadot-parachain 0.1.0",
|
||||||
"pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2242,7 +2264,7 @@ dependencies = [
|
|||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"polkadot-primitives 0.1.0",
|
"polkadot-primitives 0.1.0",
|
||||||
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2315,7 +2337,7 @@ dependencies = [
|
|||||||
name = "polkadot-statement-table"
|
name = "polkadot-statement-table"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"polkadot-primitives 0.1.0",
|
"polkadot-primitives 0.1.0",
|
||||||
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -2329,7 +2351,7 @@ dependencies = [
|
|||||||
"exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"polkadot-availability-store 0.1.0",
|
"polkadot-availability-store 0.1.0",
|
||||||
"polkadot-parachain 0.1.0",
|
"polkadot-parachain 0.1.0",
|
||||||
@@ -2760,7 +2782,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "schnorrkel"
|
name = "schnorrkel"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "git+https://github.com/w3f/schnorrkel#d3289df76b8ae6dfb68e733204c5c009df5343a9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2769,6 +2791,7 @@ dependencies = [
|
|||||||
"merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sha3 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"sha3 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -2981,7 +3004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sr-api-macros"
|
name = "sr-api-macros"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2993,12 +3016,12 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sr-io"
|
name = "sr-io"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"environmental 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"environmental 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3010,12 +3033,12 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sr-primitives"
|
name = "sr-primitives"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3026,7 +3049,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sr-std"
|
name = "sr-std"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -3034,10 +3057,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sr-version"
|
name = "sr-version"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3047,10 +3070,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-aura"
|
name = "srml-aura"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3066,10 +3089,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-balances"
|
name = "srml-balances"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3082,10 +3105,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-consensus"
|
name = "srml-consensus"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3099,9 +3122,9 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-council"
|
name = "srml-council"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3117,10 +3140,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-democracy"
|
name = "srml-democracy"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3134,9 +3157,9 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-executive"
|
name = "srml-executive"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3148,10 +3171,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-fees"
|
name = "srml-fees"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3165,10 +3188,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-finality-tracker"
|
name = "srml-finality-tracker"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3181,13 +3204,14 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-grandpa"
|
name = "srml-grandpa"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
|
"srml-consensus 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"srml-finality-tracker 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"srml-finality-tracker 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"srml-session 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"srml-session 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"srml-support 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"srml-support 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3199,10 +3223,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-indices"
|
name = "srml-indices"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3218,9 +3242,9 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-metadata"
|
name = "srml-metadata"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3230,10 +3254,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-session"
|
name = "srml-session"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3248,10 +3272,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-staking"
|
name = "srml-staking"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3267,10 +3291,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-sudo"
|
name = "srml-sudo"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3283,15 +3307,16 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-support"
|
name = "srml-support"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitmask 0.5.0 (git+https://github.com/paritytech/bitmask)",
|
"bitmask 0.5.0 (git+https://github.com/paritytech/bitmask)",
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3303,7 +3328,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-support-procedural"
|
name = "srml-support-procedural"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3315,7 +3340,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-support-procedural-tools"
|
name = "srml-support-procedural-tools"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3327,7 +3352,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-support-procedural-tools-derive"
|
name = "srml-support-procedural-tools-derive"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3337,10 +3362,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-system"
|
name = "srml-system"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3354,10 +3379,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-timestamp"
|
name = "srml-timestamp"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3369,10 +3394,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-treasury"
|
name = "srml-treasury"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3385,9 +3410,9 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "srml-upgrade-key"
|
name = "srml-upgrade-key"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3493,10 +3518,21 @@ dependencies = [
|
|||||||
"syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
"syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "substrate-bip39"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "git+https://github.com/paritytech/substrate-bip39#a28806512c977992af8d6740d45352f5a1c832a0"
|
||||||
|
dependencies = [
|
||||||
|
"hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)",
|
||||||
|
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-cli"
|
name = "substrate-cli"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3511,6 +3547,7 @@ dependencies = [
|
|||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3528,7 +3565,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-client"
|
name = "substrate-client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3538,7 +3575,7 @@ dependencies = [
|
|||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)",
|
"kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-api-macros 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-api-macros 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3557,14 +3594,14 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-client-db"
|
name = "substrate-client-db"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)",
|
"kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)",
|
||||||
"kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)",
|
"kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3578,12 +3615,12 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-consensus-aura"
|
name = "substrate-consensus-aura"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3604,7 +3641,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-consensus-aura-primitives"
|
name = "substrate-consensus-aura-primitives"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
]
|
]
|
||||||
@@ -3612,12 +3649,12 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-consensus-aura-slots"
|
name = "substrate-consensus-aura-slots"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3631,13 +3668,13 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-consensus-common"
|
name = "substrate-consensus-common"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-version 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-version 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3649,14 +3686,14 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-executor"
|
name = "substrate-executor"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3674,13 +3711,13 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-finality-grandpa"
|
name = "substrate-finality-grandpa"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"finality-grandpa 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"finality-grandpa 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fork-tree 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"fork-tree 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3699,9 +3736,9 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-finality-grandpa-primitives"
|
name = "substrate-finality-grandpa-primitives"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3711,9 +3748,9 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-inherents"
|
name = "substrate-inherents"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3722,7 +3759,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-keyring"
|
name = "substrate-keyring"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3732,7 +3769,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-keystore"
|
name = "substrate-keystore"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3748,7 +3785,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-network"
|
name = "substrate-network"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3759,7 +3796,7 @@ dependencies = [
|
|||||||
"linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3774,7 +3811,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-network-libp2p"
|
name = "substrate-network-libp2p"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3800,7 +3837,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-panic-handler"
|
name = "substrate-panic-handler"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
"backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3809,25 +3846,29 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-primitives"
|
name = "substrate-primitives"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hash256-std-hasher 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hash256-std-hasher 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ring 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ring 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
|
"substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)",
|
||||||
|
"tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3836,14 +3877,14 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-rpc"
|
name = "substrate-rpc"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3862,7 +3903,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-rpc-servers"
|
name = "substrate-rpc-servers"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3876,7 +3917,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-serializer"
|
name = "substrate-serializer"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3885,14 +3926,14 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-service"
|
name = "substrate-service"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3917,10 +3958,10 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-state-db"
|
name = "substrate-state-db"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
]
|
]
|
||||||
@@ -3928,13 +3969,13 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-state-machine"
|
name = "substrate-state-machine"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"substrate-panic-handler 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-panic-handler 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3946,7 +3987,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-telemetry"
|
name = "substrate-telemetry"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3964,7 +4005,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-transaction-graph"
|
name = "substrate-transaction-graph"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3978,12 +4019,12 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-transaction-pool"
|
name = "substrate-transaction-pool"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
"substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)",
|
||||||
@@ -3994,11 +4035,11 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-trie"
|
name = "substrate-trie"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
source = "git+https://github.com/paritytech/substrate#66795b0773f1b9240dae87dce39fbb61385f6350"
|
source = "git+https://github.com/paritytech/substrate#45824913c980bb1ba3963f9bba67775a507d8624"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"memory-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memory-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"trie-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"trie-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"trie-root 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"trie-root 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -4112,6 +4153,20 @@ dependencies = [
|
|||||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tiny-bip39"
|
||||||
|
version = "0.6.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tiny-keccak"
|
name = "tiny-keccak"
|
||||||
version = "1.4.2"
|
version = "1.4.2"
|
||||||
@@ -4759,6 +4814,7 @@ dependencies = [
|
|||||||
"checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e"
|
"checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e"
|
||||||
"checksum hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b03501f6e1a2a97f1618879aba3156f14ca2847faa530c4e28859638bd11483"
|
"checksum hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b03501f6e1a2a97f1618879aba3156f14ca2847faa530c4e28859638bd11483"
|
||||||
"checksum hash256-std-hasher 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5c13dbac3cc50684760f54af18545c9e80fb75e93a3e586d71ebdc13138f6a4"
|
"checksum hash256-std-hasher 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5c13dbac3cc50684760f54af18545c9e80fb75e93a3e586d71ebdc13138f6a4"
|
||||||
|
"checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da"
|
||||||
"checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461"
|
"checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461"
|
||||||
"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
|
"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
|
||||||
"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
|
"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
|
||||||
@@ -4858,7 +4914,7 @@ dependencies = [
|
|||||||
"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13"
|
"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13"
|
||||||
"checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)" = "<none>"
|
"checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)" = "<none>"
|
||||||
"checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "<none>"
|
"checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "<none>"
|
||||||
"checksum parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67a4d27831e31e27f1454d6e3d3bb34bcac6bf7ad7032eed0ad0070dc8cf55c1"
|
"checksum parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "21c9c3a1623c71ed83964ff28cac6126e178920f7646d32c337eacb9152b2907"
|
||||||
"checksum parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "864e9f66b58c0b38f0d6b511b6576afa2b678ae801b64220553bced57ac12df9"
|
"checksum parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "864e9f66b58c0b38f0d6b511b6576afa2b678ae801b64220553bced57ac12df9"
|
||||||
"checksum parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b9db194dfbcfe3b398d63d765437a5c7232d59906e203055f0e993f6458ff1"
|
"checksum parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b9db194dfbcfe3b398d63d765437a5c7232d59906e203055f0e993f6458ff1"
|
||||||
"checksum parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61ae6944d4435d41f4d0f12108c5cbb9207cbb14bc8f2b4984c6e930dc9c8e41"
|
"checksum parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61ae6944d4435d41f4d0f12108c5cbb9207cbb14bc8f2b4984c6e930dc9c8e41"
|
||||||
@@ -4873,6 +4929,7 @@ dependencies = [
|
|||||||
"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9"
|
"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9"
|
||||||
"checksum paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f50392d1265092fbee9273414cc40eb6d47d307bd66222c477bb8450c8504f9d"
|
"checksum paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f50392d1265092fbee9273414cc40eb6d47d307bd66222c477bb8450c8504f9d"
|
||||||
"checksum paste-impl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a3cd512fe3a55e8933b2dcad913e365639db86d512e4004c3084b86864d9467a"
|
"checksum paste-impl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a3cd512fe3a55e8933b2dcad913e365639db86d512e4004c3084b86864d9467a"
|
||||||
|
"checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9"
|
||||||
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
|
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
|
||||||
"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
|
"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
|
||||||
"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c"
|
"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c"
|
||||||
@@ -4924,7 +4981,7 @@ dependencies = [
|
|||||||
"checksum safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f7bf422d23a88c16d5090d455f182bc99c60af4df6a345c63428acf5129e347"
|
"checksum safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f7bf422d23a88c16d5090d455f182bc99c60af4df6a345c63428acf5129e347"
|
||||||
"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9"
|
"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9"
|
||||||
"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56"
|
"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56"
|
||||||
"checksum schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe554f318830b48e5da8ab1ccb1ffd02b79228364dac7766b7cd1ec461ca5116"
|
"checksum schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)" = "<none>"
|
||||||
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
|
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
|
||||||
"checksum sdset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6959a7341a17cbff280a619c3a3c0001d2d6b54661e6d04c3741c3af07cc2c5"
|
"checksum sdset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6959a7341a17cbff280a619c3a3c0001d2d6b54661e6d04c3741c3af07cc2c5"
|
||||||
"checksum secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfaccd3a23619349e0878d9a241f34b1982343cdf67367058cd7d078d326b63e"
|
"checksum secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfaccd3a23619349e0878d9a241f34b1982343cdf67367058cd7d078d326b63e"
|
||||||
@@ -4988,6 +5045,7 @@ dependencies = [
|
|||||||
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
|
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
|
||||||
"checksum structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad348dc73012fcf78c71f06f9d942232cdd4c859d4b6975e27836c3efc0c3"
|
"checksum structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad348dc73012fcf78c71f06f9d942232cdd4c859d4b6975e27836c3efc0c3"
|
||||||
"checksum structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ef98172b1a00b0bec738508d3726540edcbd186d50dfd326f2b1febbb3559f04"
|
"checksum structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ef98172b1a00b0bec738508d3726540edcbd186d50dfd326f2b1febbb3559f04"
|
||||||
|
"checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "<none>"
|
||||||
"checksum substrate-cli 0.3.0 (git+https://github.com/paritytech/substrate)" = "<none>"
|
"checksum substrate-cli 0.3.0 (git+https://github.com/paritytech/substrate)" = "<none>"
|
||||||
"checksum substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
|
"checksum substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
|
||||||
"checksum substrate-client-db 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
|
"checksum substrate-client-db 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
|
||||||
@@ -5028,6 +5086,7 @@ dependencies = [
|
|||||||
"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6"
|
"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6"
|
||||||
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
|
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
|
||||||
"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
|
"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
|
||||||
|
"checksum tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a1415431cb2398d84da64173f8473c792808314427d4a6f2f3ea85ae67239fe3"
|
||||||
"checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f"
|
"checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f"
|
||||||
"checksum tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5462b0f968c0457efe38fcd2df7e487096b992419e4f5337b06775a614bbda4b"
|
"checksum tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5462b0f968c0457efe38fcd2df7e487096b992419e4f5337b06775a614bbda4b"
|
||||||
"checksum tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "e0500b88064f08bebddd0c0bed39e19f5c567a5f30975bee52b0c0d3e2eeb38c"
|
"checksum tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "e0500b88064f08bebddd0c0bed39e19f5c567a5f30975bee52b0c0d3e2eeb38c"
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ use std::time::Duration;
|
|||||||
|
|
||||||
use futures::{future, stream, Stream, Future, IntoFuture};
|
use futures::{future, stream, Stream, Future, IntoFuture};
|
||||||
use client::BlockchainEvents;
|
use client::BlockchainEvents;
|
||||||
use primitives::ed25519;
|
use primitives::{ed25519, Pair};
|
||||||
use polkadot_primitives::{AccountId, BlockId, SessionKey};
|
use polkadot_primitives::{BlockId, SessionKey};
|
||||||
use polkadot_primitives::parachain::{self, BlockData, DutyRoster, HeadData, ConsolidatedIngress, Message, Id as ParaId};
|
use polkadot_primitives::parachain::{self, BlockData, DutyRoster, HeadData, ConsolidatedIngress, Message, Id as ParaId};
|
||||||
use polkadot_cli::{PolkadotService, CustomConfiguration, CoreApi, ParachainHost};
|
use polkadot_cli::{PolkadotService, CustomConfiguration, CoreApi, ParachainHost};
|
||||||
use polkadot_cli::{Worker, IntoExit, ProvideRuntimeApi};
|
use polkadot_cli::{Worker, IntoExit, ProvideRuntimeApi};
|
||||||
@@ -127,11 +127,6 @@ pub trait RelayChainContext {
|
|||||||
fn unrouted_egress(&self, id: ParaId) -> Self::FutureEgress;
|
fn unrouted_egress(&self, id: ParaId) -> Self::FutureEgress;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn key_to_account_id(key: &ed25519::Pair) -> AccountId {
|
|
||||||
let pubkey_bytes: [u8; 32] = key.public().into();
|
|
||||||
pubkey_bytes.into()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Collate the necessary ingress queue using the given context.
|
/// Collate the necessary ingress queue using the given context.
|
||||||
pub fn collate_ingress<'a, R>(relay_context: R)
|
pub fn collate_ingress<'a, R>(relay_context: R)
|
||||||
-> impl Future<Item=ConsolidatedIngress, Error=R::Error> + 'a
|
-> impl Future<Item=ConsolidatedIngress, Error=R::Error> + 'a
|
||||||
@@ -195,7 +190,7 @@ pub fn collate<'a, R, P>(
|
|||||||
|
|
||||||
let receipt = parachain::CandidateReceipt {
|
let receipt = parachain::CandidateReceipt {
|
||||||
parachain_index: local_id,
|
parachain_index: local_id,
|
||||||
collator: key_to_account_id(&*key),
|
collator: key.public(),
|
||||||
signature,
|
signature,
|
||||||
head_data,
|
head_data,
|
||||||
balance_uploads: Vec::new(),
|
balance_uploads: Vec::new(),
|
||||||
@@ -253,7 +248,7 @@ impl<P, E> Worker for CollationNode<P, E> where
|
|||||||
fn configuration(&self) -> CustomConfiguration {
|
fn configuration(&self) -> CustomConfiguration {
|
||||||
let mut config = CustomConfiguration::default();
|
let mut config = CustomConfiguration::default();
|
||||||
config.collating_for = Some((
|
config.collating_for = Some((
|
||||||
key_to_account_id(&*self.key),
|
self.key.public(),
|
||||||
self.para_id.clone(),
|
self.para_id.clone(),
|
||||||
));
|
));
|
||||||
config
|
config
|
||||||
|
|||||||
@@ -16,9 +16,8 @@
|
|||||||
|
|
||||||
//! Bridge between the network and consensus service for getting collations to it.
|
//! Bridge between the network and consensus service for getting collations to it.
|
||||||
|
|
||||||
use polkadot_primitives::{AccountId, Hash};
|
use polkadot_primitives::{parachain::CollatorId, Hash};
|
||||||
use polkadot_primitives::parachain::{Id as ParaId, Collation};
|
use polkadot_primitives::parachain::{Id as ParaId, Collation};
|
||||||
|
|
||||||
use futures::sync::oneshot;
|
use futures::sync::oneshot;
|
||||||
|
|
||||||
use std::collections::hash_map::{HashMap, Entry};
|
use std::collections::hash_map::{HashMap, Entry};
|
||||||
@@ -40,9 +39,9 @@ pub enum Role {
|
|||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub enum Action {
|
pub enum Action {
|
||||||
/// Disconnect the given collator.
|
/// Disconnect the given collator.
|
||||||
Disconnect(AccountId),
|
Disconnect(CollatorId),
|
||||||
/// Give the collator a new role.
|
/// Give the collator a new role.
|
||||||
NewRole(AccountId, Role),
|
NewRole(CollatorId, Role),
|
||||||
}
|
}
|
||||||
|
|
||||||
struct CollationSlot {
|
struct CollationSlot {
|
||||||
@@ -111,13 +110,13 @@ impl SlotEntries {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct ParachainCollators {
|
struct ParachainCollators {
|
||||||
primary: AccountId,
|
primary: CollatorId,
|
||||||
backup: Vec<AccountId>,
|
backup: Vec<CollatorId>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Manages connected collators and role assignments from the perspective of a validator.
|
/// Manages connected collators and role assignments from the perspective of a validator.
|
||||||
pub struct CollatorPool {
|
pub struct CollatorPool {
|
||||||
collators: HashMap<AccountId, ParaId>,
|
collators: HashMap<CollatorId, ParaId>,
|
||||||
parachain_collators: HashMap<ParaId, ParachainCollators>,
|
parachain_collators: HashMap<ParaId, ParachainCollators>,
|
||||||
collations: HashMap<(Hash, ParaId), CollationSlot>,
|
collations: HashMap<(Hash, ParaId), CollationSlot>,
|
||||||
}
|
}
|
||||||
@@ -133,19 +132,19 @@ impl CollatorPool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Call when a new collator is authenticated. Returns the role.
|
/// Call when a new collator is authenticated. Returns the role.
|
||||||
pub fn on_new_collator(&mut self, account_id: AccountId, para_id: ParaId) -> Role {
|
pub fn on_new_collator(&mut self, collator_id: CollatorId, para_id: ParaId) -> Role {
|
||||||
self.collators.insert(account_id.clone(), para_id);
|
self.collators.insert(collator_id.clone(), para_id);
|
||||||
match self.parachain_collators.entry(para_id) {
|
match self.parachain_collators.entry(para_id) {
|
||||||
Entry::Vacant(vacant) => {
|
Entry::Vacant(vacant) => {
|
||||||
vacant.insert(ParachainCollators {
|
vacant.insert(ParachainCollators {
|
||||||
primary: account_id,
|
primary: collator_id,
|
||||||
backup: Vec::new(),
|
backup: Vec::new(),
|
||||||
});
|
});
|
||||||
|
|
||||||
Role::Primary
|
Role::Primary
|
||||||
},
|
},
|
||||||
Entry::Occupied(mut occupied) => {
|
Entry::Occupied(mut occupied) => {
|
||||||
occupied.get_mut().backup.push(account_id);
|
occupied.get_mut().backup.push(collator_id);
|
||||||
|
|
||||||
Role::Backup
|
Role::Backup
|
||||||
}
|
}
|
||||||
@@ -154,21 +153,21 @@ impl CollatorPool {
|
|||||||
|
|
||||||
/// Called when a collator disconnects. If it was the primary, returns a new primary for that
|
/// Called when a collator disconnects. If it was the primary, returns a new primary for that
|
||||||
/// parachain.
|
/// parachain.
|
||||||
pub fn on_disconnect(&mut self, account_id: AccountId) -> Option<AccountId> {
|
pub fn on_disconnect(&mut self, collator_id: CollatorId) -> Option<CollatorId> {
|
||||||
self.collators.remove(&account_id).and_then(|para_id| match self.parachain_collators.entry(para_id) {
|
self.collators.remove(&collator_id).and_then(|para_id| match self.parachain_collators.entry(para_id) {
|
||||||
Entry::Vacant(_) => None,
|
Entry::Vacant(_) => None,
|
||||||
Entry::Occupied(mut occ) => {
|
Entry::Occupied(mut occ) => {
|
||||||
if occ.get().primary == account_id {
|
if occ.get().primary == collator_id {
|
||||||
if occ.get().backup.is_empty() {
|
if occ.get().backup.is_empty() {
|
||||||
occ.remove();
|
occ.remove();
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
let mut collators = occ.get_mut();
|
let mut collators = occ.get_mut();
|
||||||
collators.primary = collators.backup.pop().expect("backup non-empty; qed");
|
collators.primary = collators.backup.pop().expect("backup non-empty; qed");
|
||||||
Some(collators.primary)
|
Some(collators.primary.clone())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let pos = occ.get().backup.iter().position(|a| a == &account_id)
|
let pos = occ.get().backup.iter().position(|a| a == &collator_id)
|
||||||
.expect("registered collator always present in backup if not primary; qed");
|
.expect("registered collator always present in backup if not primary; qed");
|
||||||
|
|
||||||
occ.get_mut().backup.remove(pos);
|
occ.get_mut().backup.remove(pos);
|
||||||
@@ -181,8 +180,8 @@ impl CollatorPool {
|
|||||||
/// Called when a collation is received.
|
/// Called when a collation is received.
|
||||||
/// The collator should be registered for the parachain of the collation as a precondition of this function.
|
/// The collator should be registered for the parachain of the collation as a precondition of this function.
|
||||||
/// The collation should have been checked for integrity of signature before passing to this function.
|
/// The collation should have been checked for integrity of signature before passing to this function.
|
||||||
pub fn on_collation(&mut self, account_id: AccountId, relay_parent: Hash, collation: Collation) {
|
pub fn on_collation(&mut self, collator_id: CollatorId, relay_parent: Hash, collation: Collation) {
|
||||||
if let Some(para_id) = self.collators.get(&account_id) {
|
if let Some(para_id) = self.collators.get(&collator_id) {
|
||||||
debug_assert_eq!(para_id, &collation.receipt.parachain_index);
|
debug_assert_eq!(para_id, &collation.receipt.parachain_index);
|
||||||
|
|
||||||
// TODO: punish if not primary?
|
// TODO: punish if not primary?
|
||||||
@@ -219,20 +218,20 @@ impl CollatorPool {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use substrate_primitives::crypto::UncheckedInto;
|
||||||
use polkadot_primitives::parachain::{CandidateReceipt, BlockData, HeadData};
|
use polkadot_primitives::parachain::{CandidateReceipt, BlockData, HeadData};
|
||||||
use substrate_primitives::H512;
|
|
||||||
use futures::Future;
|
use futures::Future;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn disconnect_primary_gives_new_primary() {
|
fn disconnect_primary_gives_new_primary() {
|
||||||
let mut pool = CollatorPool::new();
|
let mut pool = CollatorPool::new();
|
||||||
let para_id: ParaId = 5.into();
|
let para_id: ParaId = 5.into();
|
||||||
let bad_primary = [0; 32].into();
|
let bad_primary: CollatorId = [0; 32].unchecked_into();
|
||||||
let good_backup = [1; 32].into();
|
let good_backup: CollatorId = [1; 32].unchecked_into();
|
||||||
|
|
||||||
assert_eq!(pool.on_new_collator(bad_primary, para_id.clone()), Role::Primary);
|
assert_eq!(pool.on_new_collator(bad_primary.clone(), para_id.clone()), Role::Primary);
|
||||||
assert_eq!(pool.on_new_collator(good_backup, para_id.clone()), Role::Backup);
|
assert_eq!(pool.on_new_collator(good_backup.clone(), para_id.clone()), Role::Backup);
|
||||||
assert_eq!(pool.on_disconnect(bad_primary), Some(good_backup));
|
assert_eq!(pool.on_disconnect(bad_primary), Some(good_backup.clone()));
|
||||||
assert_eq!(pool.on_disconnect(good_backup), None);
|
assert_eq!(pool.on_disconnect(good_backup), None);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,11 +239,11 @@ mod tests {
|
|||||||
fn disconnect_backup_removes_from_pool() {
|
fn disconnect_backup_removes_from_pool() {
|
||||||
let mut pool = CollatorPool::new();
|
let mut pool = CollatorPool::new();
|
||||||
let para_id: ParaId = 5.into();
|
let para_id: ParaId = 5.into();
|
||||||
let primary = [0; 32].into();
|
let primary = [0; 32].unchecked_into();
|
||||||
let backup = [1; 32].into();
|
let backup: CollatorId = [1; 32].unchecked_into();
|
||||||
|
|
||||||
assert_eq!(pool.on_new_collator(primary, para_id.clone()), Role::Primary);
|
assert_eq!(pool.on_new_collator(primary, para_id.clone()), Role::Primary);
|
||||||
assert_eq!(pool.on_new_collator(backup, para_id.clone()), Role::Backup);
|
assert_eq!(pool.on_new_collator(backup.clone(), para_id.clone()), Role::Backup);
|
||||||
assert_eq!(pool.on_disconnect(backup), None);
|
assert_eq!(pool.on_disconnect(backup), None);
|
||||||
assert!(pool.parachain_collators.get(¶_id).unwrap().backup.is_empty());
|
assert!(pool.parachain_collators.get(¶_id).unwrap().backup.is_empty());
|
||||||
}
|
}
|
||||||
@@ -253,19 +252,19 @@ mod tests {
|
|||||||
fn await_before_collation() {
|
fn await_before_collation() {
|
||||||
let mut pool = CollatorPool::new();
|
let mut pool = CollatorPool::new();
|
||||||
let para_id: ParaId = 5.into();
|
let para_id: ParaId = 5.into();
|
||||||
let primary = [0; 32].into();
|
let primary: CollatorId = [0; 32].unchecked_into();
|
||||||
let relay_parent = [1; 32].into();
|
let relay_parent = [1; 32].into();
|
||||||
|
|
||||||
assert_eq!(pool.on_new_collator(primary, para_id.clone()), Role::Primary);
|
assert_eq!(pool.on_new_collator(primary.clone(), para_id.clone()), Role::Primary);
|
||||||
let (tx1, rx1) = oneshot::channel();
|
let (tx1, rx1) = oneshot::channel();
|
||||||
let (tx2, rx2) = oneshot::channel();
|
let (tx2, rx2) = oneshot::channel();
|
||||||
pool.await_collation(relay_parent, para_id, tx1);
|
pool.await_collation(relay_parent, para_id, tx1);
|
||||||
pool.await_collation(relay_parent, para_id, tx2);
|
pool.await_collation(relay_parent, para_id, tx2);
|
||||||
pool.on_collation(primary, relay_parent, Collation {
|
pool.on_collation(primary.clone(), relay_parent, Collation {
|
||||||
receipt: CandidateReceipt {
|
receipt: CandidateReceipt {
|
||||||
parachain_index: para_id,
|
parachain_index: para_id,
|
||||||
collator: primary.into(),
|
collator: primary.into(),
|
||||||
signature: H512::from([2; 64]).into(),
|
signature: Default::default(),
|
||||||
head_data: HeadData(vec![1, 2, 3]),
|
head_data: HeadData(vec![1, 2, 3]),
|
||||||
balance_uploads: vec![],
|
balance_uploads: vec![],
|
||||||
egress_queue_roots: vec![],
|
egress_queue_roots: vec![],
|
||||||
@@ -283,16 +282,16 @@ mod tests {
|
|||||||
fn collate_before_await() {
|
fn collate_before_await() {
|
||||||
let mut pool = CollatorPool::new();
|
let mut pool = CollatorPool::new();
|
||||||
let para_id: ParaId = 5.into();
|
let para_id: ParaId = 5.into();
|
||||||
let primary = [0; 32].into();
|
let primary: CollatorId = [0; 32].unchecked_into();
|
||||||
let relay_parent = [1; 32].into();
|
let relay_parent = [1; 32].into();
|
||||||
|
|
||||||
assert_eq!(pool.on_new_collator(primary, para_id.clone()), Role::Primary);
|
assert_eq!(pool.on_new_collator(primary.clone(), para_id.clone()), Role::Primary);
|
||||||
|
|
||||||
pool.on_collation(primary, relay_parent, Collation {
|
pool.on_collation(primary.clone(), relay_parent, Collation {
|
||||||
receipt: CandidateReceipt {
|
receipt: CandidateReceipt {
|
||||||
parachain_index: para_id,
|
parachain_index: para_id,
|
||||||
collator: primary.into(),
|
collator: primary,
|
||||||
signature: H512::from([2; 64]).into(),
|
signature: Default::default(),
|
||||||
head_data: HeadData(vec![1, 2, 3]),
|
head_data: HeadData(vec![1, 2, 3]),
|
||||||
balance_uploads: vec![],
|
balance_uploads: vec![],
|
||||||
egress_queue_roots: vec![],
|
egress_queue_roots: vec![],
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ impl MessageValidationData {
|
|||||||
::polkadot_validation::check_statement(
|
::polkadot_validation::check_statement(
|
||||||
&statement.statement,
|
&statement.statement,
|
||||||
&statement.signature,
|
&statement.signature,
|
||||||
statement.sender,
|
statement.sender.clone(),
|
||||||
relay_parent,
|
relay_parent,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-19
@@ -54,13 +54,13 @@ pub mod gossip;
|
|||||||
|
|
||||||
use codec::{Decode, Encode};
|
use codec::{Decode, Encode};
|
||||||
use futures::sync::oneshot;
|
use futures::sync::oneshot;
|
||||||
use polkadot_primitives::{AccountId, Block, SessionKey, Hash, Header};
|
use polkadot_primitives::{Block, SessionKey, Hash, Header, parachain::CollatorId};
|
||||||
use polkadot_primitives::parachain::{Id as ParaId, BlockData, CandidateReceipt, Collation};
|
use polkadot_primitives::parachain::{Id as ParaId, BlockData, CandidateReceipt, Collation};
|
||||||
use substrate_network::{NodeIndex, RequestId, Context, Severity};
|
use substrate_network::{NodeIndex, RequestId, Context, Severity};
|
||||||
use substrate_network::{message, generic_message};
|
use substrate_network::{message, generic_message};
|
||||||
use substrate_network::specialization::NetworkSpecialization as Specialization;
|
use substrate_network::specialization::NetworkSpecialization as Specialization;
|
||||||
use substrate_network::StatusMessage as GenericFullStatus;
|
use substrate_network::StatusMessage as GenericFullStatus;
|
||||||
use self::validation::{LiveValidationSessions, RecentSessionKeys, InsertedRecentKey};
|
use self::validation::{LiveValidationSessions, RecentValidatorIds, InsertedRecentKey};
|
||||||
use self::collator_pool::{CollatorPool, Role, Action};
|
use self::collator_pool::{CollatorPool, Role, Action};
|
||||||
use self::local_collations::LocalCollations;
|
use self::local_collations::LocalCollations;
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ pub type NetworkService = ::substrate_network::Service<Block, PolkadotProtocol>;
|
|||||||
/// Status of a Polkadot node.
|
/// Status of a Polkadot node.
|
||||||
#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)]
|
#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)]
|
||||||
pub struct Status {
|
pub struct Status {
|
||||||
collating_for: Option<(AccountId, ParaId)>,
|
collating_for: Option<(CollatorId, ParaId)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct BlockDataRequest {
|
struct BlockDataRequest {
|
||||||
@@ -128,8 +128,8 @@ impl CollatorState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct PeerInfo {
|
struct PeerInfo {
|
||||||
collating_for: Option<(AccountId, ParaId)>,
|
collating_for: Option<(CollatorId, ParaId)>,
|
||||||
validator_keys: RecentSessionKeys,
|
validator_keys: RecentValidatorIds,
|
||||||
claimed_validator: bool,
|
claimed_validator: bool,
|
||||||
collator_state: CollatorState,
|
collator_state: CollatorState,
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,7 @@ fn send_polkadot_message(ctx: &mut Context<Block>, to: NodeIndex, message: Messa
|
|||||||
/// Polkadot protocol attachment for substrate.
|
/// Polkadot protocol attachment for substrate.
|
||||||
pub struct PolkadotProtocol {
|
pub struct PolkadotProtocol {
|
||||||
peers: HashMap<NodeIndex, PeerInfo>,
|
peers: HashMap<NodeIndex, PeerInfo>,
|
||||||
collating_for: Option<(AccountId, ParaId)>,
|
collating_for: Option<(CollatorId, ParaId)>,
|
||||||
collators: CollatorPool,
|
collators: CollatorPool,
|
||||||
validators: HashMap<SessionKey, NodeIndex>,
|
validators: HashMap<SessionKey, NodeIndex>,
|
||||||
local_collations: LocalCollations<Collation>,
|
local_collations: LocalCollations<Collation>,
|
||||||
@@ -178,7 +178,7 @@ pub struct PolkadotProtocol {
|
|||||||
|
|
||||||
impl PolkadotProtocol {
|
impl PolkadotProtocol {
|
||||||
/// Instantiate a polkadot protocol handler.
|
/// Instantiate a polkadot protocol handler.
|
||||||
pub fn new(collating_for: Option<(AccountId, ParaId)>) -> Self {
|
pub fn new(collating_for: Option<(CollatorId, ParaId)>) -> Self {
|
||||||
PolkadotProtocol {
|
PolkadotProtocol {
|
||||||
peers: HashMap::new(),
|
peers: HashMap::new(),
|
||||||
collators: CollatorPool::new(),
|
collators: CollatorPool::new(),
|
||||||
@@ -220,7 +220,7 @@ impl PolkadotProtocol {
|
|||||||
for (id, peer_data) in self.peers.iter_mut()
|
for (id, peer_data) in self.peers.iter_mut()
|
||||||
.filter(|&(_, ref info)| info.should_send_key())
|
.filter(|&(_, ref info)| info.should_send_key())
|
||||||
{
|
{
|
||||||
peer_data.collator_state.send_key(new_local, |msg| send_polkadot_message(
|
peer_data.collator_state.send_key(new_local.clone(), |msg| send_polkadot_message(
|
||||||
ctx,
|
ctx,
|
||||||
*id,
|
*id,
|
||||||
msg
|
msg
|
||||||
@@ -251,8 +251,8 @@ impl PolkadotProtocol {
|
|||||||
}
|
}
|
||||||
Err(Some(known_keys)) => {
|
Err(Some(known_keys)) => {
|
||||||
let next_peer = known_keys.iter()
|
let next_peer = known_keys.iter()
|
||||||
.filter_map(|x| validator_keys.get(x).map(|id| (*x, *id)))
|
.filter_map(|x| validator_keys.get(x).map(|id| (x.clone(), *id)))
|
||||||
.find(|&(ref key, _)| pending.attempted_peers.insert(*key))
|
.find(|&(ref key, _)| pending.attempted_peers.insert(key.clone()))
|
||||||
.map(|(_, id)| id);
|
.map(|(_, id)| id);
|
||||||
|
|
||||||
// dispatch to peer
|
// dispatch to peer
|
||||||
@@ -323,14 +323,14 @@ impl PolkadotProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let local_collations = &mut self.local_collations;
|
let local_collations = &mut self.local_collations;
|
||||||
let new_collations = match info.validator_keys.insert(key) {
|
let new_collations = match info.validator_keys.insert(key.clone()) {
|
||||||
InsertedRecentKey::AlreadyKnown => Vec::new(),
|
InsertedRecentKey::AlreadyKnown => Vec::new(),
|
||||||
InsertedRecentKey::New(Some(old_key)) => {
|
InsertedRecentKey::New(Some(old_key)) => {
|
||||||
self.validators.remove(&old_key);
|
self.validators.remove(&old_key);
|
||||||
local_collations.fresh_key(&old_key, &key)
|
local_collations.fresh_key(&old_key, &key)
|
||||||
}
|
}
|
||||||
InsertedRecentKey::New(None) => info.collator_state.role()
|
InsertedRecentKey::New(None) => info.collator_state.role()
|
||||||
.map(|r| local_collations.note_validator_role(key, r))
|
.map(|r| local_collations.note_validator_role(key.clone(), r))
|
||||||
.unwrap_or_else(Vec::new),
|
.unwrap_or_else(Vec::new),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -418,7 +418,7 @@ impl Specialization<Block> for PolkadotProtocol {
|
|||||||
let validator = status.roles.contains(substrate_network::config::Roles::AUTHORITY);
|
let validator = status.roles.contains(substrate_network::config::Roles::AUTHORITY);
|
||||||
|
|
||||||
let mut peer_info = PeerInfo {
|
let mut peer_info = PeerInfo {
|
||||||
collating_for: local_status.collating_for,
|
collating_for: local_status.collating_for.clone(),
|
||||||
validator_keys: Default::default(),
|
validator_keys: Default::default(),
|
||||||
claimed_validator: validator,
|
claimed_validator: validator,
|
||||||
collator_state: CollatorState::Fresh,
|
collator_state: CollatorState::Fresh,
|
||||||
@@ -442,7 +442,7 @@ impl Specialization<Block> for PolkadotProtocol {
|
|||||||
// send session keys.
|
// send session keys.
|
||||||
if peer_info.should_send_key() {
|
if peer_info.should_send_key() {
|
||||||
for local_session_key in self.live_validation_sessions.recent_keys() {
|
for local_session_key in self.live_validation_sessions.recent_keys() {
|
||||||
peer_info.collator_state.send_key(*local_session_key, |msg| send_polkadot_message(
|
peer_info.collator_state.send_key(local_session_key.clone(), |msg| send_polkadot_message(
|
||||||
ctx,
|
ctx,
|
||||||
who,
|
who,
|
||||||
msg,
|
msg,
|
||||||
@@ -544,7 +544,7 @@ impl PolkadotProtocol {
|
|||||||
// we received a collation from a peer
|
// we received a collation from a peer
|
||||||
fn on_collation(&mut self, ctx: &mut Context<Block>, from: NodeIndex, relay_parent: Hash, collation: Collation) {
|
fn on_collation(&mut self, ctx: &mut Context<Block>, from: NodeIndex, relay_parent: Hash, collation: Collation) {
|
||||||
let collation_para = collation.receipt.parachain_index;
|
let collation_para = collation.receipt.parachain_index;
|
||||||
let collated_acc = collation.receipt.collator;
|
let collated_acc = collation.receipt.collator.clone();
|
||||||
|
|
||||||
match self.peers.get(&from) {
|
match self.peers.get(&from) {
|
||||||
None => ctx.report_peer(from, Severity::Useless("Unknown Polkadot specific reason".to_string())),
|
None => ctx.report_peer(from, Severity::Useless("Unknown Polkadot specific reason".to_string())),
|
||||||
@@ -571,11 +571,11 @@ impl PolkadotProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get connected peer with given account ID for collation.
|
// get connected peer with given account ID for collation.
|
||||||
fn collator_peer(&mut self, account_id: AccountId) -> Option<(NodeIndex, &mut PeerInfo)> {
|
fn collator_peer(&mut self, collator_id: CollatorId) -> Option<(NodeIndex, &mut PeerInfo)> {
|
||||||
let check_info = |info: &PeerInfo| info
|
let check_info = |info: &PeerInfo| info
|
||||||
.collating_for
|
.collating_for
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map_or(false, |&(ref acc_id, _)| acc_id == &account_id);
|
.map_or(false, |&(ref acc_id, _)| acc_id == &collator_id);
|
||||||
|
|
||||||
self.peers
|
self.peers
|
||||||
.iter_mut()
|
.iter_mut()
|
||||||
@@ -585,8 +585,8 @@ impl PolkadotProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// disconnect a collator by account-id.
|
// disconnect a collator by account-id.
|
||||||
fn disconnect_bad_collator(&mut self, ctx: &mut Context<Block>, account_id: AccountId) {
|
fn disconnect_bad_collator(&mut self, ctx: &mut Context<Block>, collator_id: CollatorId) {
|
||||||
if let Some((who, _)) = self.collator_peer(account_id) {
|
if let Some((who, _)) = self.collator_peer(collator_id) {
|
||||||
ctx.report_peer(who, Severity::Bad("Consensus layer determined the given collator misbehaved".to_string()))
|
ctx.report_peer(who, Severity::Bad("Consensus layer determined the given collator misbehaved".to_string()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ impl<C: Clone> LocalCollations<C> {
|
|||||||
Vec::new()
|
Vec::new()
|
||||||
}
|
}
|
||||||
Role::Primary => {
|
Role::Primary => {
|
||||||
let new_primary = self.primary_for.insert(key);
|
let new_primary = self.primary_for.insert(key.clone());
|
||||||
if new_primary {
|
if new_primary {
|
||||||
self.collations_targeting(&key)
|
self.collations_targeting(&key)
|
||||||
} else {
|
} else {
|
||||||
@@ -72,7 +72,7 @@ impl<C: Clone> LocalCollations<C> {
|
|||||||
/// to the validator.
|
/// to the validator.
|
||||||
pub fn fresh_key(&mut self, old_key: &SessionKey, new_key: &SessionKey) -> Vec<(Hash, C)> {
|
pub fn fresh_key(&mut self, old_key: &SessionKey, new_key: &SessionKey) -> Vec<(Hash, C)> {
|
||||||
if self.primary_for.remove(old_key) {
|
if self.primary_for.remove(old_key) {
|
||||||
self.primary_for.insert(*new_key);
|
self.primary_for.insert(new_key.clone());
|
||||||
|
|
||||||
self.collations_targeting(new_key)
|
self.collations_targeting(new_key)
|
||||||
} else {
|
} else {
|
||||||
@@ -116,7 +116,7 @@ impl<C: Clone> LocalCollations<C> {
|
|||||||
let borrowed_collation = &local.collation;
|
let borrowed_collation = &local.collation;
|
||||||
local.targets
|
local.targets
|
||||||
.intersection(&self.primary_for)
|
.intersection(&self.primary_for)
|
||||||
.map(move |k| (*k, borrowed_collation.clone()))
|
.map(move |k| (k.clone(), borrowed_collation.clone()))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn collations_targeting(&self, key: &SessionKey) -> Vec<(Hash, C)> {
|
fn collations_targeting(&self, key: &SessionKey) -> Vec<(Hash, C)> {
|
||||||
@@ -130,14 +130,16 @@ impl<C: Clone> LocalCollations<C> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use substrate_primitives::crypto::UncheckedInto;
|
||||||
|
use polkadot_primitives::parachain::ValidatorId;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn add_validator_with_ready_collation() {
|
fn add_validator_with_ready_collation() {
|
||||||
let key = [1; 32].into();
|
let key: ValidatorId = [1; 32].unchecked_into();
|
||||||
let relay_parent = [2; 32].into();
|
let relay_parent = [2; 32].into();
|
||||||
let targets = {
|
let targets = {
|
||||||
let mut set = HashSet::new();
|
let mut set = HashSet::new();
|
||||||
set.insert(key);
|
set.insert(key.clone());
|
||||||
set
|
set
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -148,18 +150,18 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn rename_with_ready() {
|
fn rename_with_ready() {
|
||||||
let orig_key = [1; 32].into();
|
let orig_key: ValidatorId = [1; 32].unchecked_into();
|
||||||
let new_key = [2; 32].into();
|
let new_key: ValidatorId = [2; 32].unchecked_into();
|
||||||
let relay_parent = [255; 32].into();
|
let relay_parent = [255; 32].into();
|
||||||
let targets = {
|
let targets = {
|
||||||
let mut set = HashSet::new();
|
let mut set = HashSet::new();
|
||||||
set.insert(new_key);
|
set.insert(new_key.clone());
|
||||||
set
|
set
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut tracker: LocalCollations<u8> = LocalCollations::new();
|
let mut tracker: LocalCollations<u8> = LocalCollations::new();
|
||||||
assert!(tracker.add_collation(relay_parent, targets, 5).next().is_none());
|
assert!(tracker.add_collation(relay_parent, targets, 5).next().is_none());
|
||||||
assert!(tracker.note_validator_role(orig_key, Role::Primary).is_empty());
|
assert!(tracker.note_validator_role(orig_key.clone(), Role::Primary).is_empty());
|
||||||
assert_eq!(tracker.fresh_key(&orig_key, &new_key), vec![(relay_parent, 5u8)]);
|
assert_eq!(tracker.fresh_key(&orig_key, &new_key), vec![(relay_parent, 5u8)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,16 +185,16 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn add_collation_with_connected_target() {
|
fn add_collation_with_connected_target() {
|
||||||
let key = [1; 32].into();
|
let key: ValidatorId = [1; 32].unchecked_into();
|
||||||
let relay_parent = [2; 32].into();
|
let relay_parent = [2; 32].into();
|
||||||
let targets = {
|
let targets = {
|
||||||
let mut set = HashSet::new();
|
let mut set = HashSet::new();
|
||||||
set.insert(key);
|
set.insert(key.clone());
|
||||||
set
|
set
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut tracker = LocalCollations::new();
|
let mut tracker = LocalCollations::new();
|
||||||
assert!(tracker.note_validator_role(key, Role::Primary).is_empty());
|
assert!(tracker.note_validator_role(key.clone(), Role::Primary).is_empty());
|
||||||
assert_eq!(tracker.add_collation(relay_parent, targets, 5).next(), Some((key, 5)));
|
assert_eq!(tracker.add_collation(relay_parent, targets, 5).next(), Some((key, 5)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -426,8 +426,8 @@ impl DeferredStatements {
|
|||||||
fn push(&mut self, statement: SignedStatement) {
|
fn push(&mut self, statement: SignedStatement) {
|
||||||
let (hash, trace) = match statement.statement {
|
let (hash, trace) = match statement.statement {
|
||||||
GenericStatement::Candidate(_) => return,
|
GenericStatement::Candidate(_) => return,
|
||||||
GenericStatement::Valid(hash) => (hash, StatementTrace::Valid(statement.sender, hash)),
|
GenericStatement::Valid(hash) => (hash, StatementTrace::Valid(statement.sender.clone(), hash)),
|
||||||
GenericStatement::Invalid(hash) => (hash, StatementTrace::Invalid(statement.sender, hash)),
|
GenericStatement::Invalid(hash) => (hash, StatementTrace::Invalid(statement.sender.clone(), hash)),
|
||||||
};
|
};
|
||||||
|
|
||||||
if self.known_traces.insert(trace) {
|
if self.known_traces.insert(trace) {
|
||||||
@@ -443,8 +443,8 @@ impl DeferredStatements {
|
|||||||
for statement in deferred.iter() {
|
for statement in deferred.iter() {
|
||||||
let trace = match statement.statement {
|
let trace = match statement.statement {
|
||||||
GenericStatement::Candidate(_) => continue,
|
GenericStatement::Candidate(_) => continue,
|
||||||
GenericStatement::Valid(hash) => StatementTrace::Valid(statement.sender, hash),
|
GenericStatement::Valid(hash) => StatementTrace::Valid(statement.sender.clone(), hash),
|
||||||
GenericStatement::Invalid(hash) => StatementTrace::Invalid(statement.sender, hash),
|
GenericStatement::Invalid(hash) => StatementTrace::Invalid(statement.sender.clone(), hash),
|
||||||
};
|
};
|
||||||
|
|
||||||
self.known_traces.remove(&trace);
|
self.known_traces.remove(&trace);
|
||||||
@@ -512,19 +512,20 @@ impl<S> Future for ComputeIngress<S> where S: Stream<Item=IngressPair> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use substrate_primitives::H512;
|
use substrate_primitives::crypto::UncheckedInto;
|
||||||
use futures::stream;
|
use futures::stream;
|
||||||
|
use polkadot_primitives::parachain::ValidatorId;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn deferred_statements_works() {
|
fn deferred_statements_works() {
|
||||||
let mut deferred = DeferredStatements::new();
|
let mut deferred = DeferredStatements::new();
|
||||||
let hash = [1; 32].into();
|
let hash = [1; 32].into();
|
||||||
let sig = H512::from([2; 64]).into();
|
let sig = Default::default();
|
||||||
let sender = [255; 32].into();
|
let sender: ValidatorId = [255; 32].unchecked_into();
|
||||||
|
|
||||||
let statement = SignedStatement {
|
let statement = SignedStatement {
|
||||||
statement: GenericStatement::Valid(hash),
|
statement: GenericStatement::Valid(hash),
|
||||||
sender,
|
sender: sender.clone(),
|
||||||
signature: sig,
|
signature: sig,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ use validation::{ValidationSession, Knowledge};
|
|||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use polkadot_validation::GenericStatement;
|
use polkadot_validation::GenericStatement;
|
||||||
use polkadot_primitives::{Block, SessionKey};
|
use polkadot_primitives::{Block, SessionKey};
|
||||||
use polkadot_primitives::parachain::{CandidateReceipt, HeadData, BlockData};
|
use polkadot_primitives::parachain::{CandidateReceipt, HeadData, BlockData, CollatorId, ValidatorId};
|
||||||
use substrate_primitives::H512;
|
use substrate_primitives::crypto::UncheckedInto;
|
||||||
use codec::Encode;
|
use codec::Encode;
|
||||||
use substrate_network::{
|
use substrate_network::{
|
||||||
Severity, NodeIndex, PeerInfo, ClientHandle, Context, config::Roles,
|
Severity, NodeIndex, PeerInfo, ClientHandle, Context, config::Roles,
|
||||||
@@ -107,10 +107,10 @@ fn sends_session_key() {
|
|||||||
let peer_a = 1;
|
let peer_a = 1;
|
||||||
let peer_b = 2;
|
let peer_b = 2;
|
||||||
let parent_hash = [0; 32].into();
|
let parent_hash = [0; 32].into();
|
||||||
let local_key = [1; 32].into();
|
let local_key: ValidatorId = [1; 32].unchecked_into();
|
||||||
|
|
||||||
let validator_status = Status { collating_for: None };
|
let validator_status = Status { collating_for: None };
|
||||||
let collator_status = Status { collating_for: Some(([2; 32].into(), 5.into())) };
|
let collator_status = Status { collating_for: Some(([2; 32].unchecked_into(), 5.into())) };
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut ctx = TestContext::default();
|
let mut ctx = TestContext::default();
|
||||||
@@ -120,9 +120,9 @@ fn sends_session_key() {
|
|||||||
|
|
||||||
{
|
{
|
||||||
let mut ctx = TestContext::default();
|
let mut ctx = TestContext::default();
|
||||||
let (session, _knowledge) = make_validation_session(local_key);
|
let (session, _knowledge) = make_validation_session(local_key.clone());
|
||||||
protocol.new_validation_session(&mut ctx, parent_hash, session);
|
protocol.new_validation_session(&mut ctx, parent_hash, session);
|
||||||
assert!(ctx.has_message(peer_a, Message::SessionKey(local_key)));
|
assert!(ctx.has_message(peer_a, Message::SessionKey(local_key.clone())));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -139,15 +139,15 @@ fn fetches_from_those_with_knowledge() {
|
|||||||
let peer_a = 1;
|
let peer_a = 1;
|
||||||
let peer_b = 2;
|
let peer_b = 2;
|
||||||
let parent_hash = [0; 32].into();
|
let parent_hash = [0; 32].into();
|
||||||
let local_key = [1; 32].into();
|
let local_key: ValidatorId = [1; 32].unchecked_into();
|
||||||
|
|
||||||
let block_data = BlockData(vec![1, 2, 3, 4]);
|
let block_data = BlockData(vec![1, 2, 3, 4]);
|
||||||
let block_data_hash = block_data.hash();
|
let block_data_hash = block_data.hash();
|
||||||
let candidate_receipt = CandidateReceipt {
|
let candidate_receipt = CandidateReceipt {
|
||||||
parachain_index: 5.into(),
|
parachain_index: 5.into(),
|
||||||
collator: [255; 32].into(),
|
collator: [255; 32].unchecked_into(),
|
||||||
head_data: HeadData(vec![9, 9, 9]),
|
head_data: HeadData(vec![9, 9, 9]),
|
||||||
signature: H512::from([1; 64]).into(),
|
signature: Default::default(),
|
||||||
balance_uploads: Vec::new(),
|
balance_uploads: Vec::new(),
|
||||||
egress_queue_roots: Vec::new(),
|
egress_queue_roots: Vec::new(),
|
||||||
fees: 1_000_000,
|
fees: 1_000_000,
|
||||||
@@ -155,15 +155,15 @@ fn fetches_from_those_with_knowledge() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let candidate_hash = candidate_receipt.hash();
|
let candidate_hash = candidate_receipt.hash();
|
||||||
let a_key = [3; 32].into();
|
let a_key: ValidatorId = [3; 32].unchecked_into();
|
||||||
let b_key = [4; 32].into();
|
let b_key: ValidatorId = [4; 32].unchecked_into();
|
||||||
|
|
||||||
let status = Status { collating_for: None };
|
let status = Status { collating_for: None };
|
||||||
|
|
||||||
let (session, knowledge) = make_validation_session(local_key);
|
let (session, knowledge) = make_validation_session(local_key.clone());
|
||||||
protocol.new_validation_session(&mut TestContext::default(), parent_hash, session);
|
protocol.new_validation_session(&mut TestContext::default(), parent_hash, session);
|
||||||
|
|
||||||
knowledge.lock().note_statement(a_key, &GenericStatement::Valid(candidate_hash));
|
knowledge.lock().note_statement(a_key.clone(), &GenericStatement::Valid(candidate_hash));
|
||||||
let recv = protocol.fetch_block_data(&mut TestContext::default(), &candidate_receipt, parent_hash);
|
let recv = protocol.fetch_block_data(&mut TestContext::default(), &candidate_receipt, parent_hash);
|
||||||
|
|
||||||
// connect peer A
|
// connect peer A
|
||||||
@@ -176,12 +176,12 @@ fn fetches_from_those_with_knowledge() {
|
|||||||
// peer A gives session key and gets asked for data.
|
// peer A gives session key and gets asked for data.
|
||||||
{
|
{
|
||||||
let mut ctx = TestContext::default();
|
let mut ctx = TestContext::default();
|
||||||
on_message(&mut protocol, &mut ctx, peer_a, Message::SessionKey(a_key));
|
on_message(&mut protocol, &mut ctx, peer_a, Message::SessionKey(a_key.clone()));
|
||||||
assert!(protocol.validators.contains_key(&a_key));
|
assert!(protocol.validators.contains_key(&a_key));
|
||||||
assert!(ctx.has_message(peer_a, Message::RequestBlockData(1, parent_hash, candidate_hash)));
|
assert!(ctx.has_message(peer_a, Message::RequestBlockData(1, parent_hash, candidate_hash)));
|
||||||
}
|
}
|
||||||
|
|
||||||
knowledge.lock().note_statement(b_key, &GenericStatement::Valid(candidate_hash));
|
knowledge.lock().note_statement(b_key.clone(), &GenericStatement::Valid(candidate_hash));
|
||||||
|
|
||||||
// peer B connects and sends session key. request already assigned to A
|
// peer B connects and sends session key. request already assigned to A
|
||||||
{
|
{
|
||||||
@@ -221,9 +221,9 @@ fn fetches_available_block_data() {
|
|||||||
let para_id = 5.into();
|
let para_id = 5.into();
|
||||||
let candidate_receipt = CandidateReceipt {
|
let candidate_receipt = CandidateReceipt {
|
||||||
parachain_index: para_id,
|
parachain_index: para_id,
|
||||||
collator: [255; 32].into(),
|
collator: [255; 32].unchecked_into(),
|
||||||
head_data: HeadData(vec![9, 9, 9]),
|
head_data: HeadData(vec![9, 9, 9]),
|
||||||
signature: H512::from([1; 64]).into(),
|
signature: Default::default(),
|
||||||
balance_uploads: Vec::new(),
|
balance_uploads: Vec::new(),
|
||||||
egress_queue_roots: Vec::new(),
|
egress_queue_roots: Vec::new(),
|
||||||
fees: 1_000_000,
|
fees: 1_000_000,
|
||||||
@@ -264,9 +264,9 @@ fn remove_bad_collator() {
|
|||||||
let mut protocol = PolkadotProtocol::new(None);
|
let mut protocol = PolkadotProtocol::new(None);
|
||||||
|
|
||||||
let who = 1;
|
let who = 1;
|
||||||
let account_id = [2; 32].into();
|
let collator_id: CollatorId = [2; 32].unchecked_into();
|
||||||
|
|
||||||
let status = Status { collating_for: Some((account_id, 5.into())) };
|
let status = Status { collating_for: Some((collator_id.clone(), 5.into())) };
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut ctx = TestContext::default();
|
let mut ctx = TestContext::default();
|
||||||
@@ -275,7 +275,7 @@ fn remove_bad_collator() {
|
|||||||
|
|
||||||
{
|
{
|
||||||
let mut ctx = TestContext::default();
|
let mut ctx = TestContext::default();
|
||||||
protocol.disconnect_bad_collator(&mut ctx, account_id);
|
protocol.disconnect_bad_collator(&mut ctx, collator_id);
|
||||||
assert!(ctx.disabled.contains(&who));
|
assert!(ctx.disabled.contains(&who));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -287,16 +287,16 @@ fn many_session_keys() {
|
|||||||
let parent_a = [1; 32].into();
|
let parent_a = [1; 32].into();
|
||||||
let parent_b = [2; 32].into();
|
let parent_b = [2; 32].into();
|
||||||
|
|
||||||
let local_key_a = [3; 32].into();
|
let local_key_a: ValidatorId = [3; 32].unchecked_into();
|
||||||
let local_key_b = [4; 32].into();
|
let local_key_b: ValidatorId = [4; 32].unchecked_into();
|
||||||
|
|
||||||
let (session_a, _knowledge_a) = make_validation_session(local_key_a);
|
let (session_a, _knowledge_a) = make_validation_session(local_key_a.clone());
|
||||||
let (session_b, _knowledge_b) = make_validation_session(local_key_b);
|
let (session_b, _knowledge_b) = make_validation_session(local_key_b.clone());
|
||||||
|
|
||||||
protocol.new_validation_session(&mut TestContext::default(), parent_a, session_a);
|
protocol.new_validation_session(&mut TestContext::default(), parent_a, session_a);
|
||||||
protocol.new_validation_session(&mut TestContext::default(), parent_b, session_b);
|
protocol.new_validation_session(&mut TestContext::default(), parent_b, session_b);
|
||||||
|
|
||||||
assert_eq!(protocol.live_validation_sessions.recent_keys(), &[local_key_a, local_key_b]);
|
assert_eq!(protocol.live_validation_sessions.recent_keys(), &[local_key_a.clone(), local_key_b.clone()]);
|
||||||
|
|
||||||
let peer_a = 1;
|
let peer_a = 1;
|
||||||
|
|
||||||
@@ -307,8 +307,8 @@ fn many_session_keys() {
|
|||||||
let status = Status { collating_for: None };
|
let status = Status { collating_for: None };
|
||||||
protocol.on_connect(&mut ctx, peer_a, make_status(&status, Roles::AUTHORITY));
|
protocol.on_connect(&mut ctx, peer_a, make_status(&status, Roles::AUTHORITY));
|
||||||
|
|
||||||
assert!(ctx.has_message(peer_a, Message::SessionKey(local_key_a)));
|
assert!(ctx.has_message(peer_a, Message::SessionKey(local_key_a.clone())));
|
||||||
assert!(ctx.has_message(peer_a, Message::SessionKey(local_key_b)));
|
assert!(ctx.has_message(peer_a, Message::SessionKey(local_key_b.clone())));
|
||||||
}
|
}
|
||||||
|
|
||||||
let peer_b = 2;
|
let peer_b = 2;
|
||||||
|
|||||||
@@ -18,13 +18,14 @@
|
|||||||
|
|
||||||
use validation::NetworkService;
|
use validation::NetworkService;
|
||||||
use substrate_network::Context as NetContext;
|
use substrate_network::Context as NetContext;
|
||||||
use substrate_primitives::{Ed25519AuthorityId, NativeOrEncoded};
|
use substrate_primitives::NativeOrEncoded;
|
||||||
use substrate_keyring::Keyring;
|
use substrate_keyring::AuthorityKeyring;
|
||||||
use {PolkadotProtocol};
|
use {PolkadotProtocol};
|
||||||
|
|
||||||
use polkadot_validation::{SharedTable, MessagesFrom, Network, TableRouter};
|
use polkadot_validation::{SharedTable, MessagesFrom, Network, TableRouter};
|
||||||
use polkadot_primitives::{AccountId, Block, Hash, Header, BlockId};
|
use polkadot_primitives::{SessionKey, Block, Hash, Header, BlockId};
|
||||||
use polkadot_primitives::parachain::{Id as ParaId, Chain, DutyRoster, ParachainHost, OutgoingMessage};
|
use polkadot_primitives::parachain::{Id as ParaId, Chain, DutyRoster, ParachainHost, OutgoingMessage,
|
||||||
|
ValidatorId};
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use substrate_client::error::Result as ClientResult;
|
use substrate_client::error::Result as ClientResult;
|
||||||
use substrate_client::runtime_api::{Core, RuntimeVersion, ApiExt};
|
use substrate_client::runtime_api::{Core, RuntimeVersion, ApiExt};
|
||||||
@@ -154,7 +155,7 @@ impl NetworkService for TestNetwork {
|
|||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
struct ApiData {
|
struct ApiData {
|
||||||
validators: Vec<AccountId>,
|
validators: Vec<ValidatorId>,
|
||||||
duties: Vec<Chain>,
|
duties: Vec<Chain>,
|
||||||
active_parachains: Vec<ParaId>,
|
active_parachains: Vec<ParaId>,
|
||||||
ingress: HashMap<ParaId, Vec<(ParaId, Hash)>>,
|
ingress: HashMap<ParaId, Vec<(ParaId, Hash)>>,
|
||||||
@@ -194,7 +195,7 @@ impl Core<Block> for RuntimeApi {
|
|||||||
_: ExecutionContext,
|
_: ExecutionContext,
|
||||||
_: Option<()>,
|
_: Option<()>,
|
||||||
_: Vec<u8>,
|
_: Vec<u8>,
|
||||||
) -> ClientResult<NativeOrEncoded<Vec<Ed25519AuthorityId>>> {
|
) -> ClientResult<NativeOrEncoded<Vec<SessionKey>>> {
|
||||||
unimplemented!("Not required for testing!")
|
unimplemented!("Not required for testing!")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +240,7 @@ impl ParachainHost<Block> for RuntimeApi {
|
|||||||
_: ExecutionContext,
|
_: ExecutionContext,
|
||||||
_: Option<()>,
|
_: Option<()>,
|
||||||
_: Vec<u8>,
|
_: Vec<u8>,
|
||||||
) -> ClientResult<NativeOrEncoded<Vec<AccountId>>> {
|
) -> ClientResult<NativeOrEncoded<Vec<ValidatorId>>> {
|
||||||
Ok(NativeOrEncoded::Native(self.data.lock().validators.clone()))
|
Ok(NativeOrEncoded::Native(self.data.lock().validators.clone()))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,15 +373,14 @@ impl IngressBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_table(data: &ApiData, local_key: &Keyring, parent_hash: Hash) -> Arc<SharedTable> {
|
fn make_table(data: &ApiData, local_key: &AuthorityKeyring, parent_hash: Hash) -> Arc<SharedTable> {
|
||||||
use ::av_store::Store;
|
use ::av_store::Store;
|
||||||
|
|
||||||
let store = Store::new_in_memory();
|
let store = Store::new_in_memory();
|
||||||
let authorities: Vec<_> = data.validators.iter().map(|v| v.to_fixed_bytes().into()).collect();
|
|
||||||
let (group_info, _) = ::polkadot_validation::make_group_info(
|
let (group_info, _) = ::polkadot_validation::make_group_info(
|
||||||
DutyRoster { validator_duty: data.duties.clone() },
|
DutyRoster { validator_duty: data.duties.clone() },
|
||||||
&authorities,
|
&data.validators, // only possible as long as parachain crypto === aura crypto
|
||||||
local_key.to_raw_public().into()
|
SessionKey::from(*local_key)
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
||||||
Arc::new(SharedTable::new(
|
Arc::new(SharedTable::new(
|
||||||
@@ -400,9 +400,9 @@ fn ingress_fetch_works() {
|
|||||||
let id_b: ParaId = 2.into();
|
let id_b: ParaId = 2.into();
|
||||||
let id_c: ParaId = 3.into();
|
let id_c: ParaId = 3.into();
|
||||||
|
|
||||||
let key_a = Keyring::Alice;
|
let key_a = AuthorityKeyring::Alice;
|
||||||
let key_b = Keyring::Bob;
|
let key_b = AuthorityKeyring::Bob;
|
||||||
let key_c = Keyring::Charlie;
|
let key_c = AuthorityKeyring::Charlie;
|
||||||
|
|
||||||
let messages_from_a = vec![
|
let messages_from_a = vec![
|
||||||
OutgoingMessage { target: id_b, data: vec![1, 2, 3] },
|
OutgoingMessage { target: id_b, data: vec![1, 2, 3] },
|
||||||
@@ -432,16 +432,16 @@ fn ingress_fetch_works() {
|
|||||||
let parent_hash = [1; 32].into();
|
let parent_hash = [1; 32].into();
|
||||||
|
|
||||||
let (router_a, router_b, router_c) = {
|
let (router_a, router_b, router_c) = {
|
||||||
let validators: Vec<Hash> = vec![
|
let validators: Vec<ValidatorId> = vec![
|
||||||
key_a.to_raw_public().into(),
|
key_a.into(),
|
||||||
key_b.to_raw_public().into(),
|
key_b.into(),
|
||||||
key_c.to_raw_public().into(),
|
key_c.into(),
|
||||||
];
|
];
|
||||||
|
|
||||||
let authorities: Vec<_> = validators.iter().cloned()
|
// NOTE: this is possible only because we are currently asserting that parachain validators
|
||||||
.map(|h| h.to_fixed_bytes())
|
// share their crypto with the (Aura) authority set. Once that assumption breaks, so will this
|
||||||
.map(Ed25519AuthorityId)
|
// code.
|
||||||
.collect();
|
let authorities = validators.clone();
|
||||||
|
|
||||||
let mut api_handle = built.api_handle.lock();
|
let mut api_handle = built.api_handle.lock();
|
||||||
*api_handle = ApiData {
|
*api_handle = ApiData {
|
||||||
|
|||||||
@@ -22,8 +22,9 @@
|
|||||||
use sr_primitives::traits::ProvideRuntimeApi;
|
use sr_primitives::traits::ProvideRuntimeApi;
|
||||||
use substrate_network::Context as NetContext;
|
use substrate_network::Context as NetContext;
|
||||||
use polkadot_validation::{Network as ParachainNetwork, SharedTable, Collators, Statement, GenericStatement};
|
use polkadot_validation::{Network as ParachainNetwork, SharedTable, Collators, Statement, GenericStatement};
|
||||||
use polkadot_primitives::{AccountId, Block, Hash, SessionKey};
|
use polkadot_primitives::{Block, Hash};
|
||||||
use polkadot_primitives::parachain::{Id as ParaId, Collation, Extrinsic, ParachainHost, BlockData};
|
use polkadot_primitives::parachain::{Id as ParaId, Collation, Extrinsic, ParachainHost, BlockData, ValidatorId,
|
||||||
|
CollatorId};
|
||||||
use codec::Decode;
|
use codec::Decode;
|
||||||
|
|
||||||
use futures::prelude::*;
|
use futures::prelude::*;
|
||||||
@@ -208,7 +209,7 @@ impl<P, E, N, T> ParachainNetwork for ValidationNetwork<P, E, N, T> where
|
|||||||
&self,
|
&self,
|
||||||
table: Arc<SharedTable>,
|
table: Arc<SharedTable>,
|
||||||
outgoing: polkadot_validation::Outgoing,
|
outgoing: polkadot_validation::Outgoing,
|
||||||
authorities: &[SessionKey],
|
authorities: &[ValidatorId],
|
||||||
) -> Self::TableRouter {
|
) -> Self::TableRouter {
|
||||||
let parent_hash = table.consensus_parent_hash().clone();
|
let parent_hash = table.consensus_parent_hash().clone();
|
||||||
|
|
||||||
@@ -310,15 +311,15 @@ impl<P, E: Clone, N, T: Clone> Collators for ValidationNetwork<P, E, N, T> where
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn note_bad_collator(&self, collator: AccountId) {
|
fn note_bad_collator(&self, collator: CollatorId) {
|
||||||
self.network.with_spec(move |spec, ctx| spec.disconnect_bad_collator(ctx, collator));
|
self.network.with_spec(move |spec, ctx| spec.disconnect_bad_collator(ctx, collator));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
struct KnowledgeEntry {
|
struct KnowledgeEntry {
|
||||||
knows_block_data: Vec<SessionKey>,
|
knows_block_data: Vec<ValidatorId>,
|
||||||
knows_extrinsic: Vec<SessionKey>,
|
knows_extrinsic: Vec<ValidatorId>,
|
||||||
block_data: Option<BlockData>,
|
block_data: Option<BlockData>,
|
||||||
extrinsic: Option<Extrinsic>,
|
extrinsic: Option<Extrinsic>,
|
||||||
}
|
}
|
||||||
@@ -337,19 +338,19 @@ impl Knowledge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Note a statement seen from another validator.
|
/// Note a statement seen from another validator.
|
||||||
pub(crate) fn note_statement(&mut self, from: SessionKey, statement: &Statement) {
|
pub(crate) fn note_statement(&mut self, from: ValidatorId, statement: &Statement) {
|
||||||
// those proposing the candidate or declaring it valid know everything.
|
// those proposing the candidate or declaring it valid know everything.
|
||||||
// those claiming it invalid do not have the extrinsic data as it is
|
// those claiming it invalid do not have the extrinsic data as it is
|
||||||
// generated by valid execution.
|
// generated by valid execution.
|
||||||
match *statement {
|
match *statement {
|
||||||
GenericStatement::Candidate(ref c) => {
|
GenericStatement::Candidate(ref c) => {
|
||||||
let mut entry = self.candidates.entry(c.hash()).or_insert_with(Default::default);
|
let mut entry = self.candidates.entry(c.hash()).or_insert_with(Default::default);
|
||||||
entry.knows_block_data.push(from);
|
entry.knows_block_data.push(from.clone());
|
||||||
entry.knows_extrinsic.push(from);
|
entry.knows_extrinsic.push(from);
|
||||||
}
|
}
|
||||||
GenericStatement::Valid(ref hash) => {
|
GenericStatement::Valid(ref hash) => {
|
||||||
let mut entry = self.candidates.entry(*hash).or_insert_with(Default::default);
|
let mut entry = self.candidates.entry(*hash).or_insert_with(Default::default);
|
||||||
entry.knows_block_data.push(from);
|
entry.knows_block_data.push(from.clone());
|
||||||
entry.knows_extrinsic.push(from);
|
entry.knows_extrinsic.push(from);
|
||||||
}
|
}
|
||||||
GenericStatement::Invalid(ref hash) => self.candidates.entry(*hash)
|
GenericStatement::Invalid(ref hash) => self.candidates.entry(*hash)
|
||||||
@@ -370,12 +371,12 @@ impl Knowledge {
|
|||||||
/// A current validation session instance.
|
/// A current validation session instance.
|
||||||
pub(crate) struct ValidationSession {
|
pub(crate) struct ValidationSession {
|
||||||
knowledge: Arc<Mutex<Knowledge>>,
|
knowledge: Arc<Mutex<Knowledge>>,
|
||||||
local_session_key: SessionKey,
|
local_session_key: ValidatorId,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ValidationSession {
|
impl ValidationSession {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub(crate) fn new(knowledge: Arc<Mutex<Knowledge>>, local_session_key: SessionKey) -> Self {
|
pub(crate) fn new(knowledge: Arc<Mutex<Knowledge>>, local_session_key: ValidatorId) -> Self {
|
||||||
ValidationSession {
|
ValidationSession {
|
||||||
knowledge,
|
knowledge,
|
||||||
local_session_key
|
local_session_key
|
||||||
@@ -385,7 +386,7 @@ impl ValidationSession {
|
|||||||
// execute a closure with locally stored block data for a candidate, or a slice of session identities
|
// execute a closure with locally stored block data for a candidate, or a slice of session identities
|
||||||
// we believe should have the data.
|
// we believe should have the data.
|
||||||
fn with_block_data<F, U>(&self, hash: &Hash, f: F) -> U
|
fn with_block_data<F, U>(&self, hash: &Hash, f: F) -> U
|
||||||
where F: FnOnce(Result<&BlockData, &[SessionKey]>) -> U
|
where F: FnOnce(Result<&BlockData, &[ValidatorId]>) -> U
|
||||||
{
|
{
|
||||||
let knowledge = self.knowledge.lock();
|
let knowledge = self.knowledge.lock();
|
||||||
let res = knowledge.candidates.get(hash)
|
let res = knowledge.candidates.get(hash)
|
||||||
@@ -407,19 +408,19 @@ pub(crate) enum InsertedRecentKey {
|
|||||||
/// Key was already known.
|
/// Key was already known.
|
||||||
AlreadyKnown,
|
AlreadyKnown,
|
||||||
/// Key was new and pushed out optional old item.
|
/// Key was new and pushed out optional old item.
|
||||||
New(Option<SessionKey>),
|
New(Option<ValidatorId>),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wrapper for managing recent session keys.
|
/// Wrapper for managing recent session keys.
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub(crate) struct RecentSessionKeys {
|
pub(crate) struct RecentValidatorIds {
|
||||||
inner: ArrayVec<[SessionKey; RECENT_SESSIONS]>,
|
inner: ArrayVec<[ValidatorId; RECENT_SESSIONS]>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RecentSessionKeys {
|
impl RecentValidatorIds {
|
||||||
/// Insert a new session key. This returns one to be pushed out if the
|
/// Insert a new session key. This returns one to be pushed out if the
|
||||||
/// set is full.
|
/// set is full.
|
||||||
pub(crate) fn insert(&mut self, key: SessionKey) -> InsertedRecentKey {
|
pub(crate) fn insert(&mut self, key: ValidatorId) -> InsertedRecentKey {
|
||||||
if self.inner.contains(&key) { return InsertedRecentKey::AlreadyKnown }
|
if self.inner.contains(&key) { return InsertedRecentKey::AlreadyKnown }
|
||||||
|
|
||||||
let old = if self.inner.len() == RECENT_SESSIONS {
|
let old = if self.inner.len() == RECENT_SESSIONS {
|
||||||
@@ -433,11 +434,11 @@ impl RecentSessionKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// As a slice.
|
/// As a slice.
|
||||||
pub(crate) fn as_slice(&self) -> &[SessionKey] {
|
pub(crate) fn as_slice(&self) -> &[ValidatorId] {
|
||||||
&*self.inner
|
&*self.inner
|
||||||
}
|
}
|
||||||
|
|
||||||
fn remove(&mut self, key: &SessionKey) {
|
fn remove(&mut self, key: &ValidatorId) {
|
||||||
self.inner.retain(|k| k != key)
|
self.inner.retain(|k| k != key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -445,7 +446,7 @@ impl RecentSessionKeys {
|
|||||||
/// Manages requests and keys for live validation session instances.
|
/// Manages requests and keys for live validation session instances.
|
||||||
pub(crate) struct LiveValidationSessions {
|
pub(crate) struct LiveValidationSessions {
|
||||||
// recent local session keys.
|
// recent local session keys.
|
||||||
recent: RecentSessionKeys,
|
recent: RecentValidatorIds,
|
||||||
// live validation session instances, on `parent_hash`.
|
// live validation session instances, on `parent_hash`.
|
||||||
live_instances: HashMap<Hash, ValidationSession>,
|
live_instances: HashMap<Hash, ValidationSession>,
|
||||||
}
|
}
|
||||||
@@ -465,10 +466,10 @@ impl LiveValidationSessions {
|
|||||||
&mut self,
|
&mut self,
|
||||||
parent_hash: Hash,
|
parent_hash: Hash,
|
||||||
session: ValidationSession,
|
session: ValidationSession,
|
||||||
) -> Option<SessionKey> {
|
) -> Option<ValidatorId> {
|
||||||
let inserted_key = self.recent.insert(session.local_session_key);
|
let inserted_key = self.recent.insert(session.local_session_key.clone());
|
||||||
let maybe_new = if let InsertedRecentKey::New(_) = inserted_key {
|
let maybe_new = if let InsertedRecentKey::New(_) = inserted_key {
|
||||||
Some(session.local_session_key)
|
Some(session.local_session_key.clone())
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
@@ -491,7 +492,7 @@ impl LiveValidationSessions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Recent session keys as a slice.
|
/// Recent session keys as a slice.
|
||||||
pub(crate) fn recent_keys(&self) -> &[SessionKey] {
|
pub(crate) fn recent_keys(&self) -> &[ValidatorId] {
|
||||||
self.recent.as_slice()
|
self.recent.as_slice()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -501,7 +502,7 @@ impl LiveValidationSessions {
|
|||||||
/// `Err(Some(keys))` when the session is live but the data unknown, with a list of keys
|
/// `Err(Some(keys))` when the session is live but the data unknown, with a list of keys
|
||||||
/// who have the data, and `Err(None)` where the session is unknown.
|
/// who have the data, and `Err(None)` where the session is unknown.
|
||||||
pub(crate) fn with_block_data<F, U>(&self, parent_hash: &Hash, c_hash: &Hash, f: F) -> U
|
pub(crate) fn with_block_data<F, U>(&self, parent_hash: &Hash, c_hash: &Hash, f: F) -> U
|
||||||
where F: FnOnce(Result<&BlockData, Option<&[SessionKey]>>) -> U
|
where F: FnOnce(Result<&BlockData, Option<&[ValidatorId]>>) -> U
|
||||||
{
|
{
|
||||||
match self.live_instances.get(parent_hash) {
|
match self.live_instances.get(parent_hash) {
|
||||||
Some(c) => c.with_block_data(c_hash, |res| f(res.map_err(Some))),
|
Some(c) => c.with_block_data(c_hash, |res| f(res.map_err(Some))),
|
||||||
@@ -513,27 +514,28 @@ impl LiveValidationSessions {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use substrate_primitives::crypto::UncheckedInto;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn last_keys_works() {
|
fn last_keys_works() {
|
||||||
let a = [1; 32].into();
|
let a: ValidatorId = [1; 32].unchecked_into();
|
||||||
let b = [2; 32].into();
|
let b: ValidatorId = [2; 32].unchecked_into();
|
||||||
let c = [3; 32].into();
|
let c: ValidatorId = [3; 32].unchecked_into();
|
||||||
let d = [4; 32].into();
|
let d: ValidatorId = [4; 32].unchecked_into();
|
||||||
|
|
||||||
let mut recent = RecentSessionKeys::default();
|
let mut recent = RecentValidatorIds::default();
|
||||||
|
|
||||||
match recent.insert(a) {
|
match recent.insert(a.clone()) {
|
||||||
InsertedRecentKey::New(None) => {},
|
InsertedRecentKey::New(None) => {},
|
||||||
_ => panic!("is new, not at capacity"),
|
_ => panic!("is new, not at capacity"),
|
||||||
}
|
}
|
||||||
|
|
||||||
match recent.insert(a) {
|
match recent.insert(a.clone()) {
|
||||||
InsertedRecentKey::AlreadyKnown => {},
|
InsertedRecentKey::AlreadyKnown => {},
|
||||||
_ => panic!("not new"),
|
_ => panic!("not new"),
|
||||||
}
|
}
|
||||||
|
|
||||||
match recent.insert(b) {
|
match recent.insert(b.clone()) {
|
||||||
InsertedRecentKey::New(None) => {},
|
InsertedRecentKey::New(None) => {},
|
||||||
_ => panic!("is new, not at capacity"),
|
_ => panic!("is new, not at capacity"),
|
||||||
}
|
}
|
||||||
@@ -543,7 +545,7 @@ mod tests {
|
|||||||
_ => panic!("not new"),
|
_ => panic!("not new"),
|
||||||
}
|
}
|
||||||
|
|
||||||
match recent.insert(c) {
|
match recent.insert(c.clone()) {
|
||||||
InsertedRecentKey::New(None) => {},
|
InsertedRecentKey::New(None) => {},
|
||||||
_ => panic!("is new, not at capacity"),
|
_ => panic!("is new, not at capacity"),
|
||||||
}
|
}
|
||||||
@@ -553,7 +555,7 @@ mod tests {
|
|||||||
_ => panic!("not new"),
|
_ => panic!("not new"),
|
||||||
}
|
}
|
||||||
|
|
||||||
match recent.insert(d) {
|
match recent.insert(d.clone()) {
|
||||||
InsertedRecentKey::New(Some(old)) => assert_eq!(old, a),
|
InsertedRecentKey::New(Some(old)) => assert_eq!(old, a),
|
||||||
_ => panic!("is new, and at capacity"),
|
_ => panic!("is new, and at capacity"),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ extern crate substrate_client;
|
|||||||
use rstd::prelude::*;
|
use rstd::prelude::*;
|
||||||
use runtime_primitives::{generic, traits::Extrinsic};
|
use runtime_primitives::{generic, traits::Extrinsic};
|
||||||
|
|
||||||
pub use runtime_primitives::traits::{BlakeTwo256, Hash as HashT};
|
pub use runtime_primitives::traits::{BlakeTwo256, Hash as HashT, Verify};
|
||||||
|
use primitives::{ed25519, sr25519};
|
||||||
|
|
||||||
pub mod parachain;
|
pub mod parachain;
|
||||||
|
|
||||||
@@ -61,16 +62,22 @@ use primitives::bytes;
|
|||||||
/// TODO: switch to u32
|
/// TODO: switch to u32
|
||||||
pub type BlockNumber = u64;
|
pub type BlockNumber = u64;
|
||||||
|
|
||||||
|
/// Alias to 512-bit hash when used in the context of a signature on the relay chain.
|
||||||
|
/// Equipped with logic for possibly "unsigned" messages.
|
||||||
|
pub type Signature = sr25519::Signature;
|
||||||
|
|
||||||
/// Alias to Ed25519 pubkey that identifies an account on the relay chain.
|
/// Alias to Ed25519 pubkey that identifies an account on the relay chain.
|
||||||
pub type AccountId = primitives::hash::H256;
|
pub type AccountId = sr25519::Public;
|
||||||
|
|
||||||
/// The type for looking up accounts. We don't expect more than 4 billion of them, but you
|
/// The type for looking up accounts. We don't expect more than 4 billion of them, but you
|
||||||
/// never know...
|
/// never know...
|
||||||
pub type AccountIndex = u32;
|
pub type AccountIndex = u32;
|
||||||
|
|
||||||
/// The Ed25519 pub key of an session that belongs to an authority of the relay chain. This is
|
/// Signature with which authorities sign blocks.
|
||||||
/// exactly equivalent to what the substrate calls an "authority".
|
pub type SessionSignature = ed25519::Signature;
|
||||||
pub type SessionKey = primitives::Ed25519AuthorityId;
|
|
||||||
|
/// Identity that authorities use.
|
||||||
|
pub type SessionKey = ed25519::Public;
|
||||||
|
|
||||||
/// Indentifier for a chain. 32-bit should be plenty.
|
/// Indentifier for a chain. 32-bit should be plenty.
|
||||||
pub type ChainId = u32;
|
pub type ChainId = u32;
|
||||||
@@ -81,10 +88,6 @@ pub type Hash = primitives::H256;
|
|||||||
/// Index of a transaction in the relay chain. 32-bit should be plenty.
|
/// Index of a transaction in the relay chain. 32-bit should be plenty.
|
||||||
pub type Nonce = u64;
|
pub type Nonce = u64;
|
||||||
|
|
||||||
/// Alias to 512-bit hash when used in the context of a signature on the relay chain.
|
|
||||||
/// Equipped with logic for possibly "unsigned" messages.
|
|
||||||
pub type Signature = runtime_primitives::Ed25519Signature;
|
|
||||||
|
|
||||||
/// The balance of an account.
|
/// The balance of an account.
|
||||||
/// 128-bits (or 38 significant decimal figures) will allow for 10m currency (10^7) at a resolution
|
/// 128-bits (or 38 significant decimal figures) will allow for 10m currency (10^7) at a resolution
|
||||||
/// to all for one second's worth of an annualised 50% reward be paid to a unit holder (10^11 unit
|
/// to all for one second's worth of an annualised 50% reward be paid to a unit holder (10^11 unit
|
||||||
@@ -95,7 +98,7 @@ pub type Signature = runtime_primitives::Ed25519Signature;
|
|||||||
pub type Balance = u128;
|
pub type Balance = u128;
|
||||||
|
|
||||||
/// Header type.
|
/// Header type.
|
||||||
pub type Header = generic::Header<BlockNumber, BlakeTwo256, generic::DigestItem<Hash, SessionKey>>;
|
pub type Header = generic::Header<BlockNumber, BlakeTwo256, generic::DigestItem<Hash, SessionKey, SessionSignature>>;
|
||||||
/// Block type.
|
/// Block type.
|
||||||
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
|
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
|
||||||
/// Block ID.
|
/// Block ID.
|
||||||
|
|||||||
@@ -18,17 +18,30 @@
|
|||||||
|
|
||||||
use rstd::prelude::*;
|
use rstd::prelude::*;
|
||||||
use rstd::cmp::Ordering;
|
use rstd::cmp::Ordering;
|
||||||
use super::{Hash, SessionKey};
|
use super::Hash;
|
||||||
|
|
||||||
use {AccountId};
|
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
use primitives::bytes;
|
use primitives::bytes;
|
||||||
|
use primitives::ed25519;
|
||||||
|
|
||||||
pub use polkadot_parachain::Id;
|
pub use polkadot_parachain::Id;
|
||||||
|
|
||||||
/// Signature on candidate's block data by a collator.
|
/// Identity that collators use.
|
||||||
pub type CandidateSignature = ::runtime_primitives::Ed25519Signature;
|
pub type CollatorId = ed25519::Public;
|
||||||
|
|
||||||
|
/// Signature with which collators sign blocks.
|
||||||
|
pub type CollatorSignature = ed25519::Signature;
|
||||||
|
|
||||||
|
/// Identity that parachain validators use when signing validation messages.
|
||||||
|
///
|
||||||
|
/// For now we assert that parachain validator set is exactly equivalent to the (Aura) authority set, and
|
||||||
|
/// so we define it to be the same type as `SessionKey`. In the future it may have different crypto.
|
||||||
|
pub type ValidatorId = super::SessionKey;
|
||||||
|
|
||||||
|
/// Signature with which parachain validators sign blocks.
|
||||||
|
///
|
||||||
|
/// For now we assert that parachain validator set is exactly equivalent to the (Aura) authority set, and
|
||||||
|
/// so we define it to be the same type as `SessionKey`. In the future it may have different crypto.
|
||||||
|
pub type ValidatorSignature = super::SessionSignature;
|
||||||
|
|
||||||
/// Identifier for a chain, either one of a number of parachains or the relay chain.
|
/// Identifier for a chain, either one of a number of parachains or the relay chain.
|
||||||
#[derive(Copy, Clone, PartialEq, Encode, Decode)]
|
#[derive(Copy, Clone, PartialEq, Encode, Decode)]
|
||||||
@@ -89,16 +102,14 @@ pub struct Extrinsic {
|
|||||||
|
|
||||||
/// Candidate receipt type.
|
/// Candidate receipt type.
|
||||||
#[derive(PartialEq, Eq, Clone, Encode, Decode)]
|
#[derive(PartialEq, Eq, Clone, Encode, Decode)]
|
||||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))]
|
#[cfg_attr(feature = "std", derive(Debug))]
|
||||||
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
|
|
||||||
#[cfg_attr(feature = "std", serde(deny_unknown_fields))]
|
|
||||||
pub struct CandidateReceipt {
|
pub struct CandidateReceipt {
|
||||||
/// The ID of the parachain this is a candidate for.
|
/// The ID of the parachain this is a candidate for.
|
||||||
pub parachain_index: Id,
|
pub parachain_index: Id,
|
||||||
/// The collator's relay-chain account ID
|
/// The collator's signing ID
|
||||||
pub collator: super::AccountId,
|
pub collator: CollatorId,
|
||||||
/// Signature on blake2-256 of the block data by collator.
|
/// Signature on blake2-256 of the block data by collator.
|
||||||
pub signature: CandidateSignature,
|
pub signature: CollatorSignature,
|
||||||
/// The head-data
|
/// The head-data
|
||||||
pub head_data: HeadData,
|
pub head_data: HeadData,
|
||||||
/// Balance uploads to the relay chain.
|
/// Balance uploads to the relay chain.
|
||||||
@@ -147,9 +158,7 @@ impl Ord for CandidateReceipt {
|
|||||||
|
|
||||||
/// A full collation.
|
/// A full collation.
|
||||||
#[derive(PartialEq, Eq, Clone, Encode, Decode)]
|
#[derive(PartialEq, Eq, Clone, Encode, Decode)]
|
||||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))]
|
#[cfg_attr(feature = "std", derive(Debug))]
|
||||||
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
|
|
||||||
#[cfg_attr(feature = "std", serde(deny_unknown_fields))]
|
|
||||||
pub struct Collation {
|
pub struct Collation {
|
||||||
/// Block data.
|
/// Block data.
|
||||||
pub block_data: BlockData,
|
pub block_data: BlockData,
|
||||||
@@ -228,11 +237,11 @@ pub enum ValidityAttestation {
|
|||||||
/// implicit validity attestation by issuing.
|
/// implicit validity attestation by issuing.
|
||||||
/// This corresponds to issuance of a `Candidate` statement.
|
/// This corresponds to issuance of a `Candidate` statement.
|
||||||
#[codec(index = "1")]
|
#[codec(index = "1")]
|
||||||
Implicit(CandidateSignature),
|
Implicit(CollatorSignature),
|
||||||
/// An explicit attestation. This corresponds to issuance of a
|
/// An explicit attestation. This corresponds to issuance of a
|
||||||
/// `Valid` statement.
|
/// `Valid` statement.
|
||||||
#[codec(index = "2")]
|
#[codec(index = "2")]
|
||||||
Explicit(CandidateSignature),
|
Explicit(CollatorSignature),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An attested candidate.
|
/// An attested candidate.
|
||||||
@@ -242,7 +251,7 @@ pub struct AttestedCandidate {
|
|||||||
/// The candidate data.
|
/// The candidate data.
|
||||||
pub candidate: CandidateReceipt,
|
pub candidate: CandidateReceipt,
|
||||||
/// Validity attestations.
|
/// Validity attestations.
|
||||||
pub validity_votes: Vec<(SessionKey, ValidityAttestation)>,
|
pub validity_votes: Vec<(ValidatorId, ValidityAttestation)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AttestedCandidate {
|
impl AttestedCandidate {
|
||||||
@@ -261,7 +270,7 @@ decl_runtime_apis! {
|
|||||||
/// The API for querying the state of parachains on-chain.
|
/// The API for querying the state of parachains on-chain.
|
||||||
pub trait ParachainHost {
|
pub trait ParachainHost {
|
||||||
/// Get the current validators.
|
/// Get the current validators.
|
||||||
fn validators() -> Vec<AccountId>;
|
fn validators() -> Vec<ValidatorId>;
|
||||||
/// Get the current duty roster.
|
/// Get the current duty roster.
|
||||||
fn duty_roster() -> DutyRoster;
|
fn duty_roster() -> DutyRoster;
|
||||||
/// Get the currently active parachains.
|
/// Get the currently active parachains.
|
||||||
|
|||||||
@@ -78,8 +78,8 @@ mod claims;
|
|||||||
use rstd::prelude::*;
|
use rstd::prelude::*;
|
||||||
use substrate_primitives::u32_trait::{_2, _4};
|
use substrate_primitives::u32_trait::{_2, _4};
|
||||||
use primitives::{
|
use primitives::{
|
||||||
AccountId, AccountIndex, Balance, BlockNumber, Hash, Nonce, SessionKey, Signature,
|
AccountId, AccountIndex, Balance, BlockNumber, Hash, Nonce, SessionKey, SessionSignature,
|
||||||
parachain,
|
Signature, parachain,
|
||||||
};
|
};
|
||||||
use client::{
|
use client::{
|
||||||
block_builder::api::{self as block_builder_api, InherentData, CheckInherentsResult},
|
block_builder::api::{self as block_builder_api, InherentData, CheckInherentsResult},
|
||||||
@@ -87,7 +87,7 @@ use client::{
|
|||||||
};
|
};
|
||||||
use sr_primitives::{
|
use sr_primitives::{
|
||||||
ApplyResult, generic, transaction_validity::TransactionValidity,
|
ApplyResult, generic, transaction_validity::TransactionValidity,
|
||||||
traits::{Convert, BlakeTwo256, Block as BlockT, DigestFor, StaticLookup}
|
traits::{BlakeTwo256, Block as BlockT, DigestFor, StaticLookup}
|
||||||
};
|
};
|
||||||
use version::RuntimeVersion;
|
use version::RuntimeVersion;
|
||||||
use grandpa::fg_primitives::{self, ScheduledChange};
|
use grandpa::fg_primitives::{self, ScheduledChange};
|
||||||
@@ -98,6 +98,8 @@ use council::seats as council_seats;
|
|||||||
use version::NativeVersion;
|
use version::NativeVersion;
|
||||||
use substrate_primitives::OpaqueMetadata;
|
use substrate_primitives::OpaqueMetadata;
|
||||||
|
|
||||||
|
#[cfg(feature = "std")]
|
||||||
|
pub use staking::StakerStatus;
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
pub use sr_primitives::BuildStorage;
|
pub use sr_primitives::BuildStorage;
|
||||||
pub use consensus::Call as ConsensusCall;
|
pub use consensus::Call as ConsensusCall;
|
||||||
@@ -173,16 +175,8 @@ impl timestamp::Trait for Runtime {
|
|||||||
type OnTimestampSet = Aura;
|
type OnTimestampSet = Aura;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Session key conversion.
|
|
||||||
pub struct SessionKeyConversion;
|
|
||||||
impl Convert<AccountId, SessionKey> for SessionKeyConversion {
|
|
||||||
fn convert(a: AccountId) -> SessionKey {
|
|
||||||
a.to_fixed_bytes().into()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl session::Trait for Runtime {
|
impl session::Trait for Runtime {
|
||||||
type ConvertAccountIdToSessionKey = SessionKeyConversion;
|
type ConvertAccountIdToSessionKey = ();
|
||||||
type OnSessionChange = (Staking, grandpa::SyncedAuthorities<Runtime>);
|
type OnSessionChange = (Staking, grandpa::SyncedAuthorities<Runtime>);
|
||||||
type Event = Event;
|
type Event = Event;
|
||||||
}
|
}
|
||||||
@@ -244,7 +238,7 @@ impl fees::Trait for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
construct_runtime!(
|
construct_runtime!(
|
||||||
pub enum Runtime with Log(InternalLog: DigestItem<Hash, SessionKey>) where
|
pub enum Runtime with Log(InternalLog: DigestItem<Hash, SessionKey, SessionSignature>) where
|
||||||
Block = Block,
|
Block = Block,
|
||||||
NodeBlock = primitives::Block,
|
NodeBlock = primitives::Block,
|
||||||
UncheckedExtrinsic = UncheckedExtrinsic
|
UncheckedExtrinsic = UncheckedExtrinsic
|
||||||
@@ -343,8 +337,8 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl parachain::ParachainHost<Block> for Runtime {
|
impl parachain::ParachainHost<Block> for Runtime {
|
||||||
fn validators() -> Vec<AccountId> {
|
fn validators() -> Vec<parachain::ValidatorId> {
|
||||||
Session::validators()
|
Consensus::authorities() // only possible as long as parachain validator crypto === aura crypto
|
||||||
}
|
}
|
||||||
fn duty_roster() -> parachain::DutyRoster {
|
fn duty_roster() -> parachain::DutyRoster {
|
||||||
Parachains::calculate_duty_roster()
|
Parachains::calculate_duty_roster()
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ impl<T: Trait> Module<T> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ensure!(
|
ensure!(
|
||||||
sig.verify(&payload[..], &auth_id.0.into()),
|
sig.verify(&payload[..], &auth_id),
|
||||||
"Candidate validity attestation signature is bad."
|
"Candidate validity attestation signature is bad."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -468,7 +468,7 @@ mod tests {
|
|||||||
use sr_primitives::{generic, BuildStorage};
|
use sr_primitives::{generic, BuildStorage};
|
||||||
use sr_primitives::traits::{BlakeTwo256, IdentityLookup};
|
use sr_primitives::traits::{BlakeTwo256, IdentityLookup};
|
||||||
use primitives::{parachain::{CandidateReceipt, HeadData, ValidityAttestation}, SessionKey};
|
use primitives::{parachain::{CandidateReceipt, HeadData, ValidityAttestation}, SessionKey};
|
||||||
use keyring::Keyring;
|
use keyring::{AuthorityKeyring, AccountKeyring};
|
||||||
use {consensus, timestamp};
|
use {consensus, timestamp};
|
||||||
|
|
||||||
impl_outer_origin! {
|
impl_outer_origin! {
|
||||||
@@ -496,7 +496,7 @@ mod tests {
|
|||||||
type Log = ::Log;
|
type Log = ::Log;
|
||||||
}
|
}
|
||||||
impl session::Trait for Test {
|
impl session::Trait for Test {
|
||||||
type ConvertAccountIdToSessionKey = ::SessionKeyConversion;
|
type ConvertAccountIdToSessionKey = ();
|
||||||
type OnSessionChange = ();
|
type OnSessionChange = ();
|
||||||
type Event = ();
|
type Event = ();
|
||||||
}
|
}
|
||||||
@@ -511,23 +511,33 @@ mod tests {
|
|||||||
fn new_test_ext(parachains: Vec<(ParaId, Vec<u8>, Vec<u8>)>) -> TestExternalities<Blake2Hasher> {
|
fn new_test_ext(parachains: Vec<(ParaId, Vec<u8>, Vec<u8>)>) -> TestExternalities<Blake2Hasher> {
|
||||||
let mut t = system::GenesisConfig::<Test>::default().build_storage().unwrap().0;
|
let mut t = system::GenesisConfig::<Test>::default().build_storage().unwrap().0;
|
||||||
let authority_keys = [
|
let authority_keys = [
|
||||||
Keyring::Alice,
|
AuthorityKeyring::Alice,
|
||||||
Keyring::Bob,
|
AuthorityKeyring::Bob,
|
||||||
Keyring::Charlie,
|
AuthorityKeyring::Charlie,
|
||||||
Keyring::Dave,
|
AuthorityKeyring::Dave,
|
||||||
Keyring::Eve,
|
AuthorityKeyring::Eve,
|
||||||
Keyring::Ferdie,
|
AuthorityKeyring::Ferdie,
|
||||||
Keyring::One,
|
AuthorityKeyring::One,
|
||||||
Keyring::Two,
|
AuthorityKeyring::Two,
|
||||||
|
];
|
||||||
|
let validator_keys = [
|
||||||
|
AccountKeyring::Alice,
|
||||||
|
AccountKeyring::Bob,
|
||||||
|
AccountKeyring::Charlie,
|
||||||
|
AccountKeyring::Dave,
|
||||||
|
AccountKeyring::Eve,
|
||||||
|
AccountKeyring::Ferdie,
|
||||||
|
AccountKeyring::One,
|
||||||
|
AccountKeyring::Two,
|
||||||
];
|
];
|
||||||
|
|
||||||
t.extend(consensus::GenesisConfig::<Test>{
|
t.extend(consensus::GenesisConfig::<Test>{
|
||||||
code: vec![],
|
code: vec![],
|
||||||
authorities: authority_keys.iter().map(|k| k.to_raw_public().into()).collect(),
|
authorities: authority_keys.iter().map(|k| SessionKey::from(*k)).collect(),
|
||||||
}.build_storage().unwrap().0);
|
}.build_storage().unwrap().0);
|
||||||
t.extend(session::GenesisConfig::<Test>{
|
t.extend(session::GenesisConfig::<Test>{
|
||||||
session_length: 1000,
|
session_length: 1000,
|
||||||
validators: authority_keys.iter().map(|k| k.to_raw_public().into()).collect(),
|
validators: validator_keys.iter().map(|k| ::AccountId::from(*k)).collect(),
|
||||||
keys: vec![],
|
keys: vec![],
|
||||||
}.build_storage().unwrap().0);
|
}.build_storage().unwrap().0);
|
||||||
t.extend(GenesisConfig::<Test>{
|
t.extend(GenesisConfig::<Test>{
|
||||||
@@ -545,8 +555,8 @@ mod tests {
|
|||||||
let candidate_hash = candidate.candidate.hash();
|
let candidate_hash = candidate.candidate.hash();
|
||||||
|
|
||||||
let authorities = ::Consensus::authorities();
|
let authorities = ::Consensus::authorities();
|
||||||
let extract_key = |public: SessionKey| {
|
let extract_key = |public: &SessionKey| {
|
||||||
Keyring::from_raw_public(public.0).unwrap()
|
AuthorityKeyring::from_public(public).unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
let validation_entries = duty_roster.validator_duty.iter()
|
let validation_entries = duty_roster.validator_duty.iter()
|
||||||
@@ -556,7 +566,7 @@ mod tests {
|
|||||||
if duty != Chain::Parachain(candidate.parachain_index()) { continue }
|
if duty != Chain::Parachain(candidate.parachain_index()) { continue }
|
||||||
vote_implicit = !vote_implicit;
|
vote_implicit = !vote_implicit;
|
||||||
|
|
||||||
let key = extract_key(authorities[idx]);
|
let key = extract_key(&authorities[idx]);
|
||||||
|
|
||||||
let statement = if vote_implicit {
|
let statement = if vote_implicit {
|
||||||
Statement::Candidate(candidate.candidate.clone())
|
Statement::Candidate(candidate.candidate.clone())
|
||||||
@@ -567,7 +577,7 @@ mod tests {
|
|||||||
let payload = localized_payload(statement, parent_hash);
|
let payload = localized_payload(statement, parent_hash);
|
||||||
let signature = key.sign(&payload[..]).into();
|
let signature = key.sign(&payload[..]).into();
|
||||||
|
|
||||||
candidate.validity_votes.push((authorities[idx], if vote_implicit {
|
candidate.validity_votes.push((authorities[idx].clone(), if vote_implicit {
|
||||||
ValidityAttestation::Implicit(signature)
|
ValidityAttestation::Implicit(signature)
|
||||||
} else {
|
} else {
|
||||||
ValidityAttestation::Explicit(signature)
|
ValidityAttestation::Explicit(signature)
|
||||||
|
|||||||
Generated
+596
-346
File diff suppressed because it is too large
Load Diff
@@ -16,16 +16,15 @@
|
|||||||
|
|
||||||
//! Polkadot chain configurations.
|
//! Polkadot chain configurations.
|
||||||
|
|
||||||
use primitives::{Ed25519AuthorityId as AuthorityId, ed25519};
|
use primitives::{ed25519, sr25519, Pair, crypto::UncheckedInto};
|
||||||
use polkadot_primitives::AccountId;
|
use polkadot_primitives::{AccountId, SessionKey};
|
||||||
use polkadot_runtime::{
|
use polkadot_runtime::{
|
||||||
GenesisConfig, ConsensusConfig, CouncilSeatsConfig, DemocracyConfig, TreasuryConfig,
|
GenesisConfig, ConsensusConfig, CouncilSeatsConfig, DemocracyConfig, TreasuryConfig,
|
||||||
SessionConfig, StakingConfig, TimestampConfig, BalancesConfig, Perbill,
|
SessionConfig, StakingConfig, TimestampConfig, BalancesConfig, Perbill,
|
||||||
CouncilVotingConfig, GrandpaConfig, SudoConfig, IndicesConfig,
|
CouncilVotingConfig, GrandpaConfig, SudoConfig, IndicesConfig,
|
||||||
ClaimsConfig, FeesConfig, Permill
|
ClaimsConfig, FeesConfig, Permill, StakerStatus
|
||||||
};
|
};
|
||||||
use telemetry::TelemetryEndpoints;
|
use telemetry::TelemetryEndpoints;
|
||||||
use keystore::pad_seed;
|
|
||||||
|
|
||||||
const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
|
const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
|
||||||
const DEFAULT_PROTOCOL_ID: &str = "dot";
|
const DEFAULT_PROTOCOL_ID: &str = "dot";
|
||||||
@@ -38,26 +37,31 @@ pub fn poc_3_testnet_config() -> Result<ChainSpec, String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn staging_testnet_config_genesis() -> GenesisConfig {
|
fn staging_testnet_config_genesis() -> GenesisConfig {
|
||||||
let initial_authorities: Vec<(AccountId, AccountId, AuthorityId)> = vec![(
|
// subkey inspect "$SECRET"
|
||||||
hex!["863ab9379a9b78fe28368d794094bd576ce0c18536012605da7fc76e4f331faf"].into(), // 5F6hicQ1rnmQKy9q6yX9BUaBtQsfBLxAhrozQ8LrKxnPuBP7
|
|
||||||
hex!["6d090ef6cde4dc1df057e8ce928a156b5793b461dc35eabbb8a17ee4bd41a576"].into(), // 5EXfmUBE1Vs13jz4tbApSRJqT3sEQsMWNQmHWeknc4Gy9CuU
|
|
||||||
hex!["fba60a57436218519abf2dde5b5cadf02771c33833a27527ac4808c0690cfe72"].into(), // 5HkfCaoiFt41WSqEby4fkgRrXtxwfB9G8q8pPuoxDrsqGmFm
|
|
||||||
),(
|
|
||||||
hex!["46cf99718ddcf7868a1c7073862f6b821a58ac1ee57655b6a78b29559cf6fa9b"].into(), // 5DfYswB6NLVyvft5ggt6NJuX13X4VQjXqxuhha8C79ntPra9
|
|
||||||
hex!["c4d4dae0d95c3c012322709e12f20ce154b9e04c23c75dce3fe63cd907c2f4a0"].into(), // 5GWnURnpMXqk5Yzfr8AJBE6fNM3AKmWikFMFvia8A7hGBPUT
|
|
||||||
hex!["337c9a3f05221973d94995c9e9448c582e2ff3382c64f624318acc5164525244"].into(), // 5DEDKARKMZsecqU2s2onmg7ZxQDsZSYKTvxxHKMBMCU2UiCB
|
|
||||||
),(
|
|
||||||
hex!["6d14eced242492088e6ab054e6da3300b435de1fbab57e79103071cdc1dfff94"].into(), // 5EXjHw7GK6GEJjT7b9kGAPzQdCbrmjt27TYwVB1igN5uai3Y
|
|
||||||
hex!["971da4fe7d20cd83c05186d699e3a0756b1772bc7c16309c71bab36dac0909e8"].into(), // 5FUqtohZwTyhY12GNxSb2ExhGtrEGB7B8nLv29mevbPep5zk
|
|
||||||
hex!["79e9fd0469f6563bea8e2019c27c5c53a685675221ea4c7715c3f9fca75c6aa8"].into(), // 5EpZAFPsyuMEVKfdB1VtG6b2E11XS6T5ch646zq13xfmbsgS
|
|
||||||
),(
|
|
||||||
hex!["e2f736077b2a1522339f7a0dc90468ba2223c5f98fe82a0283138a3e48463f02"].into(), // 5HCJ7gu6kH5mYyp4DVDPGDmJf4Zf5zJgW5Swi3dizi8qq8vm
|
|
||||||
hex!["91627d4b51c11c1b8b6d54dbe727219e4eccbea6a86599ebe25a316e8ba3bf15"].into(), // 5FML4K5Vz45nKvndwmnAGwv6CTKvacEK2Nr6UbGf2zJYxuwd
|
|
||||||
hex!["08d9e438d2ccc88b66115e2e2f07b0cbdcf912e0f147124b39024735e6b58057"].into(), // 5CGJy52caRtJUjEnCK7gj7jYvBTfpffPqP443g4aM2GZt5ns
|
|
||||||
)];
|
|
||||||
let endowed_accounts = vec![
|
let endowed_accounts = vec![
|
||||||
hex!["f295940fa750df68a686fcf4abd4111c8a9c5a5a5a83c4c8639c451a94a7adfd"].into(),
|
hex!["42d69e4222c08885a4d6ff65f01852ba4a1599b683ad66286e4603d825e26b49"].unchecked_into(), // 5DaLmkrGTFvSTHBpShqqqRYaydw1sT4u3NCogYiE8Q1LqUUp
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// for i in 1 2 3 4; do for j in stash controller; do subkey inspect "$SECRET//$i//$j"; done; done
|
||||||
|
// for i in 1 2 3 4; do for j in session; do subkey -e inspect "$SECRET//$i//$j"; done; done
|
||||||
|
let initial_authorities: Vec<(AccountId, AccountId, SessionKey)> = vec![(
|
||||||
|
hex!["543cf15f6a0289e48eb4f30d451d1731c5fb0e1b2c5a4b99439c11808af3432d"].unchecked_into(), // 5Dy9yz2mjwDmTgjkDFxjPBpovKmKAgTndiRiTp4DfrTEdUvi
|
||||||
|
hex!["8a6ea654337e4a28ce7be124f73ad84702619942722d01cc271e5b421653c56d"].unchecked_into(), // 5FCDLPUMZpZPRfouRfQDZp74typV9SjSxPgG6ymwe5Z3Sbko
|
||||||
|
hex!["03644a181bc4e4197914aa109f3c97b6fe8c4787a82a1ddfab54e4ebedd8ab20"].unchecked_into(), // 5C99nwu8Ucq1yUJfajviwbqMAejpmaERHpmkPVWiFdxiF6yg
|
||||||
|
),(
|
||||||
|
hex!["c4957aa922910004f3b006d638b034070407dcb21e0905cb5cca9b58aec7fa3e"].unchecked_into(), // 5GWTeVF49JR9dAMVe4rRAAMXuhEjRAhSiYqQV4LbwpHTDLei
|
||||||
|
hex!["1adea46f5c3d272cd6426b338dd77d5bca3aff615338c82a0f02f4c62d89280f"].unchecked_into(), // 5CfwEv8TQKnszHNhYPuij6EtLZHCcaN3DgzfPCozcS9oxZzB
|
||||||
|
hex!["d739e1bb4c2b13ea1fff9be72e72d3bb1b364eb3b26176ab9a9512d386b7510b"].unchecked_into(), // 5GvuM53k1Z4nAB5zXJFgkRSHv4Bqo4BsvgbQWNWkiWZTMwWY
|
||||||
|
),(
|
||||||
|
hex!["6c3d14686e97d393814a09bea4246b9f273dcdbdef6731dcab3430b36820f135"].unchecked_into(), // 5EWdAzp9aJseLKVNeWJwE2K8PD47qzMbKVysCXr67xnEohYL
|
||||||
|
hex!["7a73b9fcb97cee5c2240d88ca9baea06758fac450efe6f90a72014c939d41857"].unchecked_into(), // 5EqG5RSujgrtSBB5DQvR1Z2EMxAe92sAdWNTNHtX4nL2MkPi
|
||||||
|
hex!["145791f7187d91398d8b445598f62be39b766d6e33e9d57b69c4d23fca218d7f"].unchecked_into(), // 5CXNq1mSKJT4Sc2CbyBBdANeSkbUvdWvE4czJjKXfBHi9sX5
|
||||||
|
),(
|
||||||
|
hex!["be6726c17ad7b5844c9e0ab6a1698d00d88bf183f0f82d8ec9627531c9ddc934"].unchecked_into(), // 5GNMbce1P2FfjvcPcoUxzjj6bYSRdQ2RpsbCyF9ozwMxx3NS
|
||||||
|
hex!["123b9048ba61265547ad3f336dfa48c16851ba1a96691e5d1ab3be1725db0614"].unchecked_into(), // 5CUcQvAgMzXMpQSz8mgzeiswDFHED88NiEK4byfS5TLaTJow
|
||||||
|
hex!["8abecfa66704176be23df099bf441ea65444992d63b3ced3e76a17a4d38b0b0e"].unchecked_into(), // 5FCd9Y7RLNyxz5wnCAErfsLbXGG34L2BaZRHzhiJcMUMd5zd
|
||||||
|
)];
|
||||||
|
|
||||||
const MILLICENTS: u128 = 1_000_000_000;
|
const MILLICENTS: u128 = 1_000_000_000;
|
||||||
const CENTS: u128 = 1_000 * MILLICENTS; // assume this is worth about a cent.
|
const CENTS: u128 = 1_000 * MILLICENTS; // assume this is worth about a cent.
|
||||||
const DOLLARS: u128 = 100 * CENTS;
|
const DOLLARS: u128 = 100 * CENTS;
|
||||||
@@ -79,7 +83,7 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
|
|||||||
system: None,
|
system: None,
|
||||||
balances: Some(BalancesConfig {
|
balances: Some(BalancesConfig {
|
||||||
balances: endowed_accounts.iter()
|
balances: endowed_accounts.iter()
|
||||||
.map(|&k| (k, ENDOWMENT))
|
.map(|k: &AccountId| (k.clone(), ENDOWMENT))
|
||||||
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
|
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
|
||||||
.collect(),
|
.collect(),
|
||||||
existential_deposit: 1 * DOLLARS,
|
existential_deposit: 1 * DOLLARS,
|
||||||
@@ -93,7 +97,7 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
|
|||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
}),
|
}),
|
||||||
session: Some(SessionConfig {
|
session: Some(SessionConfig {
|
||||||
validators: initial_authorities.iter().map(|x| x.1.into()).collect(),
|
validators: initial_authorities.iter().map(|x| x.1.clone()).collect(),
|
||||||
session_length: 5 * MINUTES,
|
session_length: 5 * MINUTES,
|
||||||
keys: initial_authorities.iter().map(|x| (x.1.clone(), x.2.clone())).collect::<Vec<_>>(),
|
keys: initial_authorities.iter().map(|x| (x.1.clone(), x.2.clone())).collect::<Vec<_>>(),
|
||||||
}),
|
}),
|
||||||
@@ -108,8 +112,8 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
|
|||||||
bonding_duration: 60 * MINUTES,
|
bonding_duration: 60 * MINUTES,
|
||||||
offline_slash_grace: 4,
|
offline_slash_grace: 4,
|
||||||
minimum_validator_count: 4,
|
minimum_validator_count: 4,
|
||||||
stakers: initial_authorities.iter().map(|x| (x.0.into(), x.1.into(), STASH)).collect(),
|
stakers: initial_authorities.iter().map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator)).collect(),
|
||||||
invulnerables: initial_authorities.iter().map(|x| x.1.into()).collect(),
|
invulnerables: initial_authorities.iter().map(|x| x.1.clone()).collect(),
|
||||||
}),
|
}),
|
||||||
democracy: Some(DemocracyConfig {
|
democracy: Some(DemocracyConfig {
|
||||||
launch_period: 10 * MINUTES, // 1 day per public referendum
|
launch_period: 10 * MINUTES, // 1 day per public referendum
|
||||||
@@ -176,29 +180,32 @@ pub fn staging_testnet_config() -> ChainSpec {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper function to generate AuthorityID from seed
|
/// Helper function to generate AccountId from seed
|
||||||
pub fn get_account_id_from_seed(seed: &str) -> AccountId {
|
pub fn get_account_id_from_seed(seed: &str) -> AccountId {
|
||||||
let padded_seed = pad_seed(seed);
|
sr25519::Pair::from_string(&format!("//{}", seed), None)
|
||||||
// NOTE from ed25519 impl:
|
.expect("static values are valid; qed")
|
||||||
// prefer pkcs#8 unless security doesn't matter -- this is used primarily for tests.
|
.public()
|
||||||
ed25519::Pair::from_seed(&padded_seed).public().0.into()
|
}
|
||||||
|
|
||||||
|
/// Helper function to generate SessionKey from seed
|
||||||
|
pub fn get_session_key_from_seed(seed: &str) -> SessionKey {
|
||||||
|
ed25519::Pair::from_string(&format!("//{}", seed), None)
|
||||||
|
.expect("static values are valid; qed")
|
||||||
|
.public()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper function to generate stash, controller and session key from seed
|
/// Helper function to generate stash, controller and session key from seed
|
||||||
pub fn get_authority_keys_from_seed(seed: &str) -> (AccountId, AccountId, AuthorityId) {
|
pub fn get_authority_keys_from_seed(seed: &str) -> (AccountId, AccountId, SessionKey) {
|
||||||
let padded_seed = pad_seed(seed);
|
|
||||||
// NOTE from ed25519 impl:
|
|
||||||
// prefer pkcs#8 unless security doesn't matter -- this is used primarily for tests.
|
|
||||||
(
|
(
|
||||||
get_account_id_from_seed(&format!("{}-stash", seed)),
|
get_account_id_from_seed(&format!("{}//stash", seed)),
|
||||||
get_account_id_from_seed(seed),
|
get_account_id_from_seed(seed),
|
||||||
ed25519::Pair::from_seed(&padded_seed).public().0.into()
|
get_session_key_from_seed(seed)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper function to create GenesisConfig for testing
|
/// Helper function to create GenesisConfig for testing
|
||||||
pub fn testnet_genesis(
|
pub fn testnet_genesis(
|
||||||
initial_authorities: Vec<(AccountId, AccountId, AuthorityId)>,
|
initial_authorities: Vec<(AccountId, AccountId, SessionKey)>,
|
||||||
root_key: AccountId,
|
root_key: AccountId,
|
||||||
endowed_accounts: Option<Vec<AccountId>>,
|
endowed_accounts: Option<Vec<AccountId>>,
|
||||||
) -> GenesisConfig {
|
) -> GenesisConfig {
|
||||||
@@ -229,11 +236,11 @@ pub fn testnet_genesis(
|
|||||||
existential_deposit: 500,
|
existential_deposit: 500,
|
||||||
transfer_fee: 0,
|
transfer_fee: 0,
|
||||||
creation_fee: 0,
|
creation_fee: 0,
|
||||||
balances: endowed_accounts.iter().map(|&k| (k.into(), ENDOWMENT)).collect(),
|
balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
|
||||||
vesting: vec![],
|
vesting: vec![],
|
||||||
}),
|
}),
|
||||||
session: Some(SessionConfig {
|
session: Some(SessionConfig {
|
||||||
validators: initial_authorities.iter().map(|x| x.1.into()).collect(),
|
validators: initial_authorities.iter().map(|x| x.1.clone()).collect(),
|
||||||
session_length: 10,
|
session_length: 10,
|
||||||
keys: initial_authorities.iter().map(|x| (x.1.clone(), x.2.clone())).collect::<Vec<_>>(),
|
keys: initial_authorities.iter().map(|x| (x.1.clone(), x.2.clone())).collect::<Vec<_>>(),
|
||||||
}),
|
}),
|
||||||
@@ -248,8 +255,8 @@ pub fn testnet_genesis(
|
|||||||
current_offline_slash: 0,
|
current_offline_slash: 0,
|
||||||
current_session_reward: 0,
|
current_session_reward: 0,
|
||||||
offline_slash_grace: 0,
|
offline_slash_grace: 0,
|
||||||
stakers: initial_authorities.iter().map(|x| (x.0.into(), x.1.into(), STASH)).collect(),
|
stakers: initial_authorities.iter().map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator)).collect(),
|
||||||
invulnerables: initial_authorities.iter().map(|x| x.1.into()).collect(),
|
invulnerables: initial_authorities.iter().map(|x| x.1.clone()).collect(),
|
||||||
}),
|
}),
|
||||||
democracy: Some(DemocracyConfig {
|
democracy: Some(DemocracyConfig {
|
||||||
launch_period: 9,
|
launch_period: 9,
|
||||||
@@ -261,7 +268,7 @@ pub fn testnet_genesis(
|
|||||||
council_seats: Some(CouncilSeatsConfig {
|
council_seats: Some(CouncilSeatsConfig {
|
||||||
active_council: endowed_accounts.iter()
|
active_council: endowed_accounts.iter()
|
||||||
.filter(|&endowed| initial_authorities.iter().find(|&(_, controller, _)| controller == endowed).is_none())
|
.filter(|&endowed| initial_authorities.iter().find(|&(_, controller, _)| controller == endowed).is_none())
|
||||||
.map(|a| (a.clone().into(), 1000000)).collect(),
|
.map(|a| (a.clone(), 1000000)).collect(),
|
||||||
candidacy_bond: 10,
|
candidacy_bond: 10,
|
||||||
voter_bond: 2,
|
voter_bond: 2,
|
||||||
present_slash_per_voter: 1,
|
present_slash_per_voter: 1,
|
||||||
|
|||||||
@@ -14,8 +14,6 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#![warn(unused_extern_crates)]
|
|
||||||
|
|
||||||
//! Polkadot service. Specialized wrapper over substrate service.
|
//! Polkadot service. Specialized wrapper over substrate service.
|
||||||
|
|
||||||
extern crate polkadot_availability_store as av_store;
|
extern crate polkadot_availability_store as av_store;
|
||||||
@@ -27,7 +25,6 @@ extern crate polkadot_network;
|
|||||||
extern crate sr_primitives;
|
extern crate sr_primitives;
|
||||||
extern crate substrate_primitives as primitives;
|
extern crate substrate_primitives as primitives;
|
||||||
extern crate substrate_client as client;
|
extern crate substrate_client as client;
|
||||||
extern crate substrate_keystore as keystore;
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate substrate_service as service;
|
extern crate substrate_service as service;
|
||||||
extern crate substrate_consensus_aura as aura;
|
extern crate substrate_consensus_aura as aura;
|
||||||
@@ -46,10 +43,10 @@ pub mod chain_spec;
|
|||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use polkadot_primitives::{parachain, AccountId, Block, Hash, BlockId};
|
use polkadot_primitives::{parachain, parachain::CollatorId, Block, Hash, BlockId};
|
||||||
use polkadot_runtime::{GenesisConfig, RuntimeApi};
|
use polkadot_runtime::{GenesisConfig, RuntimeApi};
|
||||||
use polkadot_network::gossip::{self as network_gossip, Known};
|
use polkadot_network::gossip::{self as network_gossip, Known};
|
||||||
use primitives::ed25519;
|
use primitives::{Pair, ed25519};
|
||||||
use tokio::runtime::TaskExecutor;
|
use tokio::runtime::TaskExecutor;
|
||||||
use service::{FactoryFullConfiguration, FullBackend, LightBackend, FullExecutor, LightExecutor};
|
use service::{FactoryFullConfiguration, FullBackend, LightBackend, FullExecutor, LightExecutor};
|
||||||
use transaction_pool::txpool::{Pool as TransactionPool};
|
use transaction_pool::txpool::{Pool as TransactionPool};
|
||||||
@@ -76,7 +73,7 @@ pub type Configuration = FactoryFullConfiguration<Factory>;
|
|||||||
pub struct CustomConfiguration {
|
pub struct CustomConfiguration {
|
||||||
/// Set to `Some` with a collator `AccountId` and desired parachain
|
/// Set to `Some` with a collator `AccountId` and desired parachain
|
||||||
/// if the network protocol should be started in collator mode.
|
/// if the network protocol should be started in collator mode.
|
||||||
pub collating_for: Option<(AccountId, parachain::Id)>,
|
pub collating_for: Option<(CollatorId, parachain::Id)>,
|
||||||
|
|
||||||
/// Intermediate state during setup. Will be removed in future. Set to `None`.
|
/// Intermediate state during setup. Will be removed in future. Set to `None`.
|
||||||
// FIXME: rather than putting this on the config, let's have an actual intermediate setup state
|
// FIXME: rather than putting this on the config, let's have an actual intermediate setup state
|
||||||
@@ -159,7 +156,7 @@ construct_service_factory! {
|
|||||||
struct Factory {
|
struct Factory {
|
||||||
Block = Block,
|
Block = Block,
|
||||||
RuntimeApi = RuntimeApi,
|
RuntimeApi = RuntimeApi,
|
||||||
NetworkProtocol = PolkadotProtocol { |config: &Configuration| Ok(PolkadotProtocol::new(config.custom.collating_for)) },
|
NetworkProtocol = PolkadotProtocol { |config: &Configuration| Ok(PolkadotProtocol::new(config.custom.collating_for.clone())) },
|
||||||
RuntimeDispatch = polkadot_executor::Executor,
|
RuntimeDispatch = polkadot_executor::Executor,
|
||||||
FullTransactionPoolApi = TxChainApi<FullBackend<Self>, FullExecutor<Self>>
|
FullTransactionPoolApi = TxChainApi<FullBackend<Self>, FullExecutor<Self>>
|
||||||
{ |config, client| Ok(TransactionPool::new(config, TxChainApi::new(client))) },
|
{ |config, client| Ok(TransactionPool::new(config, TxChainApi::new(client))) },
|
||||||
|
|||||||
@@ -26,18 +26,18 @@ pub mod generic;
|
|||||||
pub use generic::Table;
|
pub use generic::Table;
|
||||||
|
|
||||||
use primitives::parachain::{
|
use primitives::parachain::{
|
||||||
Id, CandidateReceipt, CandidateSignature as Signature, Statement as PrimitiveStatement,
|
Id, CandidateReceipt, Statement as PrimitiveStatement, ValidatorSignature, ValidatorId
|
||||||
};
|
};
|
||||||
use primitives::{SessionKey, Hash};
|
use primitives::Hash;
|
||||||
|
|
||||||
/// Statements about candidates on the network.
|
/// Statements about candidates on the network.
|
||||||
pub type Statement = generic::Statement<CandidateReceipt, Hash>;
|
pub type Statement = generic::Statement<CandidateReceipt, Hash>;
|
||||||
|
|
||||||
/// Signed statements about candidates.
|
/// Signed statements about candidates.
|
||||||
pub type SignedStatement = generic::SignedStatement<CandidateReceipt, Hash, SessionKey, Signature>;
|
pub type SignedStatement = generic::SignedStatement<CandidateReceipt, Hash, ValidatorId, ValidatorSignature>;
|
||||||
|
|
||||||
/// Kinds of misbehavior, along with proof.
|
/// Kinds of misbehavior, along with proof.
|
||||||
pub type Misbehavior = generic::Misbehavior<CandidateReceipt, Hash, SessionKey, Signature>;
|
pub type Misbehavior = generic::Misbehavior<CandidateReceipt, Hash, ValidatorId, ValidatorSignature>;
|
||||||
|
|
||||||
/// A summary of import of a statement.
|
/// A summary of import of a statement.
|
||||||
pub type Summary = generic::Summary<Hash, Id>;
|
pub type Summary = generic::Summary<Hash, Id>;
|
||||||
@@ -46,17 +46,17 @@ pub type Summary = generic::Summary<Hash, Id>;
|
|||||||
pub trait Context {
|
pub trait Context {
|
||||||
/// Whether a authority is a member of a group.
|
/// Whether a authority is a member of a group.
|
||||||
/// Members are meant to submit candidates and vote on validity.
|
/// Members are meant to submit candidates and vote on validity.
|
||||||
fn is_member_of(&self, authority: &SessionKey, group: &Id) -> bool;
|
fn is_member_of(&self, authority: &ValidatorId, group: &Id) -> bool;
|
||||||
|
|
||||||
// requisite number of votes for validity from a group.
|
// requisite number of votes for validity from a group.
|
||||||
fn requisite_votes(&self, group: &Id) -> usize;
|
fn requisite_votes(&self, group: &Id) -> usize;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C: Context> generic::Context for C {
|
impl<C: Context> generic::Context for C {
|
||||||
type AuthorityId = SessionKey;
|
type AuthorityId = ValidatorId;
|
||||||
type Digest = Hash;
|
type Digest = Hash;
|
||||||
type GroupId = Id;
|
type GroupId = Id;
|
||||||
type Signature = Signature;
|
type Signature = ValidatorSignature;
|
||||||
type Candidate = CandidateReceipt;
|
type Candidate = CandidateReceipt;
|
||||||
|
|
||||||
fn candidate_digest(candidate: &CandidateReceipt) -> Hash {
|
fn candidate_digest(candidate: &CandidateReceipt) -> Hash {
|
||||||
@@ -67,7 +67,7 @@ impl<C: Context> generic::Context for C {
|
|||||||
candidate.parachain_index.clone()
|
candidate.parachain_index.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_member_of(&self, authority: &SessionKey, group: &Id) -> bool {
|
fn is_member_of(&self, authority: &ValidatorId, group: &Id) -> bool {
|
||||||
Context::is_member_of(self, authority, group)
|
Context::is_member_of(self, authority, group)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ use std::collections::HashMap;
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use adder::{HeadData as AdderHead, BlockData as AdderBody};
|
use adder::{HeadData as AdderHead, BlockData as AdderBody};
|
||||||
use substrate_primitives::ed25519::Pair;
|
use substrate_primitives::{Pair as PairT, ed25519::Pair};
|
||||||
use parachain::codec::{Encode, Decode};
|
use parachain::codec::{Encode, Decode};
|
||||||
use primitives::parachain::{HeadData, BlockData, Id as ParaId, Message};
|
use primitives::parachain::{HeadData, BlockData, Id as ParaId, Message};
|
||||||
use collator::{InvalidHead, ParachainContext, VersionInfo};
|
use collator::{InvalidHead, ParachainContext, VersionInfo};
|
||||||
@@ -98,7 +98,7 @@ impl ParachainContext for AdderContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let key = Arc::new(Pair::from_seed(&[1; 32]));
|
let key = Arc::new(Pair::from_seed([1; 32]));
|
||||||
let id: ParaId = 100.into();
|
let id: ParaId = 100.into();
|
||||||
|
|
||||||
println!("Starting adder collator with genesis: ");
|
println!("Starting adder collator with genesis: ");
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use polkadot_primitives::{Block, Hash, AccountId, BlockId};
|
use polkadot_primitives::{Block, Hash, BlockId, parachain::CollatorId};
|
||||||
use polkadot_primitives::parachain::{Id as ParaId, Collation, Extrinsic, OutgoingMessage};
|
use polkadot_primitives::parachain::{Id as ParaId, Collation, Extrinsic, OutgoingMessage};
|
||||||
use polkadot_primitives::parachain::{CandidateReceipt, ParachainHost};
|
use polkadot_primitives::parachain::{CandidateReceipt, ParachainHost};
|
||||||
use runtime_primitives::traits::ProvideRuntimeApi;
|
use runtime_primitives::traits::ProvideRuntimeApi;
|
||||||
@@ -49,7 +49,7 @@ pub trait Collators: Clone {
|
|||||||
fn collate(&self, parachain: ParaId, relay_parent: Hash) -> Self::Collation;
|
fn collate(&self, parachain: ParaId, relay_parent: Hash) -> Self::Collation;
|
||||||
|
|
||||||
/// Note a bad collator. TODO: take proof
|
/// Note a bad collator. TODO: take proof
|
||||||
fn note_bad_collator(&self, collator: AccountId);
|
fn note_bad_collator(&self, collator: CollatorId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A future which resolves when a collation is available.
|
/// A future which resolves when a collation is available.
|
||||||
|
|||||||
@@ -16,9 +16,10 @@
|
|||||||
|
|
||||||
//! Errors that can occur during the validation process.
|
//! Errors that can occur during the validation process.
|
||||||
|
|
||||||
use primitives::Ed25519AuthorityId as AuthorityId;
|
|
||||||
use runtime_primitives::RuntimeString;
|
use runtime_primitives::RuntimeString;
|
||||||
|
|
||||||
|
use primitives::ed25519::Public as AuthorityId;
|
||||||
|
|
||||||
error_chain! {
|
error_chain! {
|
||||||
links {
|
links {
|
||||||
Client(::client::error::Error, ::client::error::ErrorKind);
|
Client(::client::error::Error, ::client::error::ErrorKind);
|
||||||
|
|||||||
@@ -77,10 +77,9 @@ use parking_lot::Mutex;
|
|||||||
use polkadot_primitives::{Hash, Block, BlockId, BlockNumber, Header, SessionKey};
|
use polkadot_primitives::{Hash, Block, BlockId, BlockNumber, Header, SessionKey};
|
||||||
use polkadot_primitives::parachain::{
|
use polkadot_primitives::parachain::{
|
||||||
Id as ParaId, Chain, DutyRoster, BlockData, Extrinsic as ParachainExtrinsic, CandidateReceipt,
|
Id as ParaId, Chain, DutyRoster, BlockData, Extrinsic as ParachainExtrinsic, CandidateReceipt,
|
||||||
CandidateSignature, ParachainHost, AttestedCandidate, Statement as PrimitiveStatement, Message,
|
ParachainHost, AttestedCandidate, Statement as PrimitiveStatement, Message, OutgoingMessage, CollatorSignature
|
||||||
OutgoingMessage,
|
|
||||||
};
|
};
|
||||||
use primitives::{Ed25519AuthorityId as AuthorityId, ed25519};
|
use primitives::{Pair, ed25519};
|
||||||
use runtime_primitives::{traits::{ProvideRuntimeApi, Header as HeaderT}, ApplyError};
|
use runtime_primitives::{traits::{ProvideRuntimeApi, Header as HeaderT}, ApplyError};
|
||||||
use tokio::runtime::TaskExecutor;
|
use tokio::runtime::TaskExecutor;
|
||||||
use tokio::timer::{Delay, Interval};
|
use tokio::timer::{Delay, Interval};
|
||||||
@@ -95,6 +94,8 @@ use inherents::InherentData;
|
|||||||
use runtime_aura::timestamp::TimestampInherentData;
|
use runtime_aura::timestamp::TimestampInherentData;
|
||||||
use aura::SlotDuration;
|
use aura::SlotDuration;
|
||||||
|
|
||||||
|
use ed25519::Public as AuthorityId;
|
||||||
|
|
||||||
pub use self::collation::{validate_collation, message_queue_root, egress_roots, Collators};
|
pub use self::collation::{validate_collation, message_queue_root, egress_roots, Collators};
|
||||||
pub use self::error::{ErrorKind, Error};
|
pub use self::error::{ErrorKind, Error};
|
||||||
pub use self::shared_table::{
|
pub use self::shared_table::{
|
||||||
@@ -192,7 +193,7 @@ pub struct GroupInfo {
|
|||||||
/// Sign a table statement against a parent hash.
|
/// Sign a table statement against a parent hash.
|
||||||
/// The actual message signed is the encoded statement concatenated with the
|
/// The actual message signed is the encoded statement concatenated with the
|
||||||
/// parent hash.
|
/// parent hash.
|
||||||
pub fn sign_table_statement(statement: &Statement, key: &ed25519::Pair, parent_hash: &Hash) -> CandidateSignature {
|
pub fn sign_table_statement(statement: &Statement, key: &ed25519::Pair, parent_hash: &Hash) -> CollatorSignature {
|
||||||
// we sign using the primitive statement type because that's what the runtime
|
// we sign using the primitive statement type because that's what the runtime
|
||||||
// expects. These types probably encode the same way so this clone could be optimized
|
// expects. These types probably encode the same way so this clone could be optimized
|
||||||
// out in the future.
|
// out in the future.
|
||||||
@@ -203,7 +204,7 @@ pub fn sign_table_statement(statement: &Statement, key: &ed25519::Pair, parent_h
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Check signature on table statement.
|
/// Check signature on table statement.
|
||||||
pub fn check_statement(statement: &Statement, signature: &CandidateSignature, signer: SessionKey, parent_hash: &Hash) -> bool {
|
pub fn check_statement(statement: &Statement, signature: &CollatorSignature, signer: SessionKey, parent_hash: &Hash) -> bool {
|
||||||
use runtime_primitives::traits::Verify;
|
use runtime_primitives::traits::Verify;
|
||||||
|
|
||||||
let mut encoded = PrimitiveStatement::from(statement.clone()).encode();
|
let mut encoded = PrimitiveStatement::from(statement.clone()).encode();
|
||||||
@@ -799,17 +800,17 @@ impl<C, TxApi> Future for CreateProposal<C, TxApi> where
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use substrate_keyring::Keyring;
|
use substrate_keyring::AuthorityKeyring;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn sign_and_check_statement() {
|
fn sign_and_check_statement() {
|
||||||
let statement: Statement = GenericStatement::Valid([1; 32].into());
|
let statement: Statement = GenericStatement::Valid([1; 32].into());
|
||||||
let parent_hash = [2; 32].into();
|
let parent_hash = [2; 32].into();
|
||||||
|
|
||||||
let sig = sign_table_statement(&statement, &Keyring::Alice.pair(), &parent_hash);
|
let sig = sign_table_statement(&statement, &AuthorityKeyring::Alice.pair(), &parent_hash);
|
||||||
|
|
||||||
assert!(check_statement(&statement, &sig, Keyring::Alice.to_raw_public().into(), &parent_hash));
|
assert!(check_statement(&statement, &sig, AuthorityKeyring::Alice.into(), &parent_hash));
|
||||||
assert!(!check_statement(&statement, &sig, Keyring::Alice.to_raw_public().into(), &[0xff; 32].into()));
|
assert!(!check_statement(&statement, &sig, AuthorityKeyring::Alice.into(), &[0xff; 32].into()));
|
||||||
assert!(!check_statement(&statement, &sig, Keyring::Bob.to_raw_public().into(), &parent_hash));
|
assert!(!check_statement(&statement, &sig, AuthorityKeyring::Bob.into(), &parent_hash));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ use futures::{future, prelude::*};
|
|||||||
|
|
||||||
use super::{GroupInfo, Incoming, TableRouter};
|
use super::{GroupInfo, Incoming, TableRouter};
|
||||||
use self::includable::IncludabilitySender;
|
use self::includable::IncludabilitySender;
|
||||||
use primitives::ed25519;
|
use primitives::{Pair, ed25519};
|
||||||
use runtime_primitives::{traits::ProvideRuntimeApi};
|
use runtime_primitives::{traits::ProvideRuntimeApi};
|
||||||
|
|
||||||
mod includable;
|
mod includable;
|
||||||
@@ -544,7 +544,8 @@ impl SharedTable {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use substrate_keyring::Keyring;
|
use substrate_keyring::AuthorityKeyring;
|
||||||
|
use primitives::crypto::UncheckedInto;
|
||||||
use futures::future;
|
use futures::future;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
@@ -572,15 +573,16 @@ mod tests {
|
|||||||
let mut groups = HashMap::new();
|
let mut groups = HashMap::new();
|
||||||
|
|
||||||
let para_id = ParaId::from(1);
|
let para_id = ParaId::from(1);
|
||||||
let local_id = Keyring::Alice.to_raw_public().into();
|
|
||||||
let local_key = Arc::new(Keyring::Alice.pair());
|
|
||||||
|
|
||||||
let validity_other = Keyring::Bob.to_raw_public().into();
|
|
||||||
let validity_other_key = Keyring::Bob.pair();
|
|
||||||
let parent_hash = Default::default();
|
let parent_hash = Default::default();
|
||||||
|
|
||||||
|
let local_key = Arc::new(AuthorityKeyring::Alice.pair());
|
||||||
|
let local_id = local_key.public();
|
||||||
|
|
||||||
|
let validity_other_key = AuthorityKeyring::Bob.pair();
|
||||||
|
let validity_other = validity_other_key.public();
|
||||||
|
|
||||||
groups.insert(para_id, GroupInfo {
|
groups.insert(para_id, GroupInfo {
|
||||||
validity_guarantors: [local_id, validity_other].iter().cloned().collect(),
|
validity_guarantors: [local_id, validity_other.clone()].iter().cloned().collect(),
|
||||||
needed_validity: 2,
|
needed_validity: 2,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -593,7 +595,7 @@ mod tests {
|
|||||||
|
|
||||||
let candidate = CandidateReceipt {
|
let candidate = CandidateReceipt {
|
||||||
parachain_index: para_id,
|
parachain_index: para_id,
|
||||||
collator: [1; 32].into(),
|
collator: [1; 32].unchecked_into(),
|
||||||
signature: Default::default(),
|
signature: Default::default(),
|
||||||
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
||||||
balance_uploads: Vec::new(),
|
balance_uploads: Vec::new(),
|
||||||
@@ -622,15 +624,16 @@ mod tests {
|
|||||||
let mut groups = HashMap::new();
|
let mut groups = HashMap::new();
|
||||||
|
|
||||||
let para_id = ParaId::from(1);
|
let para_id = ParaId::from(1);
|
||||||
let local_id = Keyring::Alice.to_raw_public().into();
|
|
||||||
let local_key = Arc::new(Keyring::Alice.pair());
|
|
||||||
|
|
||||||
let validity_other = Keyring::Bob.to_raw_public().into();
|
|
||||||
let validity_other_key = Keyring::Bob.pair();
|
|
||||||
let parent_hash = Default::default();
|
let parent_hash = Default::default();
|
||||||
|
|
||||||
|
let local_key = Arc::new(AuthorityKeyring::Alice.pair());
|
||||||
|
let local_id = local_key.public();
|
||||||
|
|
||||||
|
let validity_other_key = AuthorityKeyring::Bob.pair();
|
||||||
|
let validity_other = validity_other_key.public();
|
||||||
|
|
||||||
groups.insert(para_id, GroupInfo {
|
groups.insert(para_id, GroupInfo {
|
||||||
validity_guarantors: [local_id, validity_other].iter().cloned().collect(),
|
validity_guarantors: [local_id, validity_other.clone()].iter().cloned().collect(),
|
||||||
needed_validity: 1,
|
needed_validity: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -643,7 +646,7 @@ mod tests {
|
|||||||
|
|
||||||
let candidate = CandidateReceipt {
|
let candidate = CandidateReceipt {
|
||||||
parachain_index: para_id,
|
parachain_index: para_id,
|
||||||
collator: [1; 32].into(),
|
collator: [1; 32].unchecked_into(),
|
||||||
signature: Default::default(),
|
signature: Default::default(),
|
||||||
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
||||||
balance_uploads: Vec::new(),
|
balance_uploads: Vec::new(),
|
||||||
@@ -676,7 +679,7 @@ mod tests {
|
|||||||
|
|
||||||
let candidate = CandidateReceipt {
|
let candidate = CandidateReceipt {
|
||||||
parachain_index: para_id,
|
parachain_index: para_id,
|
||||||
collator: [1; 32].into(),
|
collator: [1; 32].unchecked_into(),
|
||||||
signature: Default::default(),
|
signature: Default::default(),
|
||||||
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
||||||
balance_uploads: Vec::new(),
|
balance_uploads: Vec::new(),
|
||||||
@@ -716,7 +719,7 @@ mod tests {
|
|||||||
|
|
||||||
let candidate = CandidateReceipt {
|
let candidate = CandidateReceipt {
|
||||||
parachain_index: para_id,
|
parachain_index: para_id,
|
||||||
collator: [1; 32].into(),
|
collator: [1; 32].unchecked_into(),
|
||||||
signature: Default::default(),
|
signature: Default::default(),
|
||||||
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
||||||
balance_uploads: Vec::new(),
|
balance_uploads: Vec::new(),
|
||||||
@@ -751,15 +754,16 @@ mod tests {
|
|||||||
let mut groups = HashMap::new();
|
let mut groups = HashMap::new();
|
||||||
|
|
||||||
let para_id = ParaId::from(1);
|
let para_id = ParaId::from(1);
|
||||||
let local_id = Keyring::Alice.to_raw_public().into();
|
|
||||||
let local_key = Arc::new(Keyring::Alice.pair());
|
|
||||||
|
|
||||||
let validity_other = Keyring::Bob.to_raw_public().into();
|
|
||||||
let validity_other_key = Keyring::Bob.pair();
|
|
||||||
let parent_hash = Default::default();
|
let parent_hash = Default::default();
|
||||||
|
|
||||||
|
let local_key = Arc::new(AuthorityKeyring::Alice.pair());
|
||||||
|
let local_id = local_key.public();
|
||||||
|
|
||||||
|
let validity_other_key = AuthorityKeyring::Bob.pair();
|
||||||
|
let validity_other = validity_other_key.public();
|
||||||
|
|
||||||
groups.insert(para_id, GroupInfo {
|
groups.insert(para_id, GroupInfo {
|
||||||
validity_guarantors: [local_id, validity_other].iter().cloned().collect(),
|
validity_guarantors: [local_id, validity_other.clone()].iter().cloned().collect(),
|
||||||
needed_validity: 1,
|
needed_validity: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -772,7 +776,7 @@ mod tests {
|
|||||||
|
|
||||||
let candidate = CandidateReceipt {
|
let candidate = CandidateReceipt {
|
||||||
parachain_index: para_id,
|
parachain_index: para_id,
|
||||||
collator: [1; 32].into(),
|
collator: [1; 32].unchecked_into(),
|
||||||
signature: Default::default(),
|
signature: Default::default(),
|
||||||
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
||||||
balance_uploads: Vec::new(),
|
balance_uploads: Vec::new(),
|
||||||
@@ -811,14 +815,16 @@ mod tests {
|
|||||||
let mut groups = HashMap::new();
|
let mut groups = HashMap::new();
|
||||||
|
|
||||||
let para_id = ParaId::from(1);
|
let para_id = ParaId::from(1);
|
||||||
let local_id = Keyring::Alice.to_raw_public().into();
|
|
||||||
let local_key = Arc::new(Keyring::Alice.pair());
|
|
||||||
let block_data = BlockData(vec![1, 2, 3]);
|
let block_data = BlockData(vec![1, 2, 3]);
|
||||||
let extrinsic = Extrinsic { outgoing_messages: Vec::new() };
|
let extrinsic = Extrinsic { outgoing_messages: Vec::new() };
|
||||||
|
|
||||||
let validity_other = Keyring::Bob.to_raw_public().into();
|
|
||||||
let parent_hash = Default::default();
|
let parent_hash = Default::default();
|
||||||
|
|
||||||
|
let local_key = Arc::new(AuthorityKeyring::Alice.pair());
|
||||||
|
let local_id = local_key.public();
|
||||||
|
|
||||||
|
let validity_other_key = AuthorityKeyring::Bob.pair();
|
||||||
|
let validity_other = validity_other_key.public();
|
||||||
|
|
||||||
groups.insert(para_id, GroupInfo {
|
groups.insert(para_id, GroupInfo {
|
||||||
validity_guarantors: [local_id, validity_other].iter().cloned().collect(),
|
validity_guarantors: [local_id, validity_other].iter().cloned().collect(),
|
||||||
needed_validity: 1,
|
needed_validity: 1,
|
||||||
@@ -833,7 +839,7 @@ mod tests {
|
|||||||
|
|
||||||
let candidate = CandidateReceipt {
|
let candidate = CandidateReceipt {
|
||||||
parachain_index: para_id,
|
parachain_index: para_id,
|
||||||
collator: [1; 32].into(),
|
collator: [1; 32].unchecked_into(),
|
||||||
signature: Default::default(),
|
signature: Default::default(),
|
||||||
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
|
||||||
balance_uploads: Vec::new(),
|
balance_uploads: Vec::new(),
|
||||||
|
|||||||
Reference in New Issue
Block a user