17 breaking releases

new 0.26.0 Mar 26, 2023
0.24.0 Feb 26, 2023
0.16.0 Dec 21, 2022
0.9.0 Feb 10, 2021

#487 in Magic Beans

Download history 3/week @ 2022-12-02 54/week @ 2022-12-09 135/week @ 2022-12-16 19/week @ 2022-12-23 9/week @ 2022-12-30 36/week @ 2023-01-06 30/week @ 2023-01-13 26/week @ 2023-01-20 33/week @ 2023-01-27 39/week @ 2023-02-03 48/week @ 2023-02-10 78/week @ 2023-02-17 31/week @ 2023-02-24 22/week @ 2023-03-03 49/week @ 2023-03-10 6/week @ 2023-03-17

113 downloads per month

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

1MB
25K SLoC

sc-sync-state-rpc

Auto-generated README.md for publishing to crates.io


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

~52–92MB
~1.5M SLoC