-
Notifications
You must be signed in to change notification settings - Fork 275
Fulu support for mev-boost #805
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
Conversation
jtraglia
left a comment
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.
Thanks @bharath-123! Looks great. Just a few very small nits.
common/common.go
Outdated
| FieldElementsPerBlob = 4096 | ||
| // BlobExpansionFactor is the factor by which we extend a blob for PeerDas. | ||
| BlobExpansionFactor = 2 | ||
| // FieldElementsPerCell is the number of field elements in a cell |
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.
| // FieldElementsPerCell is the number of field elements in a cell | |
| // FieldElementsPerCell is the number of field elements in a cell. |
| } | ||
|
|
||
| if request.Version >= spec.DataVersionFulu { |
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.
Just a nit, I'd remove this blank line. This would be consistent with the commitments & blobs checks.
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 you mean the blank line in like 373?
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.
Yes, that's right.
common/common.go
Outdated
| SlotTimeSecMainnet = 12 | ||
| // FieldElementsPerBlob is the number of field elements needed to represent a blob. | ||
| FieldElementsPerBlob = 4096 | ||
| // BlobExpansionFactor is the factor by which we extend a blob for PeerDas. |
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.
| // BlobExpansionFactor is the factor by which we extend a blob for PeerDas. | |
| // BlobExpansionFactor is the factor by which we extend a blob for PeerDAS. |
|
@metachris is on vacation for the next few weeks. I will merge this after we get approvals from at least 2 of the following: |
faheelsattar
left a comment
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.
looks good!
| gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| ) | ||
|
|
||
| replace github.com/attestantio/go-builder-client => github.com/jtraglia/go-builder-client v0.4.6-0.20250410195459-42a3ff7f1546 |
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 you want to maintain this for the long term @jtraglia ?
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.
No. We will remove this when attestant adds support. I don't think we have to block merging this PR on that though.
server/get_payload.go
Outdated
| log.WithFields(logrus.Fields{ | ||
| "requestBlobCommitments": len(requestCommitments), | ||
| "responseProofs": len(responseProofs), | ||
| }).Error("different lengths for proofs") |
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.
| }).Error("different lengths for proofs") | |
| }).Error("wrong lengths for proofs") |
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.
Nitpicky, but I would change all "different" to "wrong"
| len(requestCommitments) != len(responseBlobsBundle.Commitments) || | ||
| len(requestCommitments) != len(responseBlobsBundle.Proofs) { | ||
| // Check commitments | ||
| responseCommitments, err := responseBlobsBundle.Commitments() |
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.
you could still verify blobs here, would save a bit of duplicated code
| block := new(eth2ApiV1Deneb.SignedBlindedBeaconBlock) | ||
| if err = json.Unmarshal(in, block); err != nil { | ||
| return err | ||
| } | ||
| out.Version = spec.DataVersionDeneb | ||
| out.Deneb = block |
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 whole api is so cursed. out should just have a type block any
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.
Lol. I don't think making it any would be a wise change. It's okay to be explicit.
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 know, the correct way would be an interface that all the different types implement.
Making it explicit is just super ugly.
edit: just how we implement transactions in geth
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.
agree, that'd be nice! perhaps open an issue to remind us of it later and we do a follow-up PR for this?
| numBlobs := len(kzgCommitments) | ||
| commitments := make([]deneb.KZGCommitment, numBlobs) | ||
| copy(commitments, kzgCommitments) | ||
| // For testing, proofs and blobs are not populated |
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.
why?
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.
it would be a good idea to have some default values
server/service_test.go
Outdated
| commitments := make([]deneb.KZGCommitment, numBlobs) | ||
| copy(commitments, kzgCommitments) | ||
| // For testing, proofs and blobs are not populated | ||
| proofs := make([]deneb.KZGProof, numBlobs) |
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.
Shouldn't this be numBlobs* CellsPerExtBlob
jtraglia
left a comment
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.
LGTM, thanks @bharath-123 & @faheelsattar!
848f644 to
18b99ba
Compare
18b99ba to
a07eaf1
Compare
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.
Pull Request Overview
This PR adds support for the Fulu hard fork to mev-boost, which is an upcoming Ethereum hard fork. The changes implement the necessary modifications to handle Fulu-specific data structures and API endpoints throughout the codebase.
- Adds Fulu consensus version constants and handling across all relevant functions
- Implements a new V2 endpoint for payload submission that doesn't return the execution payload
- Updates blob verification logic to support the new cell-based proof structure in Fulu
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| testdata/signed-blinded-beacon-block-fulu.json | Adds test data for Fulu fork validation |
| server/utils.go | Extends payload validation to include Fulu version checks |
| server/service_test.go | Adds comprehensive tests for V2 endpoint and Fulu support |
| server/service.go | Implements the new handleGetPayloadV2 endpoint |
| server/params/paths.go | Defines the V2 endpoint path constant |
| server/mock/mock_relay.go | Extends mock relay to support V2 endpoint testing |
| server/get_payload.go | Major refactoring to support both V1/V2 endpoints and Fulu verification |
| server/get_header.go | Adds Fulu version handling for header operations |
| server/constants.go | Defines Fulu consensus version constant |
| go.mod | Updates dependencies with custom forks for Fulu support |
| common/common.go | Adds PeerDAS-related constants for blob cell calculations |
| } | ||
| } | ||
|
|
||
| // Deprecated: For reference: https://github.com/ethereum/builder-specs/issues/119 |
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.
nice, thanks for that
server/get_payload.go
Outdated
| m.bidsLock.Unlock() | ||
| if originalBid.response.IsEmpty() { | ||
| log.Error("no bid for this getPayload payload found, was getHeader called before?") | ||
| log.Error("no bid for this payload found, was getHeader called before?") |
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.
| log.Error("no bid for this payload found, was getHeader called before?") | |
| log.Warn("no bid for this payload found, was getHeader called before?") |
a warn is better here, and it's common for this to happen in DV setups
cf98ebd to
4aaea35
Compare
📝 Summary
This PR contains the changes required for the upcoming Fulu hard fork.
These changes have been tested locally against rustic-builder using kurtosis
⛱ Motivation and Context
We need to still merge the fulu changes in
github.com/jtraglia/go-builder-clientto main before merging this.📚 References
✅ I have run these commands
make lintmake test-racego mod tidy