diff --git a/apis/validator/register_validator.yaml b/apis/validator/register_validator.yaml new file mode 100644 index 00000000..41743af8 --- /dev/null +++ b/apis/validator/register_validator.yaml @@ -0,0 +1,30 @@ +post: + operationId: "registerValidator" + summary: Provide beacon node with registrations for the given validators to the external builder network. + description: | + Prepares the beacon node for engaging with external builders. The + information will be sent by the beacon node to the builder network. It is + expected that the validator client will send this information periodically + to ensure the beacon node has correct and timely registration information + to provide to builders. The validator client should not sign blinded beacon + blocks that do not adhere to their latest fee recipient and gas limit + preferences. + + Note that requests containing currently inactive or unknown validator + pubkeys will be accepted, as they may become active at a later epoch. + tags: + - Validator + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '../../beacon-node-oapi.yaml#/components/schemas/SignedValidatorRegistration' + responses: + "200": + description: Registration information has been received. + "400": + $ref: '../../beacon-node-oapi.yaml#/components/responses/InvalidRequest' + "500": + $ref: '../../beacon-node-oapi.yaml#/components/responses/InternalError' diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index b89165b2..604593a4 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -161,6 +161,8 @@ paths: $ref: "./apis/validator/sync_committee_contribution_and_proof.yaml" /eth/v1/validator/prepare_beacon_proposer: $ref: "./apis/validator/prepare_beacon_proposer.yaml" + /eth/v1/validator/register_validator: + $ref: "./apis/validator/register_validator.yaml" /eth/v1/events: $ref: "./apis/eventstream/index.yaml" @@ -273,6 +275,9 @@ components: ConsensusVersion: enum: [phase0, altair, bellatrix] example: "phase0" + SignedValidatorRegistration: + $ref: './types/registration.yaml#/SignedValidatorRegistration' + parameters: StateId: $ref: './params/index.yaml#/StateId' diff --git a/types/registration.yaml b/types/registration.yaml new file mode 100644 index 00000000..e7601c35 --- /dev/null +++ b/types/registration.yaml @@ -0,0 +1,25 @@ +ValidatorRegistration: + type: object + description: "The `ValidatorRegistration` object from the Builder API specification." + properties: + fee_recipient: + $ref: 'primitive.yaml#/ExecutionAddress' + description: "Address to receive fees from the block." + gas_limit: + $ref: "primitive.yaml#/Uint64" + description: "Preferred gas limit of validator." + timestamp: + $ref: 'primitive.yaml#/Uint64' + description: "Unix timestamp of registration." + pubkey: + $ref: 'primitive.yaml#/Pubkey' + description: "BLS public key of validator." + +SignedValidatorRegistration: + type: object + description: "The `SignedValidatorRegistration` object from the Builder API specification." + properties: + message: + $ref: "#/ValidatorRegistration" + signature: + $ref: "primitive.yaml#/Signature"