Decouples light-sync state from chain spec (#9491)
* Decouples light-sync state from chain spec This decouples the light-sync state from chain spec. First, the light-sync state currently only works with BABE+Grandpa, so not all *Substrate* based chains can use this feature. The next problem was also that this pulled the `sc-consensus-babe` and `sc-finality-grandpa` crate into `sc-chain-spec`. If a chain now wants to support the light-sync state, it needs to add the `LightSyncStateExtension` to the chain spec as an extension. This is documented in the crate level docs of `sc-sync-state-rpc`. If this extension is not available, `SyncStateRpc` fails at initialization. * Fix compilation for browser * Fmt
parent
2f4db88b
Showing
- substrate/Cargo.lock 3 additions, 4 deletionssubstrate/Cargo.lock
- substrate/bin/node-template/node/src/service.rs 2 additions, 2 deletionssubstrate/bin/node-template/node/src/service.rs
- substrate/bin/node/cli/Cargo.toml 1 addition, 0 deletionssubstrate/bin/node/cli/Cargo.toml
- substrate/bin/node/cli/src/chain_spec.rs 2 additions, 0 deletionssubstrate/bin/node/cli/src/chain_spec.rs
- substrate/bin/node/cli/src/service.rs 5 additions, 2 deletionssubstrate/bin/node/cli/src/service.rs
- substrate/bin/node/rpc/src/lib.rs 3 additions, 3 deletionssubstrate/bin/node/rpc/src/lib.rs
- substrate/client/chain-spec/Cargo.toml 0 additions, 4 deletionssubstrate/client/chain-spec/Cargo.toml
- substrate/client/chain-spec/derive/src/impls.rs 9 additions, 0 deletionssubstrate/client/chain-spec/derive/src/impls.rs
- substrate/client/chain-spec/src/chain_spec.rs 11 additions, 70 deletionssubstrate/client/chain-spec/src/chain_spec.rs
- substrate/client/chain-spec/src/extension.rs 35 additions, 9 deletionssubstrate/client/chain-spec/src/extension.rs
- substrate/client/chain-spec/src/lib.rs 6 additions, 6 deletionssubstrate/client/chain-spec/src/lib.rs
- substrate/client/consensus/babe/src/lib.rs 1 addition, 1 deletionsubstrate/client/consensus/babe/src/lib.rs
- substrate/client/service/src/builder.rs 10 additions, 10 deletionssubstrate/client/service/src/builder.rs
- substrate/client/service/src/lib.rs 20 additions, 14 deletionssubstrate/client/service/src/lib.rs
- substrate/client/sync-state-rpc/Cargo.toml 2 additions, 0 deletionssubstrate/client/sync-state-rpc/Cargo.toml
- substrate/client/sync-state-rpc/src/lib.rs 100 additions, 23 deletionssubstrate/client/sync-state-rpc/src/lib.rs
- substrate/test-utils/test-runner/src/client.rs 1 addition, 1 deletionsubstrate/test-utils/test-runner/src/client.rs
Please register or sign in to comment