ChainSpec extensions (#3692)

* Add some chainspec tests and make sure we validate it.

* Manual implementation of Extension + Forks definitions.

* Move chain spec to separate crate.

* Allow using ChainSpec with extensions.

* Renames.

* Implement Extension derive.

* Implement Extension for Forks.

* Support specifying fork blocks.

* make for_blocks work

* Support forks correctly.

* Add a bunch of docs.

* Make fork blocks optional.

* Add missing docs.

* Fix build.

* Use struct for check_block params.

* Fix tests?

* Clean up.
This commit is contained in:
Tomasz Drwięga
2019-09-28 19:05:36 +02:00
committed by Gavin Wood
parent c555b9bf88
commit 667ee95f5d
39 changed files with 1368 additions and 336 deletions
+2 -1
View File
@@ -15,7 +15,7 @@ slog = {version = "^2", features = ["nested-values"]}
tokio-executor = "0.1.7"
tokio-timer = "0.2"
exit-future = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde = { version = "1.0" }
serde_json = "1.0"
sysinfo = "0.9.0"
target_info = "0.1"
@@ -27,6 +27,7 @@ session = { package = "substrate-session", path = "../session" }
app-crypto = { package = "substrate-application-crypto", path = "../application-crypto" }
consensus_common = { package = "substrate-consensus-common", path = "../../core/consensus/common" }
network = { package = "substrate-network", path = "../../core/network" }
chain-spec = { package = "substrate-chain-spec", path = "../chain-spec" }
client = { package = "substrate-client", path = "../../core/client" }
client_db = { package = "substrate-client-db", path = "../../core/client/db", features = ["kvdb-rocksdb"] }
codec = { package = "parity-scale-codec", version = "1.0.0" }