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().
This commit is contained in:
Devnet Bot
2026-05-17 18:56:39 +00:00
parent 278111f4c4
commit 54990b9c30

View File

@@ -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(),
);