Problem description
In gloas, spec's is_head_weak is updated to also count weight from equivocating committee validators in addition to just the the active ones from calculate_committee_fraction.
We need to update
|
// No reorg if headBlock is "not weak" ie. headBlock's weight exceeds (REORG_HEAD_WEIGHT_THRESHOLD = 20)% of total attester weight |
|
// https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.4/specs/phase0/fork-choice.md#is_head_weak |
|
const reorgThreshold = getCommitteeFraction(this.fcStore.justified.totalBalance, { |
|
slotsPerEpoch: SLOTS_PER_EPOCH, |
|
committeePercent: this.config.REORG_HEAD_WEIGHT_THRESHOLD, |
|
}); |
|
const headNode = this.protoArray.getNode(headBlock.blockRoot, headBlock.payloadStatus); |
|
// If headNode is unavailable, give up reorg |
|
if (headNode === undefined || headNode.weight >= reorgThreshold) { |
|
return {proposerHead, isHeadTimely, notReorgedReason: NotReorgedReason.HeadBlockNotWeak}; |
|
} |
This is covered in ethereum/consensus-specs#4807 as one of the few things the PR aimed to solve
Solution description
Implement per spec.
Additional context
No response
Problem description
In gloas, spec's
is_head_weakis updated to also count weight from equivocating committee validators in addition to just the the active ones fromcalculate_committee_fraction.We need to update
lodestar/packages/fork-choice/src/forkChoice/forkChoice.ts
Lines 418 to 428 in 433e692
This is covered in ethereum/consensus-specs#4807 as one of the few things the PR aimed to solve
Solution description
Implement per spec.
Additional context
No response