Skip to content

Commit 94b6c5b

Browse files
authored
chore: use signing slot to determine fork (#7112)
1 parent 77006ea commit 94b6c5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/validator/src/services/validatorStore.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ export class ValidatorStore {
531531
data: attestationData,
532532
};
533533

534-
if (this.config.getForkSeq(duty.slot) >= ForkSeq.electra) {
534+
if (this.config.getForkSeq(signingSlot) >= ForkSeq.electra) {
535535
return {
536536
aggregationBits: BitArray.fromSingleBit(duty.committeeLength, duty.validatorCommitteeIndex),
537537
data: attestationData,
@@ -562,7 +562,7 @@ export class ValidatorStore {
562562

563563
const signingSlot = aggregate.data.slot;
564564
const domain = this.config.getDomain(signingSlot, DOMAIN_AGGREGATE_AND_PROOF);
565-
const isPostElectra = this.config.getForkSeq(duty.slot) >= ForkSeq.electra;
565+
const isPostElectra = this.config.getForkSeq(signingSlot) >= ForkSeq.electra;
566566
const signingRoot = isPostElectra
567567
? computeSigningRoot(ssz.electra.AggregateAndProof, aggregateAndProof, domain)
568568
: computeSigningRoot(ssz.phase0.AggregateAndProof, aggregateAndProof, domain);
@@ -802,7 +802,7 @@ export class ValidatorStore {
802802
throw Error(`Inconsistent duties during signing: duty.slot ${duty.slot} != att.slot ${data.slot}`);
803803
}
804804

805-
const isPostElectra = this.config.getForkSeq(duty.slot) >= ForkSeq.electra;
805+
const isPostElectra = this.config.getForkSeq(data.slot) >= ForkSeq.electra;
806806
if (!isPostElectra && duty.committeeIndex != data.index) {
807807
throw Error(
808808
`Inconsistent duties during signing: duty.committeeIndex ${duty.committeeIndex} != att.committeeIndex ${data.index}`

0 commit comments

Comments
 (0)