-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add Support for Nimbus #89
Merged
Merged
Conversation
This file contains 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
…Validator() that looks at the client type and restarts the beacon container if it's a single-process type
… with websocket ETH1 endpoints)
…extension autoformat...
…include more verbose descriptions and URLs
ActivationEpoch uint64 json:"activation_epoch" <== I bet this needs to be an int64 too
Update types.go
kidkal
approved these changes
Mar 6, 2021
…ndle null addresses, thanks Jake!
…Validator() that looks at the client type and restarts the beacon container if it's a single-process type
… with websocket ETH1 endpoints)
…extension autoformat...
…include more verbose descriptions and URLs
ActivationEpoch uint64 json:"activation_epoch" <== I bet this needs to be an int64 too
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.
This is one of two PRs that adds support for the Nimbus ETH2 client to Rocket Pool (the other being in
smartnode-install
). This was a nontrivial add, so here are my notes on my changes beyond simply adding a new client and keystore.NOTE: this builds on top of the Teku PR I already submitted. If you accept this, you'll get all of those changes for free so you can ignore that PR.
Nimbus JSON-RPC Bug
So first things first, Nimbus v1.0.7 has a bug in its json-rpc library that breaks when you send requests that omit the
params
object if it's empty. I fixed this already and it's been merged but we can't officially support Nimbus until they push a new Docker image with this fix in. Stay tuned for that.Single Process
Unlike the other clients, Nimbus (currently) only runs as a single process that is both the beacon client and the validator. This conflicts with RP's current model, where ETH2 clients are split into separate containers for beacon and validator activity, respectively. This poses some challenges, most of which are mitigated in the
smartnode-install
PR but there are a few changes that had to happen in this repository:GetClientType()
to beacon clients. This class returns an enum value - eitherSplitProcess
orSingleProcess
.SplitProcess
is meant to capture the "normal" model, where the beacon client and validator are run separately.SingleProcess
captures clients like Nimbus that run as a single process.restartValidator()
instake-prelaunch-minipools.go
, I added some logic that checks the client type. If it's a single process, it will restart therocketpool_eth2
image instead of therocketpool_validator
image.Websocket API in Geth
Nimbus doesn't support HTTP APIs for web3 / ETH1 clients like the other clients do. It only supports Websockets. To work around that, I added a new variable called
WsProvider
to the config defined inshared/services/config/config.go
and a corresponding value inshared/services/rocketpool/client.go
for the rest of the client to use. More details on this are available in thesmartnode-install
PR.I think that's everything. I've tested this on Dockerized and non-Dockerized setups, and it behaves as expected in both environments. I suggest we use the next beta to thoroughly try this out, provided Status released a fixed version of the Nimbus image in time.