ethereum / ethereum/consensus-specs

Tests for Gloas optimistic sync

Open
#5,635 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4k
Forks
1.3k
Avg merge
1d 7h
Merged PRs (30d)
58

Description

We are working on Gloas optimistic sync in Lighthouse (https://github.com/sigp/lighthouse/pull/9934) and have realised Gloas payload invalidation is a bit subtle and that it would be great to have spec test coverage for.

The main complexity is that if you get `LVH=block_hash(A)` from the EL, then you need to find the first Full beacon block `B` descended from `A-Full` on the chain leading to the invalidated head, and invalidate every `ForkChoiceNode`/beacon block that descends from `B-Full`.

This has several implications (which would make good test cases):

- Don't invalidate any `ForkChoiceNode`s between A and B (there could be multiple beacon blocks between them with Empty payload status on the chain leading to the head)
- Don't invalidate the Empty branch descended from B
- If B _is_ the invalidated head, ensure the Empty branch remains viable

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Gloas optimistic-sync work in Lighthouse PR #9934 and locate the consensus spec test entry point for payload invalidation. Add cases covering the A-to-B gap, B's Empty branch, and an invalidated head at B; done means the specified ForkChoiceNode and beacon-block branches remain or become invalidated as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.