From 14f1aa112180c6a7ad03896d60cd4c5e12014d04 Mon Sep 17 00:00:00 2001 From: Eitan Seri- Levi Date: Thu, 26 Mar 2026 22:03:17 -0700 Subject: [PATCH] merge conflicts --- .../beacon_chain/src/block_verification.rs | 12 +++++++----- beacon_node/beacon_chain/tests/store_tests.rs | 2 +- beacon_node/store/src/hdiff.rs | 19 +++++-------------- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/beacon_node/beacon_chain/src/block_verification.rs b/beacon_node/beacon_chain/src/block_verification.rs index 324f50d74c..5988a0b2b1 100644 --- a/beacon_node/beacon_chain/src/block_verification.rs +++ b/beacon_node/beacon_chain/src/block_verification.rs @@ -1956,11 +1956,13 @@ fn load_parent>( if block.as_block().is_parent_block_full(parent_bid_block_hash) { // TODO(gloas): loading the envelope here is not very efficient // TODO(gloas): check parent payload existence prior to this point? - let envelope = chain.store.get_payload_envelope(&root)?.ok_or_else(|| { - BeaconChainError::DBInconsistent(format!( - "Missing envelope for parent block {root:?}", - )) - })?; + // If the parent's execution payload envelope hasn't arrived yet, + // return an unknown parent error so the block gets sent to the + // reprocess queue. + let envelope = chain + .store + .get_payload_envelope(&root)? + .ok_or(BlockError::ParentEnvelopeUnknown { parent_root: root })?; (StatePayloadStatus::Full, envelope.message.state_root) } else { (StatePayloadStatus::Pending, parent_block.state_root()) diff --git a/beacon_node/beacon_chain/tests/store_tests.rs b/beacon_node/beacon_chain/tests/store_tests.rs index ce5864a9d4..2b4152b550 100644 --- a/beacon_node/beacon_chain/tests/store_tests.rs +++ b/beacon_node/beacon_chain/tests/store_tests.rs @@ -5129,7 +5129,7 @@ async fn replay_from_split_state() { assert!( store .hierarchy - .storage_strategy(split.slot, anchor_slot, StatePayloadStatus::Pending) + .storage_strategy(split.slot, anchor_slot) .unwrap() .is_replay_from() ); diff --git a/beacon_node/store/src/hdiff.rs b/beacon_node/store/src/hdiff.rs index aa718e0665..85ac56454c 100644 --- a/beacon_node/store/src/hdiff.rs +++ b/beacon_node/store/src/hdiff.rs @@ -815,42 +815,33 @@ mod tests { let sslot = Slot::new(0); let moduli = config.to_moduli().unwrap(); - let payload_status = StatePayloadStatus::Pending; // Full snapshots at multiples of 2^21. let snapshot_freq = Slot::new(1 << 21); assert_eq!( - moduli - .storage_strategy(Slot::new(0), sslot, payload_status) - .unwrap(), + moduli.storage_strategy(Slot::new(0), sslot).unwrap(), StorageStrategy::Snapshot ); assert_eq!( - moduli - .storage_strategy(snapshot_freq, sslot, payload_status) - .unwrap(), + moduli.storage_strategy(snapshot_freq, sslot).unwrap(), StorageStrategy::Snapshot ); assert_eq!( - moduli - .storage_strategy(snapshot_freq * 3, sslot, payload_status) - .unwrap(), + moduli.storage_strategy(snapshot_freq * 3, sslot).unwrap(), StorageStrategy::Snapshot ); // Diffs should be from the previous layer (the snapshot in this case), and not the previous diff in the same layer. let first_layer = Slot::new(1 << 18); assert_eq!( - moduli - .storage_strategy(first_layer * 2, sslot, payload_status) - .unwrap(), + moduli.storage_strategy(first_layer * 2, sslot).unwrap(), StorageStrategy::DiffFrom(Slot::new(0)) ); let replay_strategy_slot = first_layer + 1; assert_eq!( moduli - .storage_strategy(replay_strategy_slot, sslot, payload_status) + .storage_strategy(replay_strategy_slot, sslot) .unwrap(), StorageStrategy::ReplayFrom(first_layer) );