-
Notifications
You must be signed in to change notification settings - Fork 997
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
Update light client specifications for Electra #3811
Conversation
Electra introduces two changes that affect light client data handling: 1. The `ExecutionPayloadHeader` is extended with new fields. This is handled similarly as before with the Deneb fork. 2. The `BeaconState` generalized indices change due to lack of EIP-6493. This is handled by making the generalized index be fork dependent via a helper function that computes it dynamically. Furthermore, the case where pre-Electra light client data is consumed by an Electra based `LightClientStore` requires normalizing the shorter proof of the pre-Electra data to fit into the Electra data structure by prepending a zero hash.
Add missing Electra support for light client protocol: - ethereum/consensus-specs#3811 Tested against PR consensus-spec-tests, the test runner automatically picks up the new tests once available.
execution_branch = ExecutionBranch( | ||
compute_merkle_proof(block.message.body, EXECUTION_PAYLOAD_GINDEX)) | ||
else: | ||
# Note that during fork transitions, `finalized_header` may still point to earlier forks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far in Ethereum networks we have aligned fork epochs to light-client sync periods. Under what circumstance could that happen then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The head advances into the new fork before the finalized cp does. there is a short transition period during which the finalized header has to be normalized into the new datatype.
* extend light client protocol for Electra Add missing Electra support for light client protocol: - ethereum/consensus-specs#3811 Tested against PR consensus-spec-tests, the test runner automatically picks up the new tests once available. * workaround `version-2-0`: `Error: cannot instantiate: 'SomeUnsignedInt'` * fix initialization when Electra not scheduled * try reduce stack size in test * put correct sync committee branch version into DB * adjust fork schedule in light client data tests * further reduce stack size * split function into multiple parts * rename variable * regenerate test reports to cover new Electra tests * add Nim bug reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. thank you @etan-status for your solid work again!
Electra introduces two changes that affect light client data handling:
The
ExecutionPayloadHeader
is extended with new fields. This is handled similarly as before with the Deneb fork.The
BeaconState
generalized indices change due to lack of EIP-6493. This is handled by making the generalized index be fork dependent via a helper function that computes it dynamically. Furthermore, the case where pre-Electra light client data is consumed by an Electra basedLightClientStore
requires normalizing the shorter proof of the pre-Electra data to fit into the Electra data structure by prepending a zero hash.