From 54990b9c3037729c5d24693304d6109b609e7019 Mon Sep 17 00:00:00 2001 From: Devnet Bot Date: Sun, 17 May 2026 18:56:39 +0000 Subject: [PATCH] fix: use config-based fork for payload attestation domain During fork transitions, the head state may not yet reflect the new fork version. Use spec.fork_at_epoch() instead of state.fork(). --- .../src/per_block_processing/signature_sets.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/consensus/state_processing/src/per_block_processing/signature_sets.rs b/consensus/state_processing/src/per_block_processing/signature_sets.rs index 4e83ec95fe..4e56e8eaff 100644 --- a/consensus/state_processing/src/per_block_processing/signature_sets.rs +++ b/consensus/state_processing/src/per_block_processing/signature_sets.rs @@ -378,10 +378,14 @@ where .data .slot .epoch(E::slots_per_epoch()); + // Use config-based fork lookup rather than state.fork() to avoid + // race conditions during fork transitions where the head state + // may not yet reflect the new fork. + let fork = spec.fork_at_epoch(epoch); let domain = spec.get_domain( epoch, Domain::PTCAttester, - &state.fork(), + &fork, state.genesis_validators_root(), );