From dc3b20747c0495a06c2f39f373c2b06e27f6bcd5 Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu, 9 Mar 2023 23:02:56 +0800 Subject: [PATCH] Fix domain derivation on LC syncAggregate validation --- packages/light-client/src/spec/validateLightClientUpdate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/light-client/src/spec/validateLightClientUpdate.ts b/packages/light-client/src/spec/validateLightClientUpdate.ts index 3504773b76ab..785f4242a0af 100644 --- a/packages/light-client/src/spec/validateLightClientUpdate.ts +++ b/packages/light-client/src/spec/validateLightClientUpdate.ts @@ -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), }); if (!isValidBlsAggregate(participantPubkeys, signingRoot, update.syncAggregate.syncCommitteeSignature)) {