mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 05:07:12 +00:00
Gloas spec v1.7.0-alpha.5 and beacon_chain tests (#8998)
Fix database pruning post-Gloas - Fix DB pruning logic (and state summaries DAG) - Get the `beacon_chain` tests running with `FORK_NAME=gloas` 🎉 Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com> Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com> Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com> Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
@@ -108,6 +108,13 @@ pub enum BlockProcessingError {
|
||||
},
|
||||
/// Builder payment index out of bounds (Gloas)
|
||||
BuilderPaymentIndexOutOfBounds(usize),
|
||||
/// The parent execution requests root doesn't match the committed bid
|
||||
ExecutionRequestsRootMismatch {
|
||||
expected: Hash256,
|
||||
found: Hash256,
|
||||
},
|
||||
/// Parent was not full but non-empty execution requests were provided
|
||||
NonEmptyParentExecutionRequests,
|
||||
}
|
||||
|
||||
impl From<BeaconStateError> for BlockProcessingError {
|
||||
|
||||
@@ -1014,7 +1014,7 @@ async fn block_replayer_peeking_state_roots() {
|
||||
let block_replayer = BlockReplayer::new(parent_state, &harness.chain.spec)
|
||||
.state_root_iter(state_root_iter.into_iter())
|
||||
.no_signature_verification()
|
||||
.apply_blocks(vec![target_block], vec![], None)
|
||||
.apply_blocks(vec![target_block], None)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
|
||||
@@ -9,8 +9,8 @@ use safe_arith::{SafeArith, SafeArithIter};
|
||||
use tree_hash::TreeHash;
|
||||
use types::{
|
||||
AbstractExecPayload, BeaconState, BeaconStateError, ChainSpec, EthSpec, ExecPayload,
|
||||
ExpectedWithdrawals, ExpectedWithdrawalsCapella, ExpectedWithdrawalsElectra,
|
||||
ExpectedWithdrawalsGloas, Validator, Withdrawal, Withdrawals,
|
||||
ExecutionBlockHash, ExpectedWithdrawals, ExpectedWithdrawalsCapella,
|
||||
ExpectedWithdrawalsElectra, ExpectedWithdrawalsGloas, Validator, Withdrawal, Withdrawals,
|
||||
};
|
||||
|
||||
/// Compute the next batch of withdrawals which should be included in a block.
|
||||
@@ -494,7 +494,11 @@ pub mod gloas {
|
||||
state: &mut BeaconState<E>,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<(), BlockProcessingError> {
|
||||
if !state.is_parent_block_full() {
|
||||
// Return early if the parent block is empty.
|
||||
let is_genesis_block = *state.latest_block_hash()? == ExecutionBlockHash::default();
|
||||
let is_parent_block_empty =
|
||||
*state.latest_block_hash()? != state.latest_execution_payload_bid()?.block_hash;
|
||||
if is_genesis_block || is_parent_block_empty {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user