Skip to content

Commit 2953725

Browse files
committed
new epbs payload_attestations get and post
1 parent a1d3acc commit 2953725

File tree

8 files changed

+188
-29
lines changed

8 files changed

+188
-29
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ There are likely to be descriptions etc outside of the list below, but new query
1414
| [#546](https://github.com/ethereum/beacon-APIs/pull/546) `GET /eth/v1/beacon/blobs/{block_id}` added | | | | | |
1515
| [#552](https://github.com/ethereum/beacon-APIs/pull/552) `GET /eth/v1/validator/execution_payload_bid/{slot}/{builder_index}` added | | | | | |
1616
| [#552](https://github.com/ethereum/beacon-APIs/pull/552) `GET /eth/v1/validator/execution_payload_envelope/{slot}/{builder_index}` added | | | | | |
17+
| [#552](https://github.com/ethereum/beacon-APIs/pull/552) `GET /eth/v1/validator/payload_attestation_data` added | | | | | |
1718
| [#552](https://github.com/ethereum/beacon-APIs/pull/552) `POST /eth/v1/validator/duties/ptc/{epoch}` added | | | | | |
1819
| [#552](https://github.com/ethereum/beacon-APIs/pull/552) `POST /eth/v1/beacon/execution_payload_bid` added | | | | | |
1920
| [#552](https://github.com/ethereum/beacon-APIs/pull/552) `POST /eth/v1/beacon/execution_payload_envelope` added | | | | | |
21+
| [#552](https://github.com/ethereum/beacon-APIs/pull/552) `POST /eth/v1/beacon/pool/payload_attestations` added | | | | | |
2022
| [#552](https://github.com/ethereum/beacon-APIs/pull/552) `GET /eth/v3/validator/blocks/{slot}` updated | | | | | |
2123
| [#552](https://github.com/ethereum/beacon-APIs/pull/552) `POST /eth/v2/beacon/blocks` updated | | | | | |
2224

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
get:
2+
operationId: getPoolPayloadAttestations
3+
summary: Get payload attestations from operations pool
4+
description: Retrieves payload attestations known by the node but not necessarily incorporated into any block
5+
parameters:
6+
- name: slot
7+
in: query
8+
required: false
9+
schema:
10+
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Uint64'
11+
tags:
12+
- Beacon
13+
responses:
14+
"200":
15+
description: Successful response
16+
content:
17+
application/json:
18+
schema:
19+
title: GetPoolPayloadAttestationsResponse
20+
type: object
21+
required: [version, data]
22+
properties:
23+
version:
24+
type: string
25+
enum: [gloas]
26+
example: "gloas"
27+
data:
28+
type: array
29+
items:
30+
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Gloas.PayloadAttestationMessage'
31+
"400":
32+
description: "The slot could not be parsed"
33+
content:
34+
application/json:
35+
schema:
36+
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
37+
example:
38+
code: 400
39+
message: "Invalid slot parameter"
40+
"500":
41+
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError'
42+
43+
post:
44+
operationId: submitPayloadAttestationMessage
45+
summary: Submit payload attestation message
46+
description: |
47+
Submits a payload attestation message to the beacon node.
48+
49+
The beacon node will validate the payload attestation message according to the gossip validation rules
50+
and, if valid, store it in the pool and broadcast it globally to the network.
51+
52+
A success response indicates that the payload attestation message passed validation and was
53+
successfully stored and broadcast.
54+
tags:
55+
- Beacon
56+
- ValidatorRequiredApi
57+
requestBody:
58+
description: "The PayloadAttestationMessage object to be submitted."
59+
required: true
60+
content:
61+
application/json:
62+
schema:
63+
$ref: "../../beacon-node-oapi.yaml#/components/schemas/Gloas.PayloadAttestationMessage"
64+
application/octet-stream:
65+
schema:
66+
description: "SSZ serialized PayloadAttestationMessage bytes. Use Content-Type header to indicate that SSZ data is contained in the request body."
67+
responses:
68+
"200":
69+
description: "The payload attestation message was stored in the pool and has been broadcast."
70+
content:
71+
text/plain:
72+
schema:
73+
type: string
74+
"400":
75+
description: "The PayloadAttestationMessage object is invalid or failed gossip validation"
76+
content:
77+
application/json:
78+
schema:
79+
$ref: "../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
80+
"415":
81+
$ref: "../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType"
82+
"500":
83+
$ref: "../../beacon-node-oapi.yaml#/components/responses/InternalError"

apis/validator/duties/ptc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
post:
22
tags:
33
- Validator
4+
- ValidatorRequiredApi
45
summary: "Get PTC duties"
56
operationId: "getPtcDuties"
67
description: "Requests the beacon node to provide a set of Payload Timeliness Committee (PTC) duties,
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
get:
2+
tags:
3+
- ValidatorRequiredApi
4+
- Validator
5+
operationId: "producePayloadAttestationData"
6+
summary: "Produce payload attestation data"
7+
description: |
8+
Requests that the beacon node produce a PayloadAttestationData.
9+
10+
This endpoint is used by PTC validators to obtain the data structure they need to attest to
11+
regarding payload presence and blob data availability for a specific slot.
12+
13+
A 503 error must be returned if the beacon node is currently syncing.
14+
parameters:
15+
- name: slot
16+
in: query
17+
required: true
18+
description: "The slot for which payload attestation data should be created."
19+
schema:
20+
$ref: ../../beacon-node-oapi.yaml#/components/schemas/Uint64
21+
responses:
22+
"200":
23+
description: "Success response"
24+
content:
25+
application/json:
26+
schema:
27+
title: ProducePayloadAttestationDataResponse
28+
type: object
29+
required: [data]
30+
properties:
31+
data:
32+
$ref: "../../beacon-node-oapi.yaml#/components/schemas/Gloas.PayloadAttestationData"
33+
application/octet-stream:
34+
schema:
35+
description: "SSZ serialized PayloadAttestationData bytes. Use Accept header to choose this response type"
36+
"400":
37+
$ref: '../../beacon-node-oapi.yaml#/components/responses/InvalidRequest'
38+
"406":
39+
$ref: '../../beacon-node-oapi.yaml#/components/responses/NotAcceptable'
40+
"500":
41+
$ref: "../../beacon-node-oapi.yaml#/components/responses/InternalError"
42+
"503":
43+
$ref: "../../beacon-node-oapi.yaml#/components/responses/CurrentlySyncing"

beacon-node-oapi.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ paths:
138138
$ref: "./apis/beacon/light_client/optimistic_update.yaml"
139139
/eth/v2/beacon/pool/attestations:
140140
$ref: "./apis/beacon/pool/attestations.v2.yaml"
141+
/eth/v1/beacon/pool/payload_attestations:
142+
$ref: "./apis/beacon/pool/payload_attestations.yaml"
141143
/eth/v2/beacon/pool/attester_slashings:
142144
$ref: "./apis/beacon/pool/attester_slashings.v2.yaml"
143145
/eth/v1/beacon/pool/proposer_slashings:
@@ -190,6 +192,8 @@ paths:
190192
$ref: "./apis/validator/block.v3.yaml"
191193
/eth/v1/validator/attestation_data:
192194
$ref: "./apis/validator/attestation_data.yaml"
195+
/eth/v1/validator/payload_attestation_data:
196+
$ref: "./apis/validator/payload_attestation_data.yaml"
193197
/eth/v2/validator/aggregate_attestation:
194198
$ref: "./apis/validator/aggregate_attestation.v2.yaml"
195199
/eth/v2/validator/aggregate_and_proofs:
@@ -449,6 +453,12 @@ components:
449453
$ref: "./types/gloas/execution_payload_envelope.yaml#/Gloas/ExecutionPayloadEnvelope"
450454
Gloas.SignedExecutionPayloadEnvelope:
451455
$ref: "./types/gloas/execution_payload_envelope.yaml#/Gloas/SignedExecutionPayloadEnvelope"
456+
Gloas.PayloadAttestationData:
457+
$ref: "./types/gloas/payload_attestation.yaml#/Gloas/PayloadAttestationData"
458+
Gloas.PayloadAttestation:
459+
$ref: "./types/gloas/payload_attestation.yaml#/Gloas/PayloadAttestation"
460+
Gloas.PayloadAttestationMessage:
461+
$ref: "./types/gloas/payload_attestation.yaml#/Gloas/PayloadAttestationMessage"
452462
Fulu.BlockContents:
453463
$ref: "./types/fulu/block_contents.yaml#/Fulu/BlockContents"
454464
Fulu.SignedBlockContents:

types/gloas/block.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Gloas:
5252
type: array
5353
description: "Array of payload attestations from gloas."
5454
items:
55-
$ref: "./payload_attestations.yaml#/Gloas/PayloadAttestation"
55+
$ref: "./payload_attestation.yaml#/Gloas/PayloadAttestation"
5656
minItems: 0
5757
maxItems: 4
5858

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Gloas:
2+
PayloadAttestationData:
3+
type: object
4+
description: "The [`PayloadAttestationData`](https://github.com/ethereum/consensus-specs/blob/master/specs/gloas/beacon-chain.md#payloadattestationdata) object from the CL Gloas spec."
5+
required: [beacon_block_root, slot, payload_present, blob_data_available]
6+
properties:
7+
beacon_block_root:
8+
allOf:
9+
- $ref: "../primitive.yaml#/Root"
10+
- description: "Hash tree root of the beacon block associated with this ptc attestation"
11+
slot:
12+
allOf:
13+
- $ref: "../primitive.yaml#/Uint64"
14+
- description: "The slot for which the payload attestation is being made"
15+
payload_present:
16+
type: boolean
17+
description: "True if a SignedExecutionPayloadEnvelope has been seen referencing this block"
18+
blob_data_available:
19+
type: boolean
20+
description: "True if blob data is available for this block"
21+
22+
PayloadAttestation:
23+
type: object
24+
description: "The [PayloadAttestation](https://github.com/ethereum/consensus-specs/blob/master/specs/gloas/beacon-chain.md#payloadattestation) object from the CL gloas spec."
25+
required: [aggregation_bits, data, signature]
26+
properties:
27+
aggregation_bits:
28+
$ref: "../primitive.yaml#/BitList"
29+
data:
30+
$ref: "#/Gloas/PayloadAttestationData"
31+
signature:
32+
$ref: "../primitive.yaml#/Signature"
33+
34+
PayloadAttestationMessage:
35+
type: object
36+
description: "The [`PayloadAttestationMessage`](https://github.com/ethereum/consensus-specs/blob/master/specs/gloas/beacon-chain.md#payloadattestationmessage) object from the CL Gloas spec."
37+
required: [validator_index, data, signature]
38+
properties:
39+
validator_index:
40+
allOf:
41+
- $ref: "../primitive.yaml#/Uint64"
42+
- description: "Index of the validator submitting the payload attestation"
43+
data:
44+
$ref: "#/Gloas/PayloadAttestationData"
45+
signature:
46+
allOf:
47+
- $ref: "../primitive.yaml#/Signature"
48+
- description: "BLS signature of the payload attestation data"

types/gloas/payload_attestations.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)