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
+17
View File
@@ -0,0 +1,17 @@
[package]
name = "substrate-chain-spec"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
chain-spec-derive = { package = "substrate-chain-spec-derive", path = "./derive" }
impl-trait-for-tuples = "0.1.1"
network = { package = "substrate-network", path = "../../core/network" }
primitives = { package = "substrate-primitives", path = "../primitives" }
serde = { version = "1.0.101", features = ["derive"] }
serde_json = "1.0.40"
sr-primitives = { path = "../../core/sr-primitives" }
tel = { package = "substrate-telemetry", path = "../../core/telemetry" }
[dev-dependencies]