referrerpolicy=no-referrer-when-downgrade

snowbridge_pallet_ethereum_client/
types.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
3pub use crate::config::{
4	SLOTS_PER_HISTORICAL_ROOT, SYNC_COMMITTEE_BITS_SIZE as SC_BITS_SIZE,
5	SYNC_COMMITTEE_SIZE as SC_SIZE,
6};
7use frame_support::storage::types::OptionQuery;
8use snowbridge_core::RingBufferMapImpl;
9
10// Specialize types based on configured sync committee size
11pub type SyncCommittee = snowbridge_beacon_primitives::SyncCommittee<SC_SIZE>;
12pub type SyncCommitteePrepared = snowbridge_beacon_primitives::SyncCommitteePrepared<SC_SIZE>;
13pub type SyncAggregate = snowbridge_beacon_primitives::SyncAggregate<SC_SIZE, SC_BITS_SIZE>;
14pub type CheckpointUpdate = snowbridge_beacon_primitives::CheckpointUpdate<SC_SIZE>;
15pub type Update = snowbridge_beacon_primitives::Update<SC_SIZE, SC_BITS_SIZE>;
16pub type NextSyncCommitteeUpdate = snowbridge_beacon_primitives::NextSyncCommitteeUpdate<SC_SIZE>;
17
18pub use snowbridge_beacon_primitives::{AncestryProof, ExecutionProof};
19
20/// FinalizedState ring buffer implementation
21pub type FinalizedBeaconStateBuffer<T> = RingBufferMapImpl<
22	u32,
23	crate::MaxFinalizedHeadersToKeep<T>,
24	crate::FinalizedBeaconStateIndex<T>,
25	crate::FinalizedBeaconStateMapping<T>,
26	crate::FinalizedBeaconState<T>,
27	OptionQuery,
28>;