Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snowbridge - Ethereum Client - Public storage items #4504

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,47 +156,44 @@ pub mod pallet {
/// Latest imported checkpoint root
#[pallet::storage]
#[pallet::getter(fn initial_checkpoint_root)]
pub(super) type InitialCheckpointRoot<T: Config> = StorageValue<_, H256, ValueQuery>;
pub type InitialCheckpointRoot<T: Config> = StorageValue<_, H256, ValueQuery>;

/// Latest imported finalized block root
#[pallet::storage]
#[pallet::getter(fn latest_finalized_block_root)]
pub(super) type LatestFinalizedBlockRoot<T: Config> = StorageValue<_, H256, ValueQuery>;
pub type LatestFinalizedBlockRoot<T: Config> = StorageValue<_, H256, ValueQuery>;

/// Beacon state by finalized block root
#[pallet::storage]
#[pallet::getter(fn finalized_beacon_state)]
pub(super) type FinalizedBeaconState<T: Config> =
pub type FinalizedBeaconState<T: Config> =
StorageMap<_, Identity, H256, CompactBeaconState, OptionQuery>;

/// Finalized Headers: Current position in ring buffer
#[pallet::storage]
pub(crate) type FinalizedBeaconStateIndex<T: Config> = StorageValue<_, u32, ValueQuery>;
pub type FinalizedBeaconStateIndex<T: Config> = StorageValue<_, u32, ValueQuery>;

/// Finalized Headers: Mapping of ring buffer index to a pruning candidate
#[pallet::storage]
pub(crate) type FinalizedBeaconStateMapping<T: Config> =
pub type FinalizedBeaconStateMapping<T: Config> =
StorageMap<_, Identity, u32, H256, ValueQuery>;

#[pallet::storage]
#[pallet::getter(fn validators_root)]
pub(super) type ValidatorsRoot<T: Config> = StorageValue<_, H256, ValueQuery>;
pub type ValidatorsRoot<T: Config> = StorageValue<_, H256, ValueQuery>;

/// Sync committee for current period
#[pallet::storage]
pub(super) type CurrentSyncCommittee<T: Config> =
StorageValue<_, SyncCommitteePrepared, ValueQuery>;
pub type CurrentSyncCommittee<T: Config> = StorageValue<_, SyncCommitteePrepared, ValueQuery>;

/// Sync committee for next period
#[pallet::storage]
pub(super) type NextSyncCommittee<T: Config> =
StorageValue<_, SyncCommitteePrepared, ValueQuery>;
pub type NextSyncCommittee<T: Config> = StorageValue<_, SyncCommitteePrepared, ValueQuery>;

/// Latest imported execution header
#[pallet::storage]
#[pallet::getter(fn latest_execution_state)]
pub(super) type LatestExecutionState<T: Config> =
StorageValue<_, ExecutionHeaderState, ValueQuery>;
pub type LatestExecutionState<T: Config> = StorageValue<_, ExecutionHeaderState, ValueQuery>;

/// Execution Headers
#[pallet::storage]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub type ExecutionHeaderBuffer<T> = RingBufferMapImpl<
>;

/// FinalizedState ring buffer implementation
pub(crate) type FinalizedBeaconStateBuffer<T> = RingBufferMapImpl<
pub type FinalizedBeaconStateBuffer<T> = RingBufferMapImpl<
u32,
crate::MaxFinalizedHeadersToKeep<T>,
crate::FinalizedBeaconStateIndex<T>,
Expand Down
Loading