-
Notifications
You must be signed in to change notification settings - Fork 261
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
nimbus_validator_client does not register validators with mev-relay when used with web3signer. #5730
Comments
If i get it right, the main relevant difference between #5599 and this issue is that you are using a web3-signer instead of having the validator keys stored with the validator-client. And contrary to #5599, here the validator client fails to register its validators with the beacon node because it cannot determine the fee address to use. There is no mention of a keymanger API being used to configure per-validator settings, so the correct behaviour in that situation would be that the VC client uses the value passed to the |
Would be interesting to add a debug after
withdrawalAddress , perValidatorDefaultFeeRecipient and staticRecipient , and reproduce the situation. Would help understand what is happening here.
The assumption would be that |
I added some debug prints in this commit and found that:
So your assumption
is correct. The failing code is here: nimbus-eth2/beacon_chain/validators/keystore_management.nim Lines 822 to 830 in 0e63f8f
The comment even explains that the function deliberately does not return I wonder what's the best way forward. nimbus-eth2/beacon_chain/validator_client/common.nim Lines 969 to 970 in 26b61af
to handle |
That completely makes sense, that's why it does not work when an external web3 signer is used. Out of curiosity, if you create an empty directory with your validator pubkey under the As mentioned in https://nimbus.guide/web3signer.html when using a web3 signer there should be nothing else to do than passing the My initial thought would be that the current implementation of getSuggestedFeeRecipient does not consider that case, but i don't fully understand the So i would agree that getSuggestedFeeRecipient should be amended not to fail in that case (and instead return the Tagging @arnetheduck who wrote the current version of getSuggestedFeeRecipient for further advice on this. |
There is one moment which was missed.
This is actual problem of why registrations not happened, because To get more information i need more logs, for at least 24 seconds of running right after |
Sorry, I can't share logs verbatim, and what you are seeing is a redacted version. Also let me assure you that my shared logs are pretty much a steady state. Nimbus never succeeds in registering web3signer-provided pubkeys and always claims Also I believe that we have diagnosed the problem sufficiently and the absense of validator directories is to blame. I have patched the problem in my private repo. stable...catwith1hat:nimbus-eth2:stable |
IF this log lines
are real one, then your investigation is followed wrong path, because code flow never reaches So you see this error message in the logs. As you can see code flow never reaches Remote web3signer did not provide to VC validator indicies, it only provides validator public keys. To get validator index VC should query it from BN. This also happens once per slot in other loop, so if situation is not recovers in one slot time it means that validator public key which was provided by web3signer is not activated yet or slashed or not present in blockchain. Or there is one more bug/issue in VC/web3signer/BN used in configuration. |
My apologies and sorry for wasting your time here a bit. I do have unactivated validators in my web3signer instance. So I guess that's where the log lines:
might come from. However, that problem above is unrelated to To me the only remaining question is how to fix this upstream. |
I agree with @catwith1hat diagnosis and i think the proposed fix would work. Did you have a chance to confirm that your commit, or something like this, fixed the issue?
|
@catwith1hat could you please check if the following branch no longer has the issue: |
…-im#5730) This change ensures that suggested-fee-recipient will be used as default even if the validator directory does not exist when a web3-signer-url is specified.
…-im#5730) This change ensures that suggested-fee-recipient will be used as default even if the validator directory does not exist when a web3-signer-url is specified.
#5781 should address this. |
Thanks everyone for the fixes. Please give me two or three days to deploy that change. |
I had a look at #5781 that was merged into unstable, and also came to the conclusion that it (and more precisely this change) should have fixed this issue. |
unstable does not compile for me. Do I need a newer version of Nim?
|
@catwith1hat you can check the required version by looking at the vendor/nimbus-build-system/vendor/Nim subfolder - nimbus only builds with exactly that version - we do generally not support or endorse using OS-provided compilers (as we might have patched Nim itself) |
Clean build (resetting any pending changes) ulimit -n 1024 && rm -rf ~/.cache ~/.nimble build nimcache vendor .git/modules && \
git submodule sync --recursive && git clean -dfx
make update && make -j deps
make -j nimbus_beacon_node |
The fix for this issue was shipped in Nimbus 24.1.2 |
The good case
The mev-boost process must receive validator registrations periodically in order for mev-boost to work. In the logs this looks like this:
You can see a period refresh via POST request. When I run the in-process validator inside
nimbus_beacon_node
this works fine. I run nimbus_beacon_node with a remote web3signer. Here are the essential command line flags are (stripped for brevity):The bad case
Switching to an external validator seems to work fine at first glance (attestion, block building works). However, MEV boost does not work. There are no POST requests in the logs, so I suspect that the mev-boost process stopped receiving registrations. The essentials flags are (stripped for brevity):
Increasing the log level on
nimbus_validator_client
shows:All validator registrations fail.
Broken code flow
prepareRegistrationList prepares all registrations and keeps the statistics printed above. getValidatorRegistration prepares a single registration and fails at this block:
Looking at getFeeRecipient shows that dynamic recipients are treated differently as there is a special block handling them at the top. L956 retrieves information from the
dynamicFeeRecipientStore
. I don't think that's relevant here though, because I think that the whole function falls through toOpt.None(Eth1Address)
.Why does it fall through? Probably because
vc.config.defaultFeeRecipient
is not set to the command line value provided. Maybe some glue code is missing somewhere to propagate the flag value?This bug is very similar to #5599 . Maybe @stephanep or @tersec has some insights. Thank you!
The text was updated successfully, but these errors were encountered: