Skip to content
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 register_validator endpoint #209

Merged

Conversation

lightclient
Copy link
Member

This is another take on #206.

Rather than extending prepare_beacon_proposer, in this PR we create a new, separate endpoint register_validator. This addresses two pieces of feedback raised against the extension:

  1. prepare_beacon_proposer performs a critical operation and probably shouldn't be encumbered by any additional responsibilities
  2. register_validator will likely be executed on a different rhythm than prepare_beacon_proposer, so it feels more appropriate to separate out that logic

--

Now a short recap on why it's important this data is sent to the beacon node in the first place.

After the merge, validators will want to extract MEV from blocks. The mechanism that will facilitate this extraction a network of external builders. These builders will provide ExecutionPayloadHeaders to proposers to include in their beacon blocks with the promise that they will be paid a portion of the extracted value. From the perspective of the builder, most values in the header are deterministic depending on what the parent is. However, it is important that a few parameters remain under control of the proposer.

First is obviously the fee_recipient. Although it's not critical that the payload's actual fee_recipient be set to the proposer's preferred address (a simple transfer at the end of the block would suffice), it is crucial block builders have this information ahead of time so that they can begin constructing blocks immediately after their forkchoice moves forward.

The second parameter that is on the critical path to production is gas_limit. Strictly speaking, builders could decide whatever limit they like under the rules of consensus, however this gives a small number of builders a lot of power over this protocol parameter. Validators are more aligned with choosing a healthy gas limit, so it's best that value is left up to them.

In order to provide these two values to builders ahead of time in an form that can be authenticated, we introduce this new endpoint. By signing over these values and a timestamp, builders can determine validator's latest preferences before they are scheduled to propose.

The Builder API and spec is currently being developed in ethereum/builder-specs. A new domain type has also been proposed which will be utilized by this endpoint to avoid a conflict with consensus-level messages.

@lightclient lightclient force-pushed the new-validator-registration-method branch from 2e61dae to 7109932 Compare May 6, 2022 12:22
types/registration.yaml Outdated Show resolved Hide resolved
ralexstokes
ralexstokes previously approved these changes May 6, 2022
Copy link
Member

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

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

left one comment below about defining the common types in the pyspec style somewhere and otherwise this looks great.

I strongly support this solution over #206

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

Looks good! minor comment on the language.
plus I prefer keeping it in the validator namespace as this is something the validator uses in it's BN communications

apis/validator/register_validator.yaml Outdated Show resolved Hide resolved
@lightclient lightclient force-pushed the new-validator-registration-method branch from 811f4e9 to f91bcc2 Compare May 10, 2022 08:12
@lightclient
Copy link
Member Author

Hi @mpetrunic, would you mind taking a look at this? Thanks!

Copy link
Collaborator

@mpetrunic mpetrunic left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants