Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow LightClientUpdate with genesis finality #2924

Merged
merged 3 commits into from
Jun 29, 2022
Merged

Allow LightClientUpdate with genesis finality #2924

merged 3 commits into from
Jun 29, 2022

Conversation

etan-status
Copy link
Contributor

When state.finalized_checkpoint references the genesis slot, it points
to an empty root, instead of the actual genesis block hash. This patch
updates the LightClientUpdate logic to allow including finality proofs
for genesis finalized_checkpoint.root, better supporting non-mainnet.
When including such a finality proof, the proof is for the empty root,
but finalized_header is kept zeroed out to signify this edge case.

When `state.finalized_checkpoint` references the genesis slot, it points
to an empty `root`, instead of the actual genesis block hash. This patch
updates the `LightClientUpdate` logic to allow including finality proofs
for genesis `finalized_checkpoint.root`, better supporting non-mainnet.
When including such a finality proof, the proof is for the empty `root`,
but `finalized_header` is kept zeroed out to signify this edge case.
Copy link
Contributor

@hwwhww hwwhww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

just two minor suggestions

specs/altair/sync-protocol.md Outdated Show resolved Hide resolved
specs/altair/sync-protocol.md Outdated Show resolved Hide resolved
etan-status and others added 2 commits June 27, 2022 22:26
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants