Skip to content

feat(mev): relax SendEndOfBlockBundle validation - #226

Merged
vaigay merged 1 commit into
mainfrom
feat/end-of-block-relax-checks
Sep 8, 2026
Merged

vaigay merged 1 commit into
mainfrom
feat/end-of-block-relax-checks

Conversation

@vaigay

@vaigay vaigay commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What

Removes the three client-side guards on the end-of-block path so the caller, not the library, decides where a bundle goes.

Client.SendEndOfBlockBundle:

  • dropped the sender-type allow list (Titan/Quasar) that returned ErrMethodNotSupport
  • dropped the flashbotKey == nil guard that returned ErrMissingPrivKey. postBundle already attaches X-Flashbots-Signature only when a key is present, so a keyless client now simply sends an unsigned request

BloxrouteClient.SendEndOfBlockBundle:

  • dropped the ReplacementSeqNumber != nil rejection. The field has no bloXroute equivalent and is now silently dropped

The len(req.TargetPools) == 0 check stays — both builders require the field.

Also makes SendEndOfBlockBundleRequest.ReplacementUUID a *string, so an unset UUID is distinguishable from an empty one and stays out of the JSON payload.

Breaking API notes

Two symbols published in v0.11.30 are removed because nothing uses them any more:

  • BundleSenderType.SupportsEndOfBlockBundle() and its endOfBlockBundleSenderTypes map — keeping a predicate that no code path enforces would be a trap
  • ErrReplacementSeqNumberNotSupport

And ReplacementUUID changes type from string to *string. Happy to keep any of these if a downstream service already depends on them.

Testing

  • go build ./...
  • go test -race ./pkg/mev/ — pass
  • golangci-lint run --config=.golangci.yml ./pkg/mev/... — clean on both changed files (the pre-existing gosec/modernize issues in other pkg/mev files are untouched)

There is no test file for the end-of-block sender; the paths need a live builder endpoint, like the other bundle-sender tests.

Drop the three client-side guards on the end-of-block path so the caller,
not the library, decides where a bundle goes:

- the sender-type allow list (Titan/Quasar) on Client.SendEndOfBlockBundle,
  along with the now-dead BundleSenderType.SupportsEndOfBlockBundle predicate
  and its map
- the flashbotKey != nil guard; postBundle already attaches
  X-Flashbots-Signature only when a key is present
- the ReplacementSeqNumber rejection on BloxrouteClient.SendEndOfBlockBundle,
  which now drops the field instead, plus the unused
  ErrReplacementSeqNumberNotSupport

Also make SendEndOfBlockBundleRequest.ReplacementUUID a *string so an
unset UUID is distinguishable from an empty one and stays out of the
JSON payload.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vaigay
vaigay merged commit a88cbde into main Sep 8, 2026
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.

2 participants