Gloas attestation payload reprocess (#9440)

Handle payload-present attestations before the payload is seen (gloas)

A gloas beacon_attestation with index == 1 claims a past block's payload is already present. If we haven't seen that block's payload envelope yet, we shouldn't reject it the envelope may just be in flight.

So instead we IGNORE it (new AttnError::UnknownPayloadEnvelope), ask sync to fetch the envelope, and park the attestation in the reprocess queue. When the envelope is imported, the parked attestations are released and  re-verified.

The envelope lookup itself is stubbed here and wired up in #9155 or a follow up PR


  


Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
Lion - dapplion
2026-06-17 14:44:21 +02:00
committed by GitHub
parent 3bc9148e0e
commit a46620155b
22 changed files with 893 additions and 170 deletions

View File

@@ -1064,6 +1064,8 @@ where
execution_payload_parent_hash,
execution_payload_block_hash,
proposer_index: Some(block.proposer_index()),
// Set on payload-envelope import, not block import.
payload_received: false,
},
current_slot,
spec,

View File

@@ -68,6 +68,7 @@ fn build_chain(num_blocks: u64, gloas: bool) -> (ProtoArrayForkChoice, types::Ch
},
execution_payload_block_hash: if is_gloas { Some(get_hash(i)) } else { None },
proposer_index: Some(0),
payload_received: false,
};
fork_choice

View File

@@ -330,6 +330,7 @@ impl ForkChoiceTestDefinition {
execution_payload_parent_hash,
execution_payload_block_hash,
proposer_index: Some(0),
payload_received: false,
};
fork_choice
.process_block::<MainnetEthSpec>(block, slot, &spec, Duration::ZERO)

View File

@@ -242,6 +242,8 @@ pub struct Block {
pub execution_payload_parent_hash: Option<ExecutionBlockHash>,
pub execution_payload_block_hash: Option<ExecutionBlockHash>,
pub proposer_index: Option<u64>,
/// Whether the block's execution payload envelope has been received. Always `false` pre-Gloas.
pub payload_received: bool,
}
impl Block {
@@ -502,6 +504,7 @@ impl ProtoArrayForkChoice {
execution_payload_parent_hash,
execution_payload_block_hash,
proposer_index: Some(proposer_index),
payload_received: false,
};
proto_array
@@ -959,6 +962,7 @@ impl ProtoArrayForkChoice {
execution_payload_parent_hash: block.execution_payload_parent_hash().ok(),
execution_payload_block_hash: block.execution_payload_block_hash().ok(),
proposer_index: block.proposer_index().ok(),
payload_received: block.payload_received().unwrap_or(false),
})
}
@@ -1383,6 +1387,7 @@ mod test_compute_deltas {
execution_payload_parent_hash: None,
execution_payload_block_hash: None,
proposer_index: Some(0),
payload_received: false,
},
genesis_slot + 1,
&spec,
@@ -1411,6 +1416,7 @@ mod test_compute_deltas {
execution_payload_parent_hash: None,
execution_payload_block_hash: None,
proposer_index: Some(0),
payload_received: false,
},
genesis_slot + 1,
&spec,
@@ -1547,6 +1553,7 @@ mod test_compute_deltas {
execution_payload_parent_hash: None,
execution_payload_block_hash: None,
proposer_index: Some(0),
payload_received: false,
},
Slot::from(block.slot),
&spec,