Skip to content

nimbus_validator_client does not register validators with mev-relay when used with web3signer. #5730

Closed
@catwith1hat

Description

@catwith1hat

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:

Jan 12 11:05:22 node3 mev-boost[1638]: time="2024-01-12T11:05:22.539+01:00" level=info msg="http: POST /eth/v1/builder/validators 200" duration=0.333286 method=POST path=/eth/v1/builder/validators status=200 version=v1.6
Jan 12 11:11:46 node3 mev-boost[1638]: time="2024-01-12T11:11:46.363+01:00" level=info msg="http: POST /eth/v1/builder/validators 200" duration=0.291441 method=POST path=/eth/v1/builder/validators status=200 version=v1.6
Jan 12 11:18:13 node3 mev-boost[1638]: time="2024-01-12T11:18:13.806+01:00" level=info msg="http: POST /eth/v1/builder/validators 200" duration=0.540833 method=POST path=/eth/v1/builder/validators status=200 version=v1.6

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):

/nix/store/ij1gdm2rny1wn4mck3rg9pp24b2zk8z2-nimbus-eth2-24.1.1/bin/nimbus_beacon_node \
  '--suggested-fee-recipient=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \
  '--in-process-validators=true' \
  '--web3-signer-url=http://localhost:9330' \
  '--payload-builder=true' \
  '--payload-builder-url=http://localhost:18910'

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):

/nix/store/ij1gdm2rny1wn4mck3rg9pp24b2zk8z2-nimbus-eth2-24.1.1/bin/nimbus_beacon_node \
  '--suggested-fee-recipient=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \
  '--in-process-validators=false' \
  '--payload-builder=true' \
  '--payload-builder-url=http://localhost:18910'
/nix/store/ij1gdm2rny1wn4mck3rg9pp24b2zk8z2-nimbus-eth2-24.1.1/bin/nimbus_validator_client \
  '--suggested-fee-recipient=0xd8da6bf26964af9d7eed9e03e53415d37aa96045'  \
  '--web3-signer-url=http://localhost:9330'
  '--payload-builder=true'

Increasing the log level on nimbus_validator_client shows:

Jan 12 10:58:57 node1 nimbus_validator_client[22860]: DBG 2024-01-12 10:58:27.004+01:00 Could not get fee recipient for registration data validator=XXX
Jan 12 10:58:57 node1 nimbus_validator_client[22860]: DBG 2024-01-12 10:58:27.007+01:00 Validator registration missing validator index validator=XXXX
Jan 12 10:58:57 node1 nimbus_validator_client[22860]: DBG 2024-01-12 10:58:57.323+01:00 Validator registrations prepared           total=1 succeed=0 cached=0 bad=0 errors=0 index_missing=0 fee_missing=1 incorrect_time=0

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:

    let feeRecipient = vc.getFeeRecipient(validator.pubkey, vindex,
                                          currentSlot.epoch())
    if feeRecipient.isNone():
      debug "Could not get fee recipient for registration data",
            validator = shortLog(validator)
      return err(RegistrationKind.MissingFee)

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 to Opt.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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions