Skip to content

revert MEV SSZ changes #7044

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

Closed
wants to merge 1 commit into from
Closed

revert MEV SSZ changes #7044

wants to merge 1 commit into from

Conversation

tersec
Copy link
Contributor

@tersec tersec commented Apr 1, 2025

This is requiring a Eth-Consensus-Version. This is required since

in https://github.com/ethereum/builder-specs/releases/tag/v0.5.0

But it's evidently not yet widely enough implemented to be relied upon, quite yet, so revert for now. It should be feasible when dropping the Deneb builder API to unconditionally assume this again.

@tersec
Copy link
Contributor Author

tersec commented Apr 1, 2025

ignoring copyright year linter, want as clean a "revert" as possible

@arnetheduck
Copy link
Member

why not simply assume deneb if the header is missing? we can also tell from the ssz data which fork it is, the header is just extra noise

@tersec tersec marked this pull request as draft April 1, 2025 10:49
@tersec
Copy link
Contributor Author

tersec commented Apr 1, 2025

why not simply assume deneb if the header is missing? we can also tell from the ssz data which fork it is, the header is just extra noise

  1. no more autodetection, it's ugly and fragile and hard to maintain. I ripped it out of the JSON parts as much as I could before and all those likely-broken heuristics based on presence/absence of random JSON fields are gone too, not adding it back unless it's absolutely 100% required. it isn't here;

  2. also the caller knows, there's only one right answer indeed. Nimbus had this getHeaderDeneb/getHeaderElectra/getHeaderFulu which, same REST API call but with the function call graph/type system encoding that right answer, in a statically type-safe way with no runtime overhead. either it decodes as the correct fork or it doesn't. from this perspective that header is just noise. assert it's correct if one wants, but it's not required or useful; and

  3. "assume deneb" is a shifting target as different testnets/mainnets (Gnosis, EF, etc) fork at different times, it's also fragile to hardcode that before.

is the PR which did this, and it got rid of these https://github.com/status-im/nimbus-eth2/blob/v25.3.0/beacon_chain/spec/mev/rest_deneb_mev_calls.nim / https://github.com/status-im/nimbus-eth2/blob/v25.3.0/beacon_chain/spec/mev/rest_electra_mev_calls.nim / https://github.com/status-im/nimbus-eth2/blob/v25.3.0/beacon_chain/spec/mev/rest_fulu_mev_calls.nim with their getHeaderFoo/getHeaderFooPlain/submitBlindedBlock [which because it's overloaded on the static body type, it knows the kind of response it will get]. So it before this PR it always, 100% of the time, assumed whatever the fork scheduled said to use. That was fine.

In this case, part of the machinery for adding SSZ support removed this infrastructure. They could coexist, but that PR didn't approach it that way.

@tersec
Copy link
Contributor Author

tersec commented Apr 1, 2025

The main reason not to merge this, really, is that we'll probably find out in 2 days that we'll need to do a mainnet release this month regardless.

@arnetheduck
Copy link
Member

arnetheduck commented Apr 1, 2025

I ripped it out of the JSON parts

Well, there seems to be a sequencing problem here at the very least - ie the rest server must support the beacon api as it was specified at the beginning of deneb - v0.5.0 is newer than that, so until electra happens, the old implementation should have stayed as-is with whatever electra news being added on top of that.

Copy link

github-actions bot commented Apr 1, 2025

Unit Test Results

       15 files  ±  0    2 625 suites   - 5   1h 14m 7s ⏱️ -27s
  6 330 tests  -   9    5 828 ✔️  -   9  502 💤 ±0  0 ±0 
44 071 runs   - 45  43 393 ✔️  - 45  678 💤 ±0  0 ±0 

Results for commit 807c0c0. ± Comparison against base commit 62a99df.

@tersec
Copy link
Contributor Author

tersec commented Apr 1, 2025

#7045 is a better approach

@tersec tersec closed this Apr 1, 2025
@tersec tersec deleted the revert-mev-ssz branch April 1, 2025 13:43
@tersec tersec restored the revert-mev-ssz branch April 2, 2025 11:53
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