mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Update to spec v1.1.8 (#2893)
## Proposed Changes Change the canonical fork name for the merge to Bellatrix. Keep other merge naming the same to avoid churn. I've also fixed and enabled the `fork` and `transition` tests for Bellatrix, and the v1.1.7 fork choice tests. Additionally, the `BellatrixPreset` has been added with tests. It gets served via the `/config/spec` API endpoint along with the other presets.
This commit is contained in:
@@ -30,11 +30,11 @@ fn verify_execution_payload_chain<T: EthSpec>(chain: &[ExecutionPayload<T>]) {
|
||||
#[should_panic]
|
||||
fn merge_with_terminal_block_hash_override() {
|
||||
let altair_fork_epoch = Epoch::new(0);
|
||||
let merge_fork_epoch = Epoch::new(0);
|
||||
let bellatrix_fork_epoch = Epoch::new(0);
|
||||
|
||||
let mut spec = E::default_spec();
|
||||
spec.altair_fork_epoch = Some(altair_fork_epoch);
|
||||
spec.merge_fork_epoch = Some(merge_fork_epoch);
|
||||
spec.bellatrix_fork_epoch = Some(bellatrix_fork_epoch);
|
||||
|
||||
let genesis_pow_block_hash = generate_pow_block(
|
||||
spec.terminal_total_difficulty,
|
||||
@@ -95,12 +95,12 @@ fn merge_with_terminal_block_hash_override() {
|
||||
fn base_altair_merge_with_terminal_block_after_fork() {
|
||||
let altair_fork_epoch = Epoch::new(4);
|
||||
let altair_fork_slot = altair_fork_epoch.start_slot(E::slots_per_epoch());
|
||||
let merge_fork_epoch = Epoch::new(8);
|
||||
let merge_fork_slot = merge_fork_epoch.start_slot(E::slots_per_epoch());
|
||||
let bellatrix_fork_epoch = Epoch::new(8);
|
||||
let merge_fork_slot = bellatrix_fork_epoch.start_slot(E::slots_per_epoch());
|
||||
|
||||
let mut spec = E::default_spec();
|
||||
spec.altair_fork_epoch = Some(altair_fork_epoch);
|
||||
spec.merge_fork_epoch = Some(merge_fork_epoch);
|
||||
spec.bellatrix_fork_epoch = Some(bellatrix_fork_epoch);
|
||||
|
||||
let mut execution_payloads = vec![];
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ pub fn fork_context() -> ForkContext {
|
||||
// Set fork_epoch to `Some` to ensure that the `ForkContext` object
|
||||
// includes altair in the list of forks
|
||||
chain_spec.altair_fork_epoch = Some(types::Epoch::new(42));
|
||||
chain_spec.merge_fork_epoch = Some(types::Epoch::new(84));
|
||||
chain_spec.bellatrix_fork_epoch = Some(types::Epoch::new(84));
|
||||
ForkContext::new::<E>(types::Slot::new(0), Hash256::zero(), &chain_spec)
|
||||
}
|
||||
|
||||
|
||||
@@ -469,7 +469,7 @@ pub fn get_config<E: EthSpec>(
|
||||
}
|
||||
|
||||
client_config.chain.max_network_size =
|
||||
lighthouse_network::gossip_max_size(spec.merge_fork_epoch.is_some());
|
||||
lighthouse_network::gossip_max_size(spec.bellatrix_fork_epoch.is_some());
|
||||
|
||||
if cli_args.is_present("slasher") {
|
||||
let slasher_dir = if let Some(slasher_dir) = cli_args.value_of("slasher-dir") {
|
||||
|
||||
Reference in New Issue
Block a user