Repository navigation
Add gloas builder flow: produceBlockV4, builder preferences, block forwarding #630
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
5daf8a7
Beacon API parity with builder api and keymanager api
JasonVranek 21750d8
Update CHANGES.md
JasonVranek f8d2943
address review comments
JasonVranek 0ea8a06
address review comments
JasonVranek adc1ae1
require fully resolved builder entries, add SSZ request bodies, drop
JasonVranek 1028934
address review feedback: trim to beacon-API conventions, fix bid
JasonVranek 657d390
report the payload source, add default bid policy params, fix entry
JasonVranek 727f6b3
remove Eth-Execution-Payload-Source header
JasonVranek 23b5555
scope entry uniqueness by role: request identity vs p2p policy
JasonVranek 3f886eb
A fully resolved body already carries default_min_bid and
JasonVranek 979d038
align the produceBlockV4 description with the BuilderConfig body
JasonVranek ea9bafb
move max_execution_payment selection semantics to the builder-specs
JasonVranek bb1e790
batched submitBuilderPreferences call
JasonVranek bd99f03
Merge branch 'master' into update-produceBlockV4
JasonVranek 91db6c8
address review nits on BuilderConfig and produceBlockV4
JasonVranek 97c1cd9
drop per-builder p2p bid preferences
JasonVranek f71b1b8
Merge branch 'master' into update-produceBlockV4
JasonVranek eb752a1
Make BuilderConfig body and fork version header required
JasonVranek 1dda02d
accept bids from a list of builder pubkeys
JasonVranek 71c7315
a zero-length auth data is invalid
JasonVranek 698d05f
float builder-specs links on master with the renamed types
JasonVranek e7280c2
Merge branch 'master' into update-produceBlockV4
JasonVranek 8197ba0
pemdas for boost formula precision
JasonVranek 376c9f0
clarify min(execution_payment, max_execution_payment) clamp
JasonVranek a221af8
- rename to BuilderRequestAuth
JasonVranek 2d6a38e
clean up wordlist
nflaig a5d0dfa
formatting
nflaig b65a8de
fix builder spec references
nflaig 1e8f160
nits
nflaig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| post: | ||
| operationId: "submitBuilderPreferences" | ||
| summary: "Submit builder preferences via the beacon node." | ||
| description: | | ||
| Submits a proposer's per-builder preferences to the builders on the validator's behalf, including | ||
| the `max_execution_payment` the proposer is willing to accept from each. The validator does not | ||
| contact builders directly: for each `BuilderPreferenceEntry` the beacon node makes one | ||
| `submitBuilderPreferences` builder-API call, contacting the builder at its `proxy` if set and its | ||
| `url` otherwise, forwarding the entry's `auth` unchanged, and submitting its | ||
| `max_execution_payment`. The `pubkey` path parameter is passed as the builder-API | ||
| `validator_pubkey`, and each entry's `auth.message.slot` is the proposal slot the preferences | ||
| apply to. | ||
|
|
||
| Validators MAY call this endpoint in the epoch prior to the epoch in which they will be proposing, | ||
| as determined from `state.proposer_lookahead`, so that builders have the preferences before the | ||
| bid request arrives. | ||
|
|
||
| `BuilderPreferencesRequestV1` is not fork-versioned, so no `Eth-Consensus-Version` header is | ||
| required. | ||
|
|
||
| This API is applicable from the Gloas fork onwards. | ||
| parameters: | ||
| - name: pubkey | ||
| in: path | ||
| required: true | ||
| description: | | ||
| The BLS public key of the proposing validator whose preferences these are. The beacon node | ||
| passes it as the `validator_pubkey` of each `submitBuilderPreferences` builder-API call, and | ||
| each entry's `auth` is signed by this key. | ||
| schema: | ||
| $ref: "../../types/primitive.yaml#/Pubkey" | ||
| tags: | ||
| - Validator | ||
| requestBody: | ||
| required: true | ||
| description: | | ||
| An array of `BuilderPreferenceEntry` objects, one per builder the beacon node should submit | ||
| preferences to. Each entry names a concrete builder `url`, and no two entries may share the | ||
| same `url`. Inclusion is best-effort: the beacon node submits each entry independently and skips | ||
| any entry it cannot submit rather than failing the whole request. Entries that were not | ||
| submitted are reported by index in a 400 response. | ||
| content: | ||
|
nflaig marked this conversation as resolved.
|
||
| application/json: | ||
| schema: | ||
| type: array | ||
| items: | ||
| $ref: "../../beacon-node-oapi.yaml#/components/schemas/Gloas.BuilderPreferenceEntry" | ||
| responses: | ||
| "200": | ||
| description: "The beacon node submitted the preferences to every builder." | ||
| "400": | ||
| description: "Errors with one or more preference submissions; the failing entries are identified by index. Well-formed entries are still submitted." | ||
|
nflaig marked this conversation as resolved.
Outdated
|
||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../beacon-node-oapi.yaml#/components/schemas/IndexedErrorMessage" | ||
| "500": | ||
| $ref: "../../beacon-node-oapi.yaml#/components/responses/InternalError" | ||
| "503": | ||
| $ref: "../../beacon-node-oapi.yaml#/components/responses/CurrentlySyncing" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need this header? if I understand correctly the sole purpose of this is so that the beacon node knows where to submit it via
submitSignedBeaconBlockbut the beacon node should know this anyways, since it got the bid from that builder via apithe only case where the beacon node doesn't know this is if it's a different node (eg. in a multi-node setup) if the primary node that sourced the bid from the builder via api went offline during the proposal flow but this seems like an edge case and even then, publishing only via p2p is a fine fallback behavior that is sufficient anyways most of the time
that said, we can keep the header if people wanna have it, just questionable to me if it's useful enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was solely for the multi-node support, not opinionated on it but it seemed like DVT teams wanted. Will leave for now and address most of the fat trimming comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not feel strongly about removing it, also I think when I commented there was in addition a
Eth-Proxy-Urlheader which is now gone, so this single header, if useful for DVT teams, might be worth keepingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 questioning the usefulness of this header, both here and in the produceBlockV4 response. I'd personally prefer removing it unless there is a good reason to keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after implementing it, the header makes it easier on the submission side on the beacon node, avoids having to implement a lookup cache to "remember" to which builder to submit the bid to, it also acts as a signal whether the beacon node should forward the beacon block to a builder