-
Notifications
You must be signed in to change notification settings - Fork 259
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
base: develop
Are you sure you want to change the base?
Conversation
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
@@ -10,6 +10,16 @@ import ( | |||
|
|||
const ( | |||
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: |
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!
@@ -60,3 +60,5 @@ require ( | |||
gopkg.in/yaml.v2 v2.4.0 // indirect | |||
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
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
π 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-client
to main before merging this.π References
β I have run these commands
make lint
make test-race
go mod tidy