Add a testnet similar to sc_network_test. (#852)

* Copy over files

* Most network tests work

* Fix copyrights

* Strip out unneeded pallets

* Update test-runtime and remove unused network test things

* Upgrade test runtime

* Strip more things out of the test runtime

* Bump kusama impl version
This commit is contained in:
Ashley
2020-03-10 15:36:21 +01:00
committed by GitHub
parent 5ef0597e79
commit 1736c2d576
12 changed files with 2344 additions and 1 deletions
+222
View File
@@ -3851,6 +3851,28 @@ dependencies = [
"wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "polkadot-network-test"
version = "0.8.0"
dependencies = [
"env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"polkadot-test-runtime-client 2.0.0",
"rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
"sc-block-builder 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-network 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-network-test 0.8.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-blockchain 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-consensus 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
]
[[package]]
name = "polkadot-parachain"
version = "0.7.22"
@@ -4079,6 +4101,78 @@ dependencies = [
"sp-core 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
]
[[package]]
name = "polkadot-test-runtime"
version = "0.7.21"
dependencies = [
"bitvec 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)",
"frame-executive 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"frame-support 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"frame-system 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"frame-system-rpc-runtime-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"pallet-authorship 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-babe 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-balances 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-finality-tracker 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-grandpa 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-indices 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-nicks 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-randomness-collective-flip 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-session 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-staking 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-staking-reward-curve 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-timestamp 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-transaction-payment 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-transaction-payment-rpc-runtime-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-vesting 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"parity-scale-codec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"polkadot-parachain 0.7.22",
"polkadot-primitives 0.7.22",
"polkadot-runtime-common 0.7.22",
"rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)",
"sp-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-block-builder 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-consensus-babe 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-inherents 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-io 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-keyring 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-session 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-staking 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-std 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-transaction-pool 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-trie 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-version 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-wasm-builder-runner 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "polkadot-test-runtime-client"
version = "2.0.0"
dependencies = [
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"polkadot-test-runtime 0.7.21",
"sc-block-builder 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-blockchain 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-test-client 2.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-test-runtime 2.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
]
[[package]]
name = "polkadot-validation"
version = "0.7.22"
@@ -5229,6 +5323,32 @@ dependencies = [
"wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "sc-network-test"
version = "0.8.0-dev"
source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#8c672e107789ed10973d937ba8cac245404377e2"
dependencies = [
"env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
"sc-block-builder 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-network 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-blockchain 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-consensus 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-consensus-babe 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-test-runtime 2.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-test-runtime-client 2.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "sc-offchain"
version = "2.0.0-alpha.3"
@@ -5940,6 +6060,20 @@ dependencies = [
"sp-version 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
]
[[package]]
name = "sp-consensus-aura"
version = "0.8.0-alpha.3"
source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#8c672e107789ed10973d937ba8cac245404377e2"
dependencies = [
"parity-scale-codec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sp-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-application-crypto 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-inherents 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-std 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-timestamp 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
]
[[package]]
name = "sp-consensus-babe"
version = "0.8.0-alpha.3"
@@ -6451,6 +6585,88 @@ dependencies = [
"tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "substrate-test-client"
version = "2.0.0-dev"
source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#8c672e107789ed10973d937ba8cac245404377e2"
dependencies = [
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sc-client 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client-db 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-executor 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-blockchain 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-consensus 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-keyring 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-state-machine 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
]
[[package]]
name = "substrate-test-runtime"
version = "2.0.0-dev"
source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#8c672e107789ed10973d937ba8cac245404377e2"
dependencies = [
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"frame-executive 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"frame-support 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"frame-system 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"frame-system-rpc-runtime-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"memory-db 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"pallet-babe 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-timestamp 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"parity-scale-codec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"sc-client 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
"sp-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-application-crypto 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-block-builder 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-consensus-aura 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-consensus-babe 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-inherents 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-io 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-keyring 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-offchain 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime-interface 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-session 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-std 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-transaction-pool 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-trie 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-version 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-wasm-builder-runner 1.0.5 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "substrate-test-runtime-client"
version = "2.0.0-dev"
source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#8c672e107789ed10973d937ba8cac245404377e2"
dependencies = [
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sc-block-builder 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-api 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-blockchain 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-test-client 2.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-test-runtime 2.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
]
[[package]]
name = "substrate-wasm-builder-runner"
version = "1.0.5"
source = "git+https://github.com/paritytech/substrate?branch=polkadot-master#8c672e107789ed10973d937ba8cac245404377e2"
[[package]]
name = "substrate-wasm-builder-runner"
version = "1.0.5"
@@ -8027,6 +8243,7 @@ dependencies = [
"checksum sc-keystore 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sc-network 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sc-network-gossip 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sc-network-test 0.8.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sc-offchain 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sc-peerset 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sc-rpc 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
@@ -8084,6 +8301,7 @@ dependencies = [
"checksum sp-block-builder 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sp-blockchain 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sp-consensus 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sp-consensus-aura 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sp-consensus-babe 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sp-core 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum sp-debug-derive 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
@@ -8126,6 +8344,10 @@ dependencies = [
"checksum substrate-browser-utils 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum substrate-frame-rpc-system 2.0.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum substrate-prometheus-endpoint 0.8.0-alpha.3 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum substrate-test-client 2.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum substrate-test-runtime 2.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum substrate-test-runtime-client 2.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum substrate-wasm-builder-runner 1.0.5 (git+https://github.com/paritytech/substrate?branch=polkadot-master)" = "<none>"
"checksum substrate-wasm-builder-runner 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e30c70de7e7d5fd404fe26db1e7a4d6b553e2760b1ac490f249c04a960c483b8"
"checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee"
"checksum subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941"