-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the ability to produce an unsigned altair block
- added `/eth/v2/validator/blocks/{slot}` route - added a note on the v1 endpoint that it only supports phase0 block production Added a note in the description of v2 to indicate the list of supported blocks will change over time as forks progress, hopefully setting the expectation that we're not creating a new api each time a fork happens.
- Loading branch information
Showing
3 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
get: | ||
tags: | ||
- ValidatorRequiredApi | ||
- Validator | ||
operationId: "produceBlockV2" | ||
summary: "Produce a new block, without signature." | ||
description: | | ||
Requests a beacon node to produce a valid block, which can then be signed by a validator. | ||
Metadata in the response indicates the type of block produced, and the supported types of block | ||
will be added to as forks progress. | ||
parameters: | ||
- name: slot | ||
in: path | ||
required: true | ||
description: "The slot for which the block should be proposed." | ||
schema: | ||
$ref: "../../beacon-node-oapi.yaml#/components/schemas/Uint64" | ||
- name: randao_reveal | ||
in: query | ||
required: true | ||
description: "The validator's randao reveal value." | ||
schema: | ||
$ref: '../../beacon-node-oapi.yaml#/components/schemas/Signature' | ||
- name: graffiti | ||
in: query | ||
required: false | ||
description: "Arbitrary data validator wants to include in block." | ||
schema: | ||
$ref: '../../beacon-node-oapi.yaml#/components/schemas/Graffiti' | ||
responses: | ||
"200": | ||
description: Success response | ||
content: | ||
application/json: | ||
schema: | ||
title: ProduceBlockV2Response | ||
type: object | ||
properties: | ||
version: | ||
type: string | ||
enum: [ phase0, altair ] | ||
example: "phase0" | ||
data: | ||
oneOf: | ||
- $ref: '../../beacon-node-oapi.yaml#/components/schemas/BeaconBlock' | ||
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" | ||
"400": | ||
description: "Invalid block production request" | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
examples: | ||
InvalidRequest: | ||
value: | ||
code: 400 | ||
message: "Invalid request to produce a block" | ||
"500": | ||
$ref: '../../beacon-node-oapi.yaml#/components/responses/InternalError' | ||
"503": | ||
$ref: '../../beacon-node-oapi.yaml#/components/responses/CurrentlySyncing' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters