This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SNO-285 setup local beacon testnet for e2e tests (paritytech#661)
* Starts with setting up CL in E2E tests * Progress on beacon network * Attempts to get script to work * Simple example for debugging * Finally got the lodestar dependencies to import. * Update script with latest `next` code. * Fix script. * Progress on private beacon net * Adds jwt token * Lodestar setup script * Updated dependencies * Try the local setup again. * Beacon node local testnet function added * Cleanup * Fixes * Config for local net * Adds constants * Cleans up errors so main problem is evident * Pallet config constant progress * Try something else * Swap constants based on config. * Cleanup * Revert to usize for bitvector. * Revert changes. * Revert unnecessary changes. * Local beacon net testing fixes * Temp config update to test minimal config * Testing minimal spec * Update API endpoints and use public Lodestar Ropsten server for start-services. * Remove echo. * Adds config replacement for beacon endpoint * Finishing off local beacon testnet * Last bit of cleanup * Final tweaks * PR comments * Reverts config Co-authored-by: claravanstaden <Cats 4 life!>
- Loading branch information
1 parent
de1d771
commit 7e34222
Showing
28 changed files
with
277 additions
and
198 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ workspace.code-workspace | |
|
||
# Node modules | ||
node_modules/ | ||
|
||
#Intellij project file | ||
.idea |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -62,3 +62,4 @@ runtime-benchmarks = [ | |
"frame-support/runtime-benchmarks", | ||
"frame-system/runtime-benchmarks", | ||
] | ||
minimal = [] |
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,17 +1,39 @@ | ||
pub const MAX_PROPOSER_SLASHINGS: usize = 16; | ||
#[cfg(feature = "minimal")] | ||
mod minimal; | ||
|
||
pub const MAX_ATTESTER_SLASHINGS: usize = 2; | ||
#[cfg(not(feature = "minimal"))] | ||
mod mainnet; | ||
|
||
pub const MAX_ATTESTATIONS: usize = 128; | ||
#[cfg(feature = "minimal")] | ||
pub use minimal::*; | ||
|
||
pub const MAX_DEPOSITS: usize = 16; | ||
#[cfg(not(feature = "minimal"))] | ||
pub use mainnet::*; | ||
|
||
pub const MAX_VOLUNTARY_EXITS: usize = 16; | ||
use snowbridge_beacon_primitives::ForkVersion; | ||
|
||
pub const CURRENT_SYNC_COMMITTEE_INDEX: u64 = 22; | ||
pub const CURRENT_SYNC_COMMITTEE_DEPTH: u64 = 5; | ||
|
||
pub const NEXT_SYNC_COMMITTEE_DEPTH: u64 = 5; | ||
pub const NEXT_SYNC_COMMITTEE_INDEX: u64 = 23; | ||
|
||
pub const FINALIZED_ROOT_DEPTH: u64 = 6; | ||
pub const FINALIZED_ROOT_INDEX: u64 = 41; | ||
|
||
pub const MAX_PROPOSER_SLASHINGS: usize = 16; | ||
pub const MAX_ATTESTER_SLASHINGS: usize = 2; | ||
pub const MAX_ATTESTATIONS: usize = 128; | ||
pub const MAX_DEPOSITS: usize = 16; | ||
pub const MAX_VOLUNTARY_EXITS: usize = 16; | ||
pub const MAX_VALIDATORS_PER_COMMITTEE: usize = 2048; | ||
pub const MAX_EXTRA_DATA_BYTES: usize = 32; | ||
|
||
pub const DEPOSIT_CONTRACT_TREE_DEPTH: usize = 32; | ||
|
||
pub const MAX_EXTRA_DATA_BYTES: usize = 32; | ||
/// GENESIS_FORK_VERSION('0x00000000') | ||
pub const GENESIS_FORK_VERSION: ForkVersion = [30, 30, 30, 30]; | ||
|
||
pub const SYNC_COMMITTEE_SIZE: usize = 512; | ||
/// DomainType('0x07000000') | ||
/// https://github.com/ethereum/consensus-specs/blob/dev/specs/altair/beacon-chain.md#domain-types | ||
pub const DOMAIN_SYNC_COMMITTEE: [u8; 4] = [7, 0, 0, 0]; |
3 changes: 3 additions & 0 deletions
3
parachain/pallets/ethereum-beacon-client/src/config/mainnet.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,3 @@ | ||
pub const SLOTS_PER_EPOCH: u64 = 32; | ||
pub const EPOCHS_PER_SYNC_COMMITTEE_PERIOD: u64 = 256; | ||
pub const SYNC_COMMITTEE_SIZE: usize = 512; |
3 changes: 3 additions & 0 deletions
3
parachain/pallets/ethereum-beacon-client/src/config/minimal.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,3 @@ | ||
pub const SLOTS_PER_EPOCH: u64 = 8; | ||
pub const EPOCHS_PER_SYNC_COMMITTEE_PERIOD: u64 = 8; | ||
pub const SYNC_COMMITTEE_SIZE: 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
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
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.