37 breaking releases

new 0.48.0 Jan 29, 2025
0.45.0 Sep 26, 2024
0.44.0 Jul 18, 2024
0.37.0 Mar 18, 2024
0.9.0 Feb 10, 2021

#8 in #states

Download history 894/week @ 2024-10-09 956/week @ 2024-10-16 1218/week @ 2024-10-23 1211/week @ 2024-10-30 950/week @ 2024-11-06 1332/week @ 2024-11-13 1599/week @ 2024-11-20 1308/week @ 2024-11-27 1651/week @ 2024-12-04 1934/week @ 2024-12-11 1508/week @ 2024-12-18 921/week @ 2024-12-25 1005/week @ 2025-01-01 1504/week @ 2025-01-08 1520/week @ 2025-01-15 1199/week @ 2025-01-22

5,399 downloads per month
Used in 15 crates (3 directly)

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

2MB
28K SLoC

Release

Polkadot SDK Stable 2412


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

~75–110MB
~2M SLoC