prysm-pulse/beacon-chain/forkchoice
Potuz b6ce6c2eba
Do not check parent weight on early FCU (#13683)
When a late block arrives and the beacon is proposing the next block, we
perform several checks to allow for the next block to reorg the incoming
late block.

Among those checks, we check that the parent block has been heavily
attested (currently 160% of the committee size).

We perform this check in these circumstances:
- When the late block arrives
- At 10 seconds into the slot
- At 0 seconds into the next slot (at proposing time)

The problem is that for blocks that arrive between 4 seconds and 10
seconds, the parent block will not have yet this expected weight since
attestations from the current committee were not imported yet, and thus
Prysm will send an FCU with payload attributes anyway at this time.

What happens is that Prysm keeps the EL building different blocks based
on different parents at the same time, when later in the next slot it
calls to propose, it will reorg the late block anyway and the EL would
have been computing a second payload uselessly.

This PR enables this check only when calling `ShouldOverrideFCU` after
10 seconds into the slot which we do only after having imported the
current attestations. We may want to actually remove this check entirely
from `ShouldOverrideFCU` and only keep it in `ProposerHead`.

Shout out to Anthithesis for reporting an issue that led to this
discoverly.
2024-03-05 15:07:39 +00:00
..
doubly-linked-tree Do not check parent weight on early FCU (#13683) 2024-03-05 15:07:39 +00:00
types Update to V5 (#13622) 2024-02-15 05:46:47 +00:00
BUILD.bazel Update to V5 (#13622) 2024-02-15 05:46:47 +00:00
doc.go Reduce Usage of Eth2 Terminology in Prysm (#9104) 2021-06-26 19:00:33 +00:00
error.go Reinsert reorg atts (#10767) 2022-05-29 19:32:42 +00:00
interfaces.go Update to V5 (#13622) 2024-02-15 05:46:47 +00:00
ro_test.go Update to V5 (#13622) 2024-02-15 05:46:47 +00:00
ro.go Update to V5 (#13622) 2024-02-15 05:46:47 +00:00