-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into oty-revert-tracks-iter
- Loading branch information
Showing
22 changed files
with
3,195 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
bridges/snowbridge/pallets/ethereum-client/src/config/altair.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]> | ||
|
||
/// Generalized Indices | ||
/// related to Merkle proofs | ||
/// get_generalized_index(BeaconState, 'block_roots') | ||
pub const BLOCK_ROOTS_INDEX: usize = 37; | ||
/// get_generalized_index(BeaconState, 'finalized_checkpoint', 'root') | ||
pub const FINALIZED_ROOT_INDEX: usize = 105; | ||
/// get_generalized_index(BeaconState, 'current_sync_committee') | ||
pub const CURRENT_SYNC_COMMITTEE_INDEX: usize = 54; | ||
/// get_generalized_index(BeaconState, 'next_sync_committee') | ||
pub const NEXT_SYNC_COMMITTEE_INDEX: usize = 55; | ||
/// get_generalized_index(BeaconBlockBody, 'execution_payload') | ||
pub const EXECUTION_HEADER_INDEX: usize = 25; |
13 changes: 13 additions & 0 deletions
13
bridges/snowbridge/pallets/ethereum-client/src/config/electra.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]> | ||
|
||
/// Generalized Indices | ||
/// related to Merkle proofs | ||
/// get_generalized_index(BeaconState, 'block_roots') | ||
pub const BLOCK_ROOTS_INDEX: usize = 69; | ||
/// get_generalized_index(BeaconState, 'finalized_checkpoint', 'root') | ||
pub const FINALIZED_ROOT_INDEX: usize = 169; | ||
/// get_generalized_index(BeaconState, 'current_sync_committee') | ||
pub const CURRENT_SYNC_COMMITTEE_INDEX: usize = 86; | ||
/// get_generalized_index(BeaconState, 'next_sync_committee') | ||
pub const NEXT_SYNC_COMMITTEE_INDEX: usize = 87; |
30 changes: 2 additions & 28 deletions
30
bridges/snowbridge/pallets/ethereum-client/src/config/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,9 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]> | ||
use snowbridge_beacon_primitives::merkle_proof::{generalized_index_length, subtree_index}; | ||
use static_assertions::const_assert; | ||
|
||
/// Generalized Indices | ||
/// related to Merkle proofs | ||
/// get_generalized_index(BeaconState, 'block_roots') | ||
pub const BLOCK_ROOTS_INDEX: usize = 37; | ||
pub const BLOCK_ROOTS_SUBTREE_INDEX: usize = subtree_index(BLOCK_ROOTS_INDEX); | ||
pub const BLOCK_ROOTS_DEPTH: usize = generalized_index_length(BLOCK_ROOTS_INDEX); | ||
|
||
/// get_generalized_index(BeaconState, 'finalized_checkpoint', 'root') | ||
pub const FINALIZED_ROOT_INDEX: usize = 105; | ||
pub const FINALIZED_ROOT_SUBTREE_INDEX: usize = subtree_index(FINALIZED_ROOT_INDEX); | ||
pub const FINALIZED_ROOT_DEPTH: usize = generalized_index_length(FINALIZED_ROOT_INDEX); | ||
|
||
/// get_generalized_index(BeaconState, 'current_sync_committee') | ||
pub const CURRENT_SYNC_COMMITTEE_INDEX: usize = 54; | ||
pub const CURRENT_SYNC_COMMITTEE_SUBTREE_INDEX: usize = subtree_index(CURRENT_SYNC_COMMITTEE_INDEX); | ||
pub const CURRENT_SYNC_COMMITTEE_DEPTH: usize = | ||
generalized_index_length(CURRENT_SYNC_COMMITTEE_INDEX); | ||
|
||
/// get_generalized_index(BeaconState, 'next_sync_committee') | ||
pub const NEXT_SYNC_COMMITTEE_INDEX: usize = 55; | ||
pub const NEXT_SYNC_COMMITTEE_SUBTREE_INDEX: usize = subtree_index(NEXT_SYNC_COMMITTEE_INDEX); | ||
pub const NEXT_SYNC_COMMITTEE_DEPTH: usize = generalized_index_length(NEXT_SYNC_COMMITTEE_INDEX); | ||
|
||
/// get_generalized_index(BeaconBlockBody, 'execution_payload') | ||
pub const EXECUTION_HEADER_INDEX: usize = 25; | ||
pub const EXECUTION_HEADER_SUBTREE_INDEX: usize = subtree_index(EXECUTION_HEADER_INDEX); | ||
pub const EXECUTION_HEADER_DEPTH: usize = generalized_index_length(EXECUTION_HEADER_INDEX); | ||
pub mod altair; | ||
pub mod electra; | ||
|
||
/// Sizes related to SSZ encoding | ||
pub const MAX_EXTRA_DATA_BYTES: usize = 32; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.