Skip to content

Conversation

@faheelsattar
Copy link

πŸ“ Summary

Introduces v2 blinded blocks endpoint which doesn't return the entire ExecutionPayload and BlobsBundle

β›± Motivation and Context

Currently the /eth/v1/builder/blinded_blocks returns the entire ExecutionPayload and BlobsBundle. This can increase network bandwidth costs for the proposer and also the request time as we increase the number of Blobs. We therefore introduce a new v2 API endpoint, /eth/v2/builder/blinded_blocks which no longer returns the fully signed unblinded payload. Instead, it returns an empty response and relies on the relay to propagate the block.

πŸ“š References

ethereum/builder-specs#119
ethereum/builder-specs#123


βœ… I have run these commands

  • make lint
  • make test-race
  • go mod tidy

}

// getPayloadV2 submits the signed blinded beacon block to relays for submission without returning the payload and blobs
func (m *BoostService) getPayloadV2(log *logrus.Entry, signedBlindedBeaconBlockBytes []byte, userAgent, proposerContentType, proposerAcceptContentTypes, proposerEthConsensusVersion string) (bool, bidResp) {
Copy link
Owner

Choose a reason for hiding this comment

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

I think the only difference b/w getPayload and getPayloadV2 is the API call right? Can we avoid code duplication in this case and have a innerGetPayload method which takes in a parameter which decides whether to call a v1 api or v2 api? that would make the code much cleaner.
Sth like:

func (m *BoostService) innerGetPayload(log *logrus.Entry, signedBlindedBeaconBlockBytes []byte, userAgent, proposerContentType, proposerAcceptContentTypes, proposerEthConsensusVersion string, apiType string) (bool bidResp)

@faheelsattar
Copy link
Author

Hey @jtraglia would be great if you can also review it

Copy link

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

Hey @faheelsattar, this looks really good. Overall I'm happy with the approach you took here. I just have a few little nits.

Comment on lines 51 to 53
// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Core Logic
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Choose a reason for hiding this comment

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

Why did we add a space to this section divider comments? Let's revert this.

Copy link
Author

Choose a reason for hiding this comment

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

i think it was my formatter issue, fixed it

Comment on lines 47 to 48
PayloadV1 PayloadVersion = "V1"
PayloadV2 PayloadVersion = "V2"

Choose a reason for hiding this comment

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

PayloadV* is too ambiguous in my opinion. Makes me think the payload itself is changing. Let's rename these to GetPayloadV* & rename the type to GetPayloadVersion. Later, we can rename this to SubmitBlindedBlockV*.

Comment on lines 257 to 312
return <-resultCh, originalBid
result := <-resultCh
return result, originalBid

Choose a reason for hiding this comment

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

Why did you make this change? Let's revert if there's not a good reason.

Comment on lines 216 to 220
if version == GetPayloadV1 {
log.Debug("requesting payload")
} else {
log.Debug("requesting payload submission")
}
Copy link
Owner

Choose a reason for hiding this comment

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

Could we replace this log message with
log.Debug("submitting signed blinded block")
This way we can avoid the if stmt.

Comment on lines 243 to 247
if version == GetPayloadV1 {
log.WithError(err).Warn("failed to get payload from relay after retries")
} else {
log.WithError(err).Warn("failed to request submit payload after retries")
}
Copy link
Owner

Choose a reason for hiding this comment

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

can we do:
log.WithError(err).Warn("failed to submit signed blinded block after retries")
and avoid the if stmt.

Comment on lines 299 to 303
if version == GetPayloadV1 {
log.Info("received payload from relay")
} else {
log.Info("successfully submitted blinded block to relay")
}
Copy link
Owner

Choose a reason for hiding this comment

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

I guess we could just do
log.Info("successfully submitted blinded block to relay)

@bharath-123
Copy link
Owner

looks fine overall to me! We should test this out locally on kurtosis

@bharath-123 bharath-123 merged commit 45c82c3 into bharath-123:bharath/fulu Jul 24, 2025
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.

3 participants