Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Copy link
Contributor

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?

Copy link
Contributor

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 👍

Copy link
Contributor

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

Copy link
Contributor

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 🙏 ❤️

});

if (!isValidBlsAggregate(participantPubkeys, signingRoot, update.syncAggregate.syncCommitteeSignature)) {
Expand Down