-
-
Notifications
You must be signed in to change notification settings - Fork 479
fix: ignore parent bids at epoch boundary #9756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ import { | |
| getExecutionPayloadBidSigningRoot, | ||
| isActiveBuilder, | ||
| isGasLimitTargetCompatible, | ||
| isStartSlotOfEpoch, | ||
| isStatePostGloas, | ||
| } from "@lodestar/state-transition"; | ||
| import {RootHex, Slot, ValidatorIndex, gloas} from "@lodestar/types"; | ||
|
|
@@ -46,8 +47,8 @@ function getMinBidValue(currentHighestBid: number): number { | |
| /** | ||
| * Check whether a bid builds on one of the paths compatible with the local head branch. | ||
| * | ||
| * The direct parent path is always allowed for proposer-boost reorgs. Otherwise the bid | ||
| * must build on the local head's full or empty payload variant, as selected for its slot. | ||
| * Building directly on the parent is allowed for proposer-boost reorgs outside epoch boundaries. | ||
| * Otherwise the bid must build on the local head's full or empty payload variant, as selected for its slot. | ||
| */ | ||
| function isBidCompatibleWithHead( | ||
| forkChoice: IForkChoice, | ||
|
|
@@ -60,7 +61,9 @@ function isBidCompatibleWithHead( | |
| const buildsOnParentPayload = bidParentBlockHash === head.parentBlockHash; | ||
|
|
||
| if (buildsOnParentBlock && buildsOnParentPayload) { | ||
| return true; | ||
| // The spec allows this at epoch boundaries, but Lodestar does not propagate these bids because validating | ||
| // them requires an epoch transition for a parent state that cannot be used for proposer-boost reorgs. | ||
| return !isStartSlotOfEpoch(bidSlot); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 This direct-parent branch should also require
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correction: after the propagation-goal clarification, I think this adjacency requirement is too strict for gossip validation. I was mixing Lodestar local selection with network propagation policy. For this PR, the useful filter is the narrower one already here: drop the direct-parent case at epoch boundaries because it can force the expensive parent-state epoch-transition path for a bid Lodestar cannot use for proposer-boost reorg. Non-adjacent direct-parent bids may still be worth propagating to peers even if this node will not select them locally, so I consider my slot-adjacency suggestion retracted.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is somewhat true, we will only return
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implemented this as a narrow cheap check without going back to strict local-selection adjacency: direct-parent bids now pass only when I could not push directly to
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lodekeeper if anything, this should be a separate PR, I have merged this one now
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ack, agreed. I won’t try to carry this as part of the already-merged PR. I’m also not opening a separate PR from |
||
| } | ||
|
|
||
| if (bidParentBlockRoot !== head.blockRoot) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.