-
Notifications
You must be signed in to change notification settings - Fork 251
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
Since 23.10.0, nimbus-eth2 won't send registrations for validators attached to a validator client anymore #5599
Comments
Had a closer look at the code today. I was able to fix the issue in my use case with the attached patch. It simply adds the pubkeys stored in I could verify that with this in place, registration is working again, with mevboost receiving the expected messages once per epoch.
If you can please have a look in case it breaks something else or if there is a better way to address this. Please let me know what you think of it, and if you need me to fill a PR. |
You're correct, indeed, about the diagnosis of this issue. The refactoring linked missed VC-based validators, and your patch is a good way to add them back. Feel free to make a PR from it. Good to have split out the Also, the proc registerValidatorsPerBuilder(
node: BeaconNode, payloadBuilderAddress: string, epoch: Epoch,
attachedValidatorPubkeys: seq[ValidatorPubKey]) {.async.} = is inaccurate/too specific/narrow after your patch; suggested name is something like just |
Thanks, will do later today. |
I found my previous patch still had certain cases uncovered and would introduce new issues, so i figured out a better way to address this:
Another case that is not covered would be when we want to specify per VC validator builder URLs (instead of using the value of Pull request: #5603 |
Specifying per-VC validator builder URLs is probably useful, but the rest of the infrastructure for that isn't there, so it'd be unused and untested code. There's also not really a mechanism currently to specify that the BN doesn't know/own the key pair of some VC/external/REST API validator, but does want to specify the route, which is another approach (still fragmented, but, would at least allow this to work). So:
isn't really true in a platonic ideal case, but practically, the most reasonable thing is to register all VC validators under the BN-default external payload builder. It'd probably be a useful spec change, but for the moment, going by https://github.com/ethereum/beacon-APIs/blob/master/types/registration.yaml and https://github.com/ethereum/beacon-APIs/blob/master/apis/validator/register_validator.yaml is what should happen. Shorter term, it might make sense to clarify, to the extent the VC pretends to process the |
Yes this completely makes sense, i was thinking what could be needed in the future but that's seems the best thing to do for now. I don't think One practical use case i can think of: let's say i'm sharing a nimbus_beacon_node with a friend. Each of us runs their own nimbus_validator_client because we want to retain full control on our respective validators' keys. But let's also say my friend absolutly wants to use only OFAC compliant builders, while i absolutly want to only use the non-censoring ones. Having a way to override builder sets at the VC level would be useful in that case. Might be nice to have, but definitely beyond the scope of this 'fix' issue and related PR. So i will add a comment pointing to this discussion to the proposed change in the PR as you suggested. |
…validator registration (issue #5599). (#5603) The proposed change ensures that VC validators are registered with the builder specified by the `--payload-builder-url` argument even if the beacon node has no attached validators. It also prevent such validators from being unintentionally registered with builders configured for specific attached validators by the keymanager api. Per the current specs, the VC have no way to specify which builders the BN should use on a per-node basis, so for the time being we have to resort to using the BN fallback default builder URL for VC validators.
Describe the bug
Potential regression introduced in 23.10.0 (likely by #5431).
When using validators on a remote nimbus_validator_client, and with no validator directly attached to nimbus_beacon_node, registration for those validators are not sent by nimbus_beacon_node to mev-boost anymore, after upgrading from 23.9.1 to 23.10.0.
To Reproduce
I have a solo staking setup comprised of an nimbus_validator_client with a few validators, attached to two nimbus_beacon_node.
Each nimbus_beacon_node connects to a local mevboost instance (latest v1.16 from flashbots).
I've configured MEV as described in https://nimbus.guide/external-block-builder.html.
In particular:
Said otherwise, i run my nimbus_validator_client with
--payload-builder=true
, my nimbus_beacon_node with--payload-builder=true --payload-builder-url=http://127.0.0.1:18550
and that's about it.Everything was working fine when i was using 23.9.1 and earlier releases, the registrations for all validators were successfully sent to mevboost and taken into account by the configured relays.
I then upgraded the beacon nodes and validator client to 23.10.0, and following this, added a couple of new validators to nimbus_validator_client.
After investigating why i failed to use MEV for a block proposed by one of the new validators, i noticed that those had never been registered successfully, contrary to the the older ones (added when i was still running 23.9.1 or earlier).
I am certain (from debug logs and traffic analysis) that nimbus_validator_client correctly builds and sends the registration messages to the /eth/v1/validator/register_validator endpoint of the beacon node API, that the POST request is correctly received by the beacon node and replied with 200 OK.
I also obtain the same response when sending the captured request (with one correct registration message for each of my validators) directly to the beacon node using curl.
I'm also certain (proven by mevboost logs and loopback traffic capture) that nimbus_beacon_node 23.10.0 DOES NOT send any registration message to mevboost.
Workaround
I downgraded one of my beacon nodes from 23.10.0 to 23.9.1 (without changing anything in the config). As soon as it finished restarting and that nimbus_validator_client had connected to it, it sent the registration messages. With version 23.9.1 of nimbus_beacon_node, those messages were successfully passed to mevboost and all my validators were successfully registered with all relays.
After confirming successful registration, i put back 23.10.0.
Additional context
The effect is not visible immediately because validators that were previously registered with the relays can remains so for a long time.
The issue is also present in 23.10.1.
After a brief review of the changes to the code, i'm suspecting pull request #5431 to be related with this.
More specifically:
node.externalBuilderRegistrations
;registerValidatorsPerBuilder
;registerValidatorsPerBuilder
is itself called fromregisterValidators
at beacon_validators.nim#L1708, but ifnode.attachedValidators
is empty,builderKeys
remains empty as well andregisterValidatorsPerBuilder
is never called.The text was updated successfully, but these errors were encountered: