From 12b12412badda5074935465d7d5ade1fbc647a98 Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Fri, 27 Sep 2024 09:24:10 +0100 Subject: [PATCH] chore: use signing slot to determine fork --- packages/validator/src/services/validatorStore.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/validator/src/services/validatorStore.ts b/packages/validator/src/services/validatorStore.ts index ce507349689f..c2b18bfd7e09 100644 --- a/packages/validator/src/services/validatorStore.ts +++ b/packages/validator/src/services/validatorStore.ts @@ -531,7 +531,7 @@ export class ValidatorStore { data: attestationData, }; - if (this.config.getForkSeq(duty.slot) >= ForkSeq.electra) { + if (this.config.getForkSeq(signingSlot) >= ForkSeq.electra) { return { aggregationBits: BitArray.fromSingleBit(duty.committeeLength, duty.validatorCommitteeIndex), data: attestationData, @@ -562,7 +562,7 @@ export class ValidatorStore { const signingSlot = aggregate.data.slot; const domain = this.config.getDomain(signingSlot, DOMAIN_AGGREGATE_AND_PROOF); - const isPostElectra = this.config.getForkSeq(duty.slot) >= ForkSeq.electra; + const isPostElectra = this.config.getForkSeq(signingSlot) >= ForkSeq.electra; const signingRoot = isPostElectra ? computeSigningRoot(ssz.electra.AggregateAndProof, aggregateAndProof, domain) : computeSigningRoot(ssz.phase0.AggregateAndProof, aggregateAndProof, domain); @@ -802,7 +802,7 @@ export class ValidatorStore { throw Error(`Inconsistent duties during signing: duty.slot ${duty.slot} != att.slot ${data.slot}`); } - const isPostElectra = this.config.getForkSeq(duty.slot) >= ForkSeq.electra; + const isPostElectra = this.config.getForkSeq(data.slot) >= ForkSeq.electra; if (!isPostElectra && duty.committeeIndex != data.index) { throw Error( `Inconsistent duties during signing: duty.committeeIndex ${duty.committeeIndex} != att.committeeIndex ${data.index}`