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

#859 in Magic Beans

Download history 1296/week @ 2024-10-21 1010/week @ 2024-10-28 1198/week @ 2024-11-04 968/week @ 2024-11-11 1647/week @ 2024-11-18 1362/week @ 2024-11-25 1464/week @ 2024-12-02 1877/week @ 2024-12-09 1949/week @ 2024-12-16 902/week @ 2024-12-23 962/week @ 2024-12-30 1301/week @ 2025-01-06 1641/week @ 2025-01-13 1456/week @ 2025-01-20 1507/week @ 2025-01-27 1215/week @ 2025-02-03

5,970 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

~75–110MB
~2M SLoC