Skip to content

Commit

Permalink
Merge 12b1241 into 77006ea
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Sep 27, 2024
2 parents 77006ea + 12b1241 commit 7f2b72c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/validator/src/services/validatorStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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}`
Expand Down

0 comments on commit 7f2b72c

Please sign in to comment.