-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
Fix domain derivation on LC syncAggregate validation #5252
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
@@ -113,7 +113,7 @@ export function validateLightClientUpdate( | |||
|
|||
const signingRoot = ssz.phase0.SigningData.hashTreeRoot({ | |||
objectRoot: ssz.phase0.BeaconBlockHeader.hashTreeRoot(update.attestedHeader.beacon), | |||
domain: store.config.getDomain(update.signatureSlot, DOMAIN_SYNC_COMMITTEE), | |||
domain: store.config.getDomain(update.signatureSlot - 1, DOMAIN_SYNC_COMMITTEE), |
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.
or should we use attestedHeader.beacon.slot?
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.
ahh just checked the linked PR , lgtm 👍
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.
sadly, attested_header.beacon.slot may be incorrect.
Example:
BELLATRIX_FORK_EPOCH = 0
CAPELLA_FORK_EPOCH = 255
DENEB_FORK_EPOCH = 256
attested_header.slot = 8159 (bellatrix)
signature_slot = 8192 (Deneb)
fork_version_slot = 8191 (Capella)
so, sync committee would be determined by sync committee at slot 8192, the fork version is determined by slot 8191, and the object is from slot 8159
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.
thanks @etan-status for the insightful example 🙏 ❤️
🎉 This PR is included in v1.7.0 🎉 |
Motivation
Description
Fix off by one error causing invalid signature errors on fork boundary