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

Download history 571/week @ 2024-07-25 675/week @ 2024-08-01 920/week @ 2024-08-08 1007/week @ 2024-08-15 1008/week @ 2024-08-22 513/week @ 2024-08-29 716/week @ 2024-09-05 1215/week @ 2024-09-12 1121/week @ 2024-09-19 1734/week @ 2024-09-26 1036/week @ 2024-10-03 880/week @ 2024-10-10 1180/week @ 2024-10-17 981/week @ 2024-10-24 1226/week @ 2024-10-31 873/week @ 2024-11-07

4,434 downloads per month
Used in 13 crates (3 directly)

Apache-2.0 and GPL-3.0-or-later…

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

~80–120MB
~2.5M SLoC