37 breaking releases

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

#10 in #states

Download history 1564/week @ 2024-11-16 1428/week @ 2024-11-23 1483/week @ 2024-11-30 1724/week @ 2024-12-07 2037/week @ 2024-12-14 882/week @ 2024-12-21 1012/week @ 2024-12-28 1244/week @ 2025-01-04 1684/week @ 2025-01-11 1437/week @ 2025-01-18 1481/week @ 2025-01-25 1434/week @ 2025-02-01 1546/week @ 2025-02-08 1625/week @ 2025-02-15 1405/week @ 2025-02-22 1586/week @ 2025-03-01

6,369 downloads per month
Used in 21 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

~78–115MB
~2M SLoC