Skip to content

Commit

Permalink
v1: builder proposer endpoint (#4)
Browse files Browse the repository at this point in the history
* v1: builder proposer endpoint
* rename DVT to DV
  • Loading branch information
xenowits authored Apr 7, 2023
1 parent f087fbf commit 8130f3c
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 0 deletions.
24 changes: 24 additions & 0 deletions apis/validator/proposer_config.yaml
Original file line number Diff line number Diff line change
@@ -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'
4 changes: 4 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
68 changes: 68 additions & 0 deletions types/proposer_config.yaml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 8130f3c

Please sign in to comment.