ethereum / ethereum/consensus-specs
Fork choice test coverage for revert to justified block
- Dominant language
- Python
- Stars
- 4k
- Forks
- 1.3k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 58
Description
Neither the compliance tests nor regular fork choice tests currently cover the case where the head reverts to the justified block (e.g. due to all descendants being execution invalid) for Gloas. Lighthouse had a bug in this case where we would return `(justified_block_root, Pending)` from `find_head`, which would violate assumptions around the payload status always being Full or Empty. See:
- https://github.com/sigp/lighthouse/issues/9544
- https://github.com/sigp/lighthouse/pull/9962
- Same bug in the compliance runner (and note 100% pass rate despite the bug): https://github.com/sigp/lighthouse/pull/9710
This is a somewhat contrived scenario, but has been a favourite of LLM bug finders, so it would be good to get a spec test to ensure all clients handle this the same way.
Related:
- https://github.com/sigp/lighthouse/pull/9364
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the Gloas compliance tests and regular fork choice tests, then read the fork-choice find_head entry point and the linked Lighthouse issue and pull requests. Add coverage for reverting the head to the justified block when descendants are execution-invalid, and verify the resulting payload status is always Full or Empty across the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100