-
Notifications
You must be signed in to change notification settings - Fork 300
Make MEV decoding less strict for Deneb encoded responses. #7045
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
versionhere comes from:nimbus-eth2/beacon_chain/validators/beacon_validators.nim
Lines 649 to 687 in c00f35a
i.e.
eth-consensus-versionNeither https://github.com/ethereum/builder-specs/blob/v0.5.0/apis/builder/header.yaml nor https://github.com/ethereum/builder-specs/blob/v0.5.0/apis/builder/blinded_blocks.yaml appears to require it even for SSZ mode, so it might compliantly be empty in/missing from the relay's REST response.
But, again, this isn't actually a real issue, because at any given callsite, there's only one valid fork, and it does not ever depend on
eth-consensus-version, in no edge case.nimbus-eth2/beacon_chain/validators/beacon_validators.nim
Lines 641 to 651 in c00f35a
can only happen when it's Deneb, and therefore the consensus version it's expecting must, always, be Deneb.
nimbus-eth2/beacon_chain/validators/beacon_validators.nim
Lines 658 to 668 in c00f35a
similarly with Electra
nimbus-eth2/beacon_chain/validators/beacon_validators.nim
Lines 675 to 687 in c00f35a
and with Fulu
This is all known at compile-time, statically; there's no need to use
eth-consensus-version. There isn't never was any runtime detection of fork here.If it's supplied, and it's incorrect, then, sure, can flag on that error, but otherwise its absence shouldn't matter at all.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider your opinion when specification will say exactly optional or not required, because right now it is:
As you can see here present
Required in response.https://ethereum.github.io/builder-specs/#/Builder/getHeader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more proof to my opinion is present in original PR message ethereum/builder-specs#104
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That phrasing appears to come in via https://ethereum.github.io/builder-specs/releases/v0.5.0/builder-oapi.json via https://github.com/ethereum/builder-specs/blob/1569fc45d43e3ed2bed94ec6788c3f8fa7d2a4b2/builder-oapi.yaml#L108-L112
which in turn points to https://github.com/ethereum/beacon-APIs/blob/2b1d7b5ac4756881bd29e7adacc9b7032343d981/beacon-node-oapi.yaml#L482-L489
That's descriptive/explanatory phrasing from another non-builder API spec in a human-readable
descriptionfield only, which sort of leaks its way into the website description (not the spec proper).Meanwhile the builder-API spec itself is clear on this:
https://github.com/ethereum/builder-specs/blob/c7b0abad0d0b995915cde8d2e5ebcd650de5b163/apis/builder/header.yaml#L35-L41
and https://github.com/ethereum/builder-specs/blob/c7b0abad0d0b995915cde8d2e5ebcd650de5b163/apis/builder/blinded_blocks.yaml#L49-L55
The "required" is flavor text, and doesn't even .... necessarily mean it's required, per se. It's vague and handwavy enough even without the contradictory evidence from the builder API itself it's be questionable.
I can say, X is required for Y to happen, and it's a conditional requirement: if one wants Y to be true, X must be true, a kind of logical implication operator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That speaks to intent of the PR creator, yes. Not what the spec actually says.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for that, I have opened a PR to clarify / formalize this on the spec ethereum/builder-specs#118