35 breaking releases
0.45.0 | Sep 26, 2024 |
---|---|
0.44.0 | Jul 18, 2024 |
0.42.0 | Jul 13, 2024 |
0.37.0 | Mar 18, 2024 |
0.9.0 | Feb 10, 2021 |
#6 in #states
6,444 downloads per month
Used in 13 crates
(3 directly)
1.5MB
27K
SLoC
Release
Polkadot SDK stable2409
lib.rs
:
A RPC handler to create sync states for light clients.
Currently only usable with BABE + GRANDPA.
Usage
To use the light sync state, it needs to be added as an extension to the chain spec:
use sc_sync_state_rpc::LightSyncStateExtension;
#[derive(Default, Clone, serde::Serialize, serde::Deserialize, sc_chain_spec::ChainSpecExtension)]
#[serde(rename_all = "camelCase")]
pub struct Extensions {
light_sync_state: LightSyncStateExtension,
}
type ChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>;
If the LightSyncStateExtension
is not added as an extension to the chain spec,
the SyncState
will fail at instantiation.
Dependencies
~81–120MB
~2.5M SLoC