Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.DS_Store
deploy
node_modules
dictionary.dic
12 changes: 11 additions & 1 deletion apis/fee_recipient.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
get:
operationId: listFeeRecipient
deprecated: true
summary: List Fee Recipient.
description: |
**DEPRECATED**: superseded by the Validator Config endpoint (`/eth/v1/validator/config`), which manages the fee recipient together with the rest of a validator's block-production preferences as one atomic per-key document. This endpoint will be removed in a future release.

List the validator public key to eth address mapping for fee recipient feature on a specific public key.
The validator public key will return with the default fee recipient address if a specific one was not found.

Expand Down Expand Up @@ -41,8 +44,11 @@ get:

post:
operationId: setFeeRecipient
deprecated: true
summary: Set Fee Recipient.
description: |
**DEPRECATED**: superseded by the Validator Config endpoint (`/eth/v1/validator/config`), which manages the fee recipient together with the rest of a validator's block-production preferences as one atomic per-key document. This endpoint will be removed in a future release.

Sets the validator client fee recipient mapping which will then update the beacon node.
Existing mappings for the same validator public key will be overwritten.
Specific Public keys not mapped will continue to use the default address for fee recipient in accordance to the startup of the validator client and beacon node.
Expand Down Expand Up @@ -85,8 +91,12 @@ post:
$ref: "../keymanager-oapi.yaml#/components/responses/InternalError"
delete:
operationId: deleteFeeRecipient
deprecated: true
summary: Delete Configured Fee Recipient
description: Delete a configured fee recipient mapping for the specified public key.
description: |
**DEPRECATED**: superseded by the Validator Config endpoint (`/eth/v1/validator/config`), which manages the fee recipient together with the rest of a validator's block-production preferences as one atomic per-key document. This endpoint will be removed in a future release.

Delete a configured fee recipient mapping for the specified public key.
security:
- bearerAuth: [ ]
tags:
Expand Down
9 changes: 9 additions & 0 deletions apis/gas_limit.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
get:
operationId: getGasLimit
deprecated: true
summary: Get Gas Limit.
description: |
**DEPRECATED**: superseded by the Validator Config endpoint (`/eth/v1/validator/config`), which manages the gas limit together with the rest of a validator's block-production preferences as one atomic per-key document. This endpoint will be removed in a future release.

Get the execution gas limit for an individual validator. This gas limit is the one used by the
validator when proposing blocks via an external builder. If no limit has been set explicitly for
a key then the process-wide default will be returned.
Expand Down Expand Up @@ -44,8 +47,11 @@ get:

post:
operationId: setGasLimit
deprecated: true
summary: Set Gas Limit.
description: |
**DEPRECATED**: superseded by the Validator Config endpoint (`/eth/v1/validator/config`), which manages the gas limit together with the rest of a validator's block-production preferences as one atomic per-key document. This endpoint will be removed in a future release.

Set the gas limit for an individual validator. This limit will be propagated to the beacon
node for use on future block proposals. The beacon node is responsible for informing external
block builders of the change.
Expand Down Expand Up @@ -88,8 +94,11 @@ post:
$ref: "../keymanager-oapi.yaml#/components/responses/InternalError"
delete:
operationId: deleteGasLimit
deprecated: true
summary: Delete Configured Gas Limit
description: |
**DEPRECATED**: superseded by the Validator Config endpoint (`/eth/v1/validator/config`), which manages the gas limit together with the rest of a validator's block-production preferences as one atomic per-key document. This endpoint will be removed in a future release.

Delete a configured gas limit for the specified public key.

The server may return a 400 status code if no external builder is configured.
Expand Down
9 changes: 9 additions & 0 deletions apis/graffiti.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
get:
operationId: getGraffiti
deprecated: true
summary: Get Graffiti
description: |
**DEPRECATED**: superseded by the Validator Config endpoint (`/eth/v1/validator/config`), which manages the graffiti together with the rest of a validator's block-production preferences as one atomic per-key document. This endpoint will be removed in a future release.

Get the graffiti for an individual validator. If no graffiti is set
explicitly, returns the process-wide default.
security:
Expand Down Expand Up @@ -45,8 +48,11 @@ get:

post:
operationId: setGraffiti
deprecated: true
summary: Set Graffiti
description: |
**DEPRECATED**: superseded by the Validator Config endpoint (`/eth/v1/validator/config`), which manages the graffiti together with the rest of a validator's block-production preferences as one atomic per-key document. This endpoint will be removed in a future release.

Set the graffiti for an individual validator.
security:
- bearerAuth: []
Expand Down Expand Up @@ -85,8 +91,11 @@ post:

delete:
operationId: deleteGraffiti
deprecated: true
summary: Delete Configured Graffiti
description: |
**DEPRECATED**: superseded by the Validator Config endpoint (`/eth/v1/validator/config`), which manages the graffiti together with the rest of a validator's block-production preferences as one atomic per-key document. This endpoint will be removed in a future release.

Delete the configured graffiti for the specified public key.
security:
- bearerAuth: []
Expand Down
251 changes: 251 additions & 0 deletions apis/validator_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
get:
operationId: getValidatorConfig
summary: Get Validator Config.
description: |
Returns the block-production preferences of the requested keys, or of all keys known to the
server when `pubkeys` is not given.

Each configured key returns its complete document, exactly as it was submitted. A key the
server knows but has no document for returns an empty object; its effective preferences are
the read-only `default_config` included in the response, taken whole (documents are
all-or-nothing, so nothing is merged per field). Keys the server does not know are omitted
from the response entirely.
security:
- bearerAuth: []
tags:
- Validator Config
parameters:
- in: query
name: pubkeys
required: false
description: |
Restrict the response to the given public keys. Keys the server does not know are omitted
from the response. When not given, the response covers all keys known to the server.
style: form
explode: false
schema:
type: array
items:
$ref: "../keymanager-oapi.yaml#/components/schemas/Pubkey"
responses:
"200":
description: Success response
content:
application/json:
schema:
title: GetValidatorConfigResponse
type: object
required: [data]
properties:
data:
type: object
required: [configs]
properties:
default_config:
allOf:
- $ref: "../keymanager-oapi.yaml#/components/schemas/ValidatorConfig"
- description: |
The defaults the client applies to keys with no configured document.
Read-only through this API. When present, `default_config` is itself a
complete document. When absent, keys without a document follow the
client's built-in defaults.
configs:
type: object
description: |
Mapping of validator public key (hex encoded with 0x prefix) to its configured
`ValidatorConfig` document. Keys with no per-key configuration map to an empty
object.
additionalProperties:
$ref: "../keymanager-oapi.yaml#/components/schemas/ValidatorConfig"
example:
data:
default_config:
fee_recipient: "0x8943545177806ED17B9F23F0a21ee5948eCaa776"
target_gas_limit: "30000000"
graffiti: "example graffiti"
builder:
enabled: true
builders:
- url: "https://builder-a.example.com"
auth_data: "0x68747470733a2f2f6275696c6465722d612e6578616d706c652e636f6d"
max_execution_payment: "0"
min_bid: "0"
builder_boost_factor: "100"
- url: "https://builder-b.example.com"
auth_data: "0x68747470733a2f2f6275696c6465722d622e6578616d706c652e636f6d"
max_execution_payment: "0"
min_bid: "0"
builder_boost_factor: "100"
configs:
"0xa057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7a":
fee_recipient: "0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3"
target_gas_limit: "45000000"
graffiti: "example graffiti"
builder:
enabled: true
builders:
- url: "https://builder-a.example.com"
auth_data: "0x1234567890abcdef"
pubkey: "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a"
max_execution_payment: "250000000"
min_bid: "10000000"
builder_boost_factor: "100"
- url: "https://builder-a.example.com"
auth_data: "0xdeadbeef"
max_execution_payment: "0"
min_bid: "0"
builder_boost_factor: "100"
"0xa99a76ed7796f7be22d5b7e85deeb7c5677e88e511e0b337618f8c4eb61349b4bf2d153f649f7b53359fe8b94a38e44c":
fee_recipient: "0x8943545177806ED17B9F23F0a21ee5948eCaa776"
target_gas_limit: "30000000"
graffiti: ""
builder:
enabled: false
"0xb0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7": {}
"400":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should we note specifics on not accepting duplicate urls just like we did on ethereum/beacon-APIs#630 ? or any other specifics

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i'm in the process of specifying that we MUST accept duplicate urls as long as the each per-key, there are no duplicate (url, auth_data) pairs

$ref: "../keymanager-oapi.yaml#/components/responses/BadRequest"
"401":
$ref: "../keymanager-oapi.yaml#/components/responses/Unauthorized"
"403":
$ref: "../keymanager-oapi.yaml#/components/responses/Forbidden"
"500":
$ref: "../keymanager-oapi.yaml#/components/responses/InternalError"

post:
operationId: setValidatorConfig
summary: Set Validator Config.
description: |
Sets the block-production preferences of one or more keys. Each submitted document replaces
the key's entire configuration; the server MUST NOT merge it with previously stored values.
Submit either a complete document (`fee_recipient`, `target_gas_limit`, `graffiti`, and a
fully resolved `builder`) or an empty one (`{}`), which clears the key so it follows the
client's defaults again (there is no separate delete operation). Anything in between fails
that key with a per-key `error` status.

Keys NOT present in `request.configs` are left untouched: only submitted keys are affected, so
a large key set may be split across multiple requests. Servers SHOULD accept request bodies
large enough to cover their full key set in one request (thousand-key batches are expected).

A configuration may be set for a key the server does not yet manage. The server SHOULD store it
(pre-provisioning) so it takes effect when the key is later added; a server that does not
pre-provision returns `not_found`.

Atomicity is per key, NOT per batch: each key's document takes effect fully or not at all, but
the batch is not transactional across keys. Keys that validate successfully are applied even
when other keys in the same request fail, and each key's outcome is reported in the per-key
response status.

Servers MUST validate the syntax of every submitted field (types, formats, patterns). A
`builders` list containing two entries with the same (`url`, `auth_data`) pair, compared as
the decoded `auth_data` bytes, is invalid; the server MUST NOT silently drop the duplicate.
Any such failure rejects that key's entire document with a per-key `error` status: no part of
it is applied.
Unrecognized fields are ignored for forward compatibility, consistent with the rest of the
keymanager API. In particular, `default_config` is read-only and cannot be written through this
API.
security:
- bearerAuth: []
tags:
- Validator Config
requestBody:
required: true
content:
application/json:
schema:
title: SetValidatorConfigRequest
type: object
required: [configs]
properties:
configs:
type: object
description: |
Mapping of validator public key (hex encoded with 0x prefix) to the full
`ValidatorConfig` document to set for that key, or `{}` to clear it. Keyed by
public key rather than validator index so configurations can be pre-provisioned
for keys that are not yet active.
additionalProperties:
$ref: "../keymanager-oapi.yaml#/components/schemas/ValidatorConfig"
example:
configs:
"0xa057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7a":
fee_recipient: "0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3"
target_gas_limit: "45000000"
graffiti: "example graffiti"
builder:
enabled: true
builders:
- url: "https://builder-a.example.com"
auth_data: "0x68747470733a2f2f6275696c6465722d612e6578616d706c652e636f6d"
max_execution_payment: "250000000"
min_bid: "10000000"
builder_boost_factor: "100"
"0xa99a76ed7796f7be22d5b7e85deeb7c5677e88e511e0b337618f8c4eb61349b4bf2d153f649f7b53359fe8b94a38e44c":
fee_recipient: "0x8943545177806ED17B9F23F0a21ee5948eCaa776"
target_gas_limit: "30000000"
graffiti: ""
builder:
enabled: true
builders:
- url: "https://builder-b.example.com"
auth_data: "0xdeadbeef"
max_execution_payment: "0"
min_bid: "0"
builder_boost_factor: "100"
- url: "https://builder-b.example.com"
auth_data: "0xDEADBEEF"
max_execution_payment: "0"
min_bid: "0"
builder_boost_factor: "100"
"0xb0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7": {}
responses:
"200":
description: Success response
content:
application/json:
schema:
title: SetValidatorConfigResponse
type: object
required: [data]
properties:
data:
type: object
description: Status of each key in `request.configs`, keyed by the same public keys.
additionalProperties:
type: object
required: [status]
properties:
status:
type: string
description: |
- set: the document was validated and applied. A complete document is
stored (pre-provisioned if the key is not yet managed, taking effect
when it is added); `{}` clears the key's configuration.
- not_found: the server neither manages this key nor supports
pre-provisioning, so nothing was stored
- error: the document failed validation or could not be applied; no change

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what should we do for unknown fields, silently accept ( client specific) or error here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

removed additionalProperties: false for more leniency to match the rest of the keymanager API. Unrecognized fields should be ignored and invalid values for recognized fields should error

was made for this key
enum:
- set
- not_found
- error
example: set
message:
type: string
description: error message if status == error
example:
data:
"0xa057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7a":
status: set
"0xa99a76ed7796f7be22d5b7e85deeb7c5677e88e511e0b337618f8c4eb61349b4bf2d153f649f7b53359fe8b94a38e44c":
status: error
message: "builder.builders[1] duplicates the (url, auth_data) pair of builder.builders[0]"
"0xb0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7":
status: set
"400":
$ref: "../keymanager-oapi.yaml#/components/responses/BadRequest"
"401":
$ref: "../keymanager-oapi.yaml#/components/responses/Unauthorized"
"403":
$ref: "../keymanager-oapi.yaml#/components/responses/Forbidden"
"500":
$ref: "../keymanager-oapi.yaml#/components/responses/InternalError"
Loading
Loading