Skip to content

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

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

bharath-123
Copy link

@bharath-123 bharath-123 commented Jul 1, 2025

πŸ“ 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

@bharath-123 bharath-123 marked this pull request as ready for review July 1, 2025 14:31
@bharath-123 bharath-123 marked this pull request as draft July 1, 2025 14:31
@bharath-123 bharath-123 marked this pull request as ready for review July 11, 2025 07:43
jtraglia
jtraglia previously approved these changes Jul 11, 2025
Copy link
Collaborator

@jtraglia jtraglia left a 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// FieldElementsPerCell is the number of field elements in a cell
// FieldElementsPerCell is the number of field elements in a cell.

Comment on lines +372 to +374
}

if request.Version >= spec.DataVersionFulu {
Copy link
Collaborator

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.

Copy link
Author

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?

Copy link
Collaborator

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// BlobExpansionFactor is the factor by which we extend a blob for PeerDas.
// BlobExpansionFactor is the factor by which we extend a blob for PeerDAS.

@jtraglia
Copy link
Collaborator

@metachris is on vacation for the next few weeks.

I will merge this after we get approvals from at least 2 of the following:

Copy link

@faheelsattar faheelsattar left a 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
Copy link
Collaborator

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 ?

Copy link
Collaborator

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.

log.WithFields(logrus.Fields{
"requestBlobCommitments": len(requestCommitments),
"responseProofs": len(responseProofs),
}).Error("different lengths for proofs")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}).Error("different lengths for proofs")
}).Error("wrong lengths for proofs")

Copy link
Collaborator

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()
Copy link
Collaborator

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

Comment on lines +499 to +504
block := new(eth2ApiV1Deneb.SignedBlindedBeaconBlock)
if err = json.Unmarshal(in, block); err != nil {
return err
}
out.Version = spec.DataVersionDeneb
out.Deneb = block
Copy link
Collaborator

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

Copy link
Collaborator

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.

Copy link
Collaborator

@MariusVanDerWijden MariusVanDerWijden Jul 14, 2025

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Author

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

commitments := make([]deneb.KZGCommitment, numBlobs)
copy(commitments, kzgCommitments)
// For testing, proofs and blobs are not populated
proofs := make([]deneb.KZGProof, numBlobs)
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants