Skip to content

Add support for Capella #3763

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 184 commits into from
Feb 21, 2023
Merged

Add support for Capella #3763

merged 184 commits into from
Feb 21, 2023

Conversation

ethDreamer
Copy link
Member

No description provided.

Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

I just finished reviewing the execution_layer. It looks great, I only have really minor suggestions.

I believe that all of the suggestions here will compile if they're accepted and committed via the Github UI. Anything that I couldn't get to work via suggestions I added here: #3983

michaelsproul and others added 4 commits February 16, 2023 16:54
* Restrict Engine::request to FnOnce

* Use `Into::into`

* Impl IntoIterator for VariableList

* Use Instant rather than SystemTime
@paulhauner
Copy link
Member

I just finished reviewing beacon_chain, my suggestions are at #3999. It's looking good!

michaelsproul and others added 3 commits February 20, 2023 17:50
* Remove CapellaReadiness::NotSynced

Some EEs have a habit of flipping between synced/not-synced, which causes some
spurious "Not read for the merge" messages back before the merge. For the
merge, if the EE wasn't synced the CE simple wouldn't go through the transition
(due to optimistic sync stuff). However, we don't have that hard requirement
for Capella; the CE will go through the fork and just wait for the EE to catch
up. I think that removing `NotSynced` here will avoid false-positives on the
"Not ready logs..". We'll be creating other WARN/ERRO logs if the EE isn't
synced, anyway.

* Change some Capella readiness logging

There's two changes here:

1. Shorten the log messages, for readability.
2. Change the hints.

Connecting a Capella-ready LH to a non-Capella-ready EE gives this log:

```
WARN Not ready for Capella                   info: The execution endpoint does not appear to support the required engine api methods for Capella: Required Methods Unsupported: engine_getPayloadV2 engine_forkchoiceUpdatedV2 engine_newPayloadV2, service: slot_notifier
```

This variant of error doesn't get a "try updating" style hint, when it's the
one that needs it. This is because we detect the method-not-found reponse from
the EE and return default capabilities, rather than indicating that the request
fails. I think it's fair to say that an EE upgrade is required whenever it
doesn't provide the required methods.

I changed the `ExchangeCapabilitiesFailed` message since that can only happen
when the EE fails to respond with anything other than success or not-found.
@paulhauner paulhauner added the v3.5.0 Minor release circa Q1 2023 label Feb 21, 2023
* Add extra encoding/decoding tests

* Remove TODO

The method LGTM

* Remove `FreeAttestation`

This is an ancient relic, I'm surprised it still existed!

* Add paranoid check for eip4844 code

This is not technically necessary, but I think it's nice to be explicit about
EIP4844 consensus code for the time being.

* Reduce big-O complexity of address change pruning

I'm not sure this is *actually* useful, but it might come in handy if we see a
ton of address changes at the fork boundary. I know the devops team have been
testing with ~100k changes, so maybe this will help in that case.

* Revert "Reduce big-O complexity of address change pruning"

This reverts commit e7d93e6.
* Allow for withdrawals in max block size

* Ensure payload size is counted
* Recognise execution in post-merge blocks

* Remove `.body()`

* Fix typo

* Use `is_default_with_empty_roots`.
* Modify comment to only include 4844

Capella only modifies per epoch processing by adding
`process_historical_summaries_update`, which does not change the realization of
justification or finality.

Whilst 4844 does not currently modify realization, the spec is not yet final
enough to say that it never will.

* Clarify address change verification comment

The verification of the address change doesn't really have anything to do with
the current epoch. I think this was just a copy-paste from a function like
`verify_exit`.
Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

Approved! 🎉 🎉

Congrats to all involved, this looks great! As you can see in the history, I made some suggestions via a bunch of PRs. However I don't think any of them were really significant, we probably could have gone to production as it was.

Seeing as we're planning to merge this into unstable via a merge commit (rather than squash merge via bors), I think it makes sense to wait and see that CI finishes before merging.

@michaelsproul michaelsproul merged commit fa8b920 into unstable Feb 21, 2023
@michaelsproul michaelsproul deleted the capella branch February 21, 2023 23:27
@michaelsproul michaelsproul restored the capella branch February 21, 2023 23:28
@michaelsproul
Copy link
Member

Leaving the capella branch around for people using old instructions to build from source. We can delete it in a few days.

@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Feb 21, 2023
@paulhauner paulhauner deleted the capella branch April 25, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
capella consensus An issue/PR that touches consensus code, such as state_processing or block verification. major-task A significant amount of work or conceptual task. ready-for-merge This PR is ready to merge. v3.5.0 Minor release circa Q1 2023
Projects
None yet
Development

Successfully merging this pull request may close these issues.