mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-29 18:53:32 +00:00
PR #8415 added Gloas-only payload-timeliness-committee assertions to test_get_validator_duties_early but kept the test using ApiTester::new() (default mainnet spec). With FORK_NAME=gloas this produces a phase0 chain, so post_validator_duties_ptc returns 500 with BeaconStateError(IncorrectStateVariant). Two issues fixed: 1. Switch the test wrapper to ApiTester::new_with_hard_forks() so the chain is actually at Gloas under FORK_NAME=gloas. This is the same pattern already used by get_validator_duties_ptc and get_validator_payload_attestation_data. 2. Compute dependent_root using ChainSpec::proposer_shuffling_decision_slot rather than the hardcoded "(current_epoch - 1).end_slot()" formula. Post-Fulu the proposer shuffling decision slot moved to the end of epoch N - 2, so the cache is now keyed by that root. The old formula matched the legacy cache key and silently passed on phase0 chains. Verified locally with FORK_NAME=gloas (195/195) and FORK_NAME=fulu (195/195).