From ae7c54de9cbd258bdc214a49c7346d343bc732b8 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 17 May 2024 12:23:35 +0200 Subject: [PATCH 1/3] public storage items --- .../parachain/pallets/ethereum-client/src/lib.rs | 16 ++++++++-------- .../pallets/ethereum-client/src/types.rs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs b/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs index a8e725c9e9624..3ecbc661904c7 100644 --- a/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs +++ b/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs @@ -156,40 +156,40 @@ pub mod pallet { /// Latest imported checkpoint root #[pallet::storage] #[pallet::getter(fn initial_checkpoint_root)] - pub(super) type InitialCheckpointRoot = StorageValue<_, H256, ValueQuery>; + pub type InitialCheckpointRoot = StorageValue<_, H256, ValueQuery>; /// Latest imported finalized block root #[pallet::storage] #[pallet::getter(fn latest_finalized_block_root)] - pub(super) type LatestFinalizedBlockRoot = StorageValue<_, H256, ValueQuery>; + pub type LatestFinalizedBlockRoot = StorageValue<_, H256, ValueQuery>; /// Beacon state by finalized block root #[pallet::storage] #[pallet::getter(fn finalized_beacon_state)] - pub(super) type FinalizedBeaconState = + pub type FinalizedBeaconState = StorageMap<_, Identity, H256, CompactBeaconState, OptionQuery>; /// Finalized Headers: Current position in ring buffer #[pallet::storage] - pub(crate) type FinalizedBeaconStateIndex = StorageValue<_, u32, ValueQuery>; + pub type FinalizedBeaconStateIndex = StorageValue<_, u32, ValueQuery>; /// Finalized Headers: Mapping of ring buffer index to a pruning candidate #[pallet::storage] - pub(crate) type FinalizedBeaconStateMapping = + pub type FinalizedBeaconStateMapping = StorageMap<_, Identity, u32, H256, ValueQuery>; #[pallet::storage] #[pallet::getter(fn validators_root)] - pub(super) type ValidatorsRoot = StorageValue<_, H256, ValueQuery>; + pub type ValidatorsRoot = StorageValue<_, H256, ValueQuery>; /// Sync committee for current period #[pallet::storage] - pub(super) type CurrentSyncCommittee = + pub type CurrentSyncCommittee = StorageValue<_, SyncCommitteePrepared, ValueQuery>; /// Sync committee for next period #[pallet::storage] - pub(super) type NextSyncCommittee = + pub type NextSyncCommittee = StorageValue<_, SyncCommitteePrepared, ValueQuery>; /// Latest imported execution header diff --git a/bridges/snowbridge/parachain/pallets/ethereum-client/src/types.rs b/bridges/snowbridge/parachain/pallets/ethereum-client/src/types.rs index 5dcefea9f80f4..051e39fc2bf70 100644 --- a/bridges/snowbridge/parachain/pallets/ethereum-client/src/types.rs +++ b/bridges/snowbridge/parachain/pallets/ethereum-client/src/types.rs @@ -28,7 +28,7 @@ pub type ExecutionHeaderBuffer = RingBufferMapImpl< >; /// FinalizedState ring buffer implementation -pub(crate) type FinalizedBeaconStateBuffer = RingBufferMapImpl< +pub type FinalizedBeaconStateBuffer = RingBufferMapImpl< u32, crate::MaxFinalizedHeadersToKeep, crate::FinalizedBeaconStateIndex, From 8fcd6e35bcf9a2c95bf3efc85d29c1dfa31a4eeb Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 17 May 2024 12:28:14 +0200 Subject: [PATCH 2/3] execution header public storage --- bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs b/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs index 3ecbc661904c7..b407dfc1854bf 100644 --- a/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs +++ b/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs @@ -195,7 +195,7 @@ pub mod pallet { /// Latest imported execution header #[pallet::storage] #[pallet::getter(fn latest_execution_state)] - pub(super) type LatestExecutionState = + pub type LatestExecutionState = StorageValue<_, ExecutionHeaderState, ValueQuery>; /// Execution Headers From b04c82a92f19b61efead62a115f1ded12eb638ee Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 17 May 2024 13:06:56 +0200 Subject: [PATCH 3/3] fmt --- .../parachain/pallets/ethereum-client/src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs b/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs index b407dfc1854bf..c98ed3acefc66 100644 --- a/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs +++ b/bridges/snowbridge/parachain/pallets/ethereum-client/src/lib.rs @@ -184,19 +184,16 @@ pub mod pallet { /// Sync committee for current period #[pallet::storage] - pub type CurrentSyncCommittee = - StorageValue<_, SyncCommitteePrepared, ValueQuery>; + pub type CurrentSyncCommittee = StorageValue<_, SyncCommitteePrepared, ValueQuery>; /// Sync committee for next period #[pallet::storage] - pub type NextSyncCommittee = - StorageValue<_, SyncCommitteePrepared, ValueQuery>; + pub type NextSyncCommittee = StorageValue<_, SyncCommitteePrepared, ValueQuery>; /// Latest imported execution header #[pallet::storage] #[pallet::getter(fn latest_execution_state)] - pub type LatestExecutionState = - StorageValue<_, ExecutionHeaderState, ValueQuery>; + pub type LatestExecutionState = StorageValue<_, ExecutionHeaderState, ValueQuery>; /// Execution Headers #[pallet::storage]