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
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