feat(mev): relax SendEndOfBlockBundle validation - #226
Merged
Merged
Conversation
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>
thanhpp
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:Titan/Quasar) that returnedErrMethodNotSupportflashbotKey == nilguard that returnedErrMissingPrivKey.postBundlealready attachesX-Flashbots-Signatureonly when a key is present, so a keyless client now simply sends an unsigned requestBloxrouteClient.SendEndOfBlockBundle:ReplacementSeqNumber != nilrejection. The field has no bloXroute equivalent and is now silently droppedThe
len(req.TargetPools) == 0check stays — both builders require the field.Also makes
SendEndOfBlockBundleRequest.ReplacementUUIDa*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.30are removed because nothing uses them any more:BundleSenderType.SupportsEndOfBlockBundle()and itsendOfBlockBundleSenderTypesmap — keeping a predicate that no code path enforces would be a trapErrReplacementSeqNumberNotSupportAnd
ReplacementUUIDchanges type fromstringto*string. Happy to keep any of these if a downstream service already depends on them.Testing
go build ./...go test -race ./pkg/mev/— passgolangci-lint run --config=.golangci.yml ./pkg/mev/...— clean on both changed files (the pre-existinggosec/modernizeissues in otherpkg/mevfiles 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.