From 8130f3cdfc354b39e7c9d6fcbb46e258dac73e82 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar <43061995+xenowits@users.noreply.github.com> Date: Fri, 7 Apr 2023 19:41:21 +0530 Subject: [PATCH] v1: builder proposer endpoint (#4) * v1: builder proposer endpoint * rename DVT to DV --- apis/validator/proposer_config.yaml | 24 ++++++++++ beacon-node-oapi.yaml | 4 ++ types/proposer_config.yaml | 68 +++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 apis/validator/proposer_config.yaml create mode 100644 types/proposer_config.yaml diff --git a/apis/validator/proposer_config.yaml b/apis/validator/proposer_config.yaml new file mode 100644 index 00000000..b9cd5d86 --- /dev/null +++ b/apis/validator/proposer_config.yaml @@ -0,0 +1,24 @@ +get: + tags: + - ValidatorRequiredApi + - Validator + operationId: "proposerConfig" + summary: "Produce a proposer config" + description: | + Requests the beacon node or DV middleware to produce the proposer config. The proposer_config enables validator registrations + for distributed validator (DV) middleware clients. + responses: + "200": + description: Success response + content: + application/json: + schema: + title: ProposerConfigResponse + type: object + properties: + data: + $ref: '../../beacon-node-oapi.yaml#/components/schemas/ProposerConfig' + "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 fb65cd73..f032a167 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -188,6 +188,8 @@ paths: $ref: "./apis/validator/sync_committee_contribution.yaml" /eth/v1/validator/sync_committee_selections: $ref: "./apis/validator/sync_committee_selections.yaml" + /eth/v1/validator/proposer_config: + $ref: "./apis/validator/proposer_config.yaml" /eth/v1/validator/contribution_and_proofs: $ref: "./apis/validator/sync_committee_contribution_and_proof.yaml" /eth/v1/validator/prepare_beacon_proposer: @@ -245,6 +247,8 @@ components: $ref: './types/selection.yaml#/BeaconCommitteeSelection' SyncCommitteeSelection: $ref: './types/selection.yaml#/SyncCommitteeSelection' + ProposerConfig: + $ref: './types/proposer_config.yaml#/BuilderProposerConfig' Fork: $ref: './types/misc.yaml#/Fork' Checkpoint: diff --git a/types/proposer_config.yaml b/types/proposer_config.yaml new file mode 100644 index 00000000..7cc833c4 --- /dev/null +++ b/types/proposer_config.yaml @@ -0,0 +1,68 @@ +BuilderProposerConfig: + type: object + required: ["default_config"] + properties: + default_config: + allOf: + - $ref: './proposer_config.yaml#/DefaultConfig' + proposer_config: + allOf: + - $ref: './proposer_config.yaml#/ProposerConfig' + +DefaultConfig: + type: object + description: "A default proposer configuration contains all default values to be applied to every validator. These values can be overridden for specific validators in proposer_config." + properties: + fee_recipient: + allOf: + - $ref: "./primitive.yaml#/ExecutionAddress" + - example: "0xabcf8e0d4e9587369b2301d0790347320302cc09" + - description: "Fee-recipient address" + builder: + allOf: + - $ref: './proposer_config.yaml#/Builder' + +ProposerConfig: + description: "A proposer configuration for multiple validator public keys. This overrides default config for selected validators." + type: array + items: + type: object + properties: + public_key: + allOf: + - $ref: "./primitive.yaml#/Pubkey" + - description: "The validator to override values for" + fee_recipient: + allOf: + - $ref: "./primitive.yaml#/ExecutionAddress" + - example: "0xabcf8e0d4e9587369b2301d0790347320302cc09" + - description: "Fee-recipient address" + builder: + allOf: + - $ref: './proposer_config.yaml#/Builder' + +Builder: + type: object + description: "The builder network configuration." + properties: + enabled: + allOf: + - type: boolean + - example: false + gas_limit: + allOf: + - $ref: "./primitive.yaml#/Uint256" + registration_overrides: + allOf: + - $ref: './proposer_config.yaml#/RegistrationOverrides' + +RegistrationOverrides: + type: object + description: "Fields for overriding validator registrations" + properties: + timestamp: + allOf: + - $ref: "./primitive.yaml#/Uint64" + public_key: + allOf: + - $ref: "./primitive.yaml#/Pubkey"