Skip to content

Conversation

@bharath-123
Copy link
Collaborator

@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
Collaborator 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
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
Collaborator

@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!

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

Copy link
Collaborator

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

jtraglia
jtraglia previously approved these changes Jul 24, 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.

LGTM, thanks @bharath-123 & @faheelsattar!

jtraglia
jtraglia previously approved these changes Jul 24, 2025
@metachris metachris requested a review from Copilot August 8, 2025 09:26
Copy link

Copilot AI left a 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
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice, thanks for that

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?")
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
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

metachris
metachris previously approved these changes Aug 13, 2025
@jtraglia jtraglia merged commit 876c490 into flashbots:develop Aug 13, 2025
2 of 3 checks passed
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.

5 participants