34 breaking releases
0.44.0 | Jul 18, 2024 |
---|---|
0.41.0 | Jun 24, 2024 |
0.37.0 | Mar 18, 2024 |
0.33.0 | Dec 13, 2023 |
0.9.0 | Feb 10, 2021 |
#35 in #clients
3,227 downloads per month
Used in 12 crates
(3 directly)
1.5MB
27K
SLoC
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
~78–115MB
~2M SLoC