mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Merge devnet 3 (#2859)
## Issue Addressed N/A ## Proposed Changes Changes required for the `merge-devnet-3`. Added some more non substantive renames on top of @realbigsean 's commit. Note: this doesn't include the proposer boosting changes in kintsugi v3. This devnet isn't running with the proposer boosting fork choice changes so if we are looking to merge https://github.com/sigp/lighthouse/pull/2822 into `unstable`, then I think we should just maintain this branch for the devnet temporarily. Co-authored-by: realbigsean <seananderson33@gmail.com> Co-authored-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
@@ -66,7 +66,7 @@ use ssz::Encode;
|
||||
use state_processing::{
|
||||
common::get_indexed_attestation,
|
||||
per_block_processing,
|
||||
per_block_processing::{errors::AttestationValidationError, is_merge_complete},
|
||||
per_block_processing::{errors::AttestationValidationError, is_merge_transition_complete},
|
||||
per_slot_processing,
|
||||
state_advance::{complete_state_advance, partial_state_advance},
|
||||
BlockSignatureStrategy, SigVerifiedOp,
|
||||
@@ -195,7 +195,7 @@ pub struct HeadInfo {
|
||||
pub genesis_time: u64,
|
||||
pub genesis_validators_root: Hash256,
|
||||
pub proposer_shuffling_decision_root: Hash256,
|
||||
pub is_merge_complete: bool,
|
||||
pub is_merge_transition_complete: bool,
|
||||
pub execution_payload_block_hash: Option<Hash256>,
|
||||
}
|
||||
|
||||
@@ -1023,7 +1023,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
genesis_time: head.beacon_state.genesis_time(),
|
||||
genesis_validators_root: head.beacon_state.genesis_validators_root(),
|
||||
proposer_shuffling_decision_root,
|
||||
is_merge_complete: is_merge_complete(&head.beacon_state),
|
||||
is_merge_transition_complete: is_merge_transition_complete(&head.beacon_state),
|
||||
execution_payload_block_hash: head
|
||||
.beacon_block
|
||||
.message()
|
||||
@@ -3153,7 +3153,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
.body()
|
||||
.execution_payload()
|
||||
.map(|ep| ep.block_hash);
|
||||
let is_merge_complete = is_merge_complete(&new_head.beacon_state);
|
||||
let is_merge_transition_complete = is_merge_transition_complete(&new_head.beacon_state);
|
||||
|
||||
drop(lag_timer);
|
||||
|
||||
@@ -3387,7 +3387,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
|
||||
// If this is a post-merge block, update the execution layer.
|
||||
if let Some(new_head_execution_block_hash) = new_head_execution_block_hash_opt {
|
||||
if is_merge_complete {
|
||||
if is_merge_transition_complete {
|
||||
let execution_layer = self
|
||||
.execution_layer
|
||||
.clone()
|
||||
|
||||
@@ -60,7 +60,7 @@ use safe_arith::ArithError;
|
||||
use slog::{debug, error, Logger};
|
||||
use slot_clock::SlotClock;
|
||||
use ssz::Encode;
|
||||
use state_processing::per_block_processing::is_merge_block;
|
||||
use state_processing::per_block_processing::is_merge_transition_block;
|
||||
use state_processing::{
|
||||
block_signature_verifier::{BlockSignatureVerifier, Error as BlockSignatureVerifierError},
|
||||
per_block_processing, per_slot_processing,
|
||||
@@ -1114,7 +1114,7 @@ impl<'a, T: BeaconChainTypes> FullyVerifiedBlock<'a, T> {
|
||||
// early.
|
||||
// - Doing the check here means we can keep our fork-choice implementation "pure". I.e., no
|
||||
// calls to remote servers.
|
||||
if is_merge_block(&state, block.message().body()) {
|
||||
if is_merge_transition_block(&state, block.message().body()) {
|
||||
validate_merge_block(chain, block.message())?
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ use proto_array::{Block as ProtoBlock, ExecutionStatus};
|
||||
use slog::debug;
|
||||
use slot_clock::SlotClock;
|
||||
use state_processing::per_block_processing::{
|
||||
compute_timestamp_at_slot, is_execution_enabled, is_merge_complete,
|
||||
compute_timestamp_at_slot, is_execution_enabled, is_merge_transition_complete,
|
||||
partially_verify_execution_payload,
|
||||
};
|
||||
use types::*;
|
||||
@@ -150,7 +150,7 @@ pub fn validate_execution_payload_for_gossip<T: BeaconChainTypes>(
|
||||
// This logic should match `is_execution_enabled`. We use only the execution block hash of
|
||||
// the parent here in order to avoid loading the parent state during gossip verification.
|
||||
|
||||
let is_merge_complete = match parent_block.execution_status {
|
||||
let is_merge_transition_complete = match parent_block.execution_status {
|
||||
// Optimistically declare that an "unknown" status block has completed the merge.
|
||||
ExecutionStatus::Valid(_) | ExecutionStatus::Unknown(_) => true,
|
||||
// It's impossible for an irrelevant block to have completed the merge. It is pre-merge
|
||||
@@ -165,7 +165,7 @@ pub fn validate_execution_payload_for_gossip<T: BeaconChainTypes>(
|
||||
}
|
||||
};
|
||||
|
||||
if is_merge_complete || execution_payload != &<_>::default() {
|
||||
if is_merge_transition_complete || execution_payload != &<_>::default() {
|
||||
let expected_timestamp = chain
|
||||
.slot_clock
|
||||
.start_of(block.slot())
|
||||
@@ -247,7 +247,7 @@ pub async fn prepare_execution_payload<T: BeaconChainTypes>(
|
||||
.as_ref()
|
||||
.ok_or(BlockProductionError::ExecutionLayerMissing)?;
|
||||
|
||||
let parent_hash = if !is_merge_complete(state) {
|
||||
let parent_hash = if !is_merge_transition_complete(state) {
|
||||
let is_terminal_block_hash_set = spec.terminal_block_hash != Hash256::zero();
|
||||
let is_activation_epoch_reached =
|
||||
state.current_epoch() >= spec.terminal_block_hash_activation_epoch;
|
||||
@@ -292,7 +292,7 @@ pub async fn prepare_execution_payload<T: BeaconChainTypes>(
|
||||
.map(|ep| ep.block_hash)
|
||||
};
|
||||
|
||||
// Note: the fee_recipient is stored in the `execution_layer`, it will add this parameter.
|
||||
// Note: the suggested_fee_recipient is stored in the `execution_layer`, it will add this parameter.
|
||||
let execution_payload = execution_layer
|
||||
.get_payload(
|
||||
parent_hash,
|
||||
|
||||
Reference in New Issue
Block a user