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 proposers config endpoint #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"