34 breaking releases

0.44.0 Jul 18, 2024
0.41.0 Jun 24, 2024
0.37.0 Mar 18, 2024
0.33.0 Dec 13, 2023
0.9.0 Feb 10, 2021

#35 in #clients

Download history 1178/week @ 2024-05-25 1292/week @ 2024-06-01 1074/week @ 2024-06-08 812/week @ 2024-06-15 1258/week @ 2024-06-22 779/week @ 2024-06-29 497/week @ 2024-07-06 957/week @ 2024-07-13 602/week @ 2024-07-20 668/week @ 2024-07-27 700/week @ 2024-08-03 923/week @ 2024-08-10 1093/week @ 2024-08-17 841/week @ 2024-08-24 489/week @ 2024-08-31 682/week @ 2024-09-07

3,227 downloads per month
Used in 12 crates (3 directly)

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

1.5MB
27K SLoC

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