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 807/week @ 2024-08-26 515/week @ 2024-09-02 986/week @ 2024-09-09 1028/week @ 2024-09-16 1437/week @ 2024-09-23 1573/week @ 2024-09-30 904/week @ 2024-10-07 898/week @ 2024-10-14 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

6,444 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

~81–120MB
~2.5M SLoC