mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Add Fulu boilerplate (#6695)
* Add Fulu boilerplate * Add more boilerplate * Change fulu_time to osaka_time * Merge branch 'unstable' into fulu-boilerplate * Fix tests * Merge branch 'unstable' into fulu-boilerplate * More test fixes * Apply suggestions * Remove `get_payload` boilerplate * Add lightclient fulu types and fix beacon-chain-tests * Disable Fulu in ef-tests * Reduce boilerplate for future forks * Small fixes * One more fix * Apply suggestions * Merge branch 'unstable' into fulu-boilerplate * Fix lints
This commit is contained in:
@@ -22,7 +22,8 @@ const ALTAIR_FORK_EPOCH: u64 = 0;
|
||||
const BELLATRIX_FORK_EPOCH: u64 = 0;
|
||||
const CAPELLA_FORK_EPOCH: u64 = 1;
|
||||
const DENEB_FORK_EPOCH: u64 = 2;
|
||||
//const ELECTRA_FORK_EPOCH: u64 = 3;
|
||||
// const ELECTRA_FORK_EPOCH: u64 = 3;
|
||||
// const FULU_FORK_EPOCH: u64 = 4;
|
||||
|
||||
const SUGGESTED_FEE_RECIPIENT: [u8; 20] =
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
|
||||
@@ -118,6 +119,7 @@ pub fn run_basic_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
spec.capella_fork_epoch = Some(Epoch::new(CAPELLA_FORK_EPOCH));
|
||||
spec.deneb_fork_epoch = Some(Epoch::new(DENEB_FORK_EPOCH));
|
||||
//spec.electra_fork_epoch = Some(Epoch::new(ELECTRA_FORK_EPOCH));
|
||||
//spec.fulu_fork_epoch = Some(Epoch::new(FULU_FORK_EPOCH));
|
||||
let spec = Arc::new(spec);
|
||||
env.eth2_config.spec = spec.clone();
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ const ALTAIR_FORK_EPOCH: u64 = 0;
|
||||
const BELLATRIX_FORK_EPOCH: u64 = 0;
|
||||
const CAPELLA_FORK_EPOCH: u64 = 1;
|
||||
const DENEB_FORK_EPOCH: u64 = 2;
|
||||
//const ELECTRA_FORK_EPOCH: u64 = 3;
|
||||
// const ELECTRA_FORK_EPOCH: u64 = 3;
|
||||
// const FULU_FORK_EPOCH: u64 = 4;
|
||||
|
||||
// Since simulator tests are non-deterministic and there is a non-zero chance of missed
|
||||
// attestations, define an acceptable network-wide attestation performance.
|
||||
@@ -123,6 +124,7 @@ pub fn run_fallback_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
spec.capella_fork_epoch = Some(Epoch::new(CAPELLA_FORK_EPOCH));
|
||||
spec.deneb_fork_epoch = Some(Epoch::new(DENEB_FORK_EPOCH));
|
||||
//spec.electra_fork_epoch = Some(Epoch::new(ELECTRA_FORK_EPOCH));
|
||||
//spec.fulu_fork_epoch = Some(Epoch::new(FULU_FORK_EPOCH));
|
||||
let spec = Arc::new(spec);
|
||||
env.eth2_config.spec = spec.clone();
|
||||
|
||||
|
||||
@@ -88,6 +88,11 @@ fn default_mock_execution_config<E: EthSpec>(
|
||||
+ spec.seconds_per_slot * E::slots_per_epoch() * electra_fork_epoch.as_u64(),
|
||||
)
|
||||
}
|
||||
if let Some(fulu_fork_epoch) = spec.fulu_fork_epoch {
|
||||
mock_execution_config.osaka_time = Some(
|
||||
genesis_time + spec.seconds_per_slot * E::slots_per_epoch() * fulu_fork_epoch.as_u64(),
|
||||
)
|
||||
}
|
||||
|
||||
mock_execution_config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user