Skip to content

Commit 14ddc04

Browse files
authored
Merge pull request #472 from eserilev/post_attestation_v2
Update submitPoolAttestationsV2 endpoint
2 parents 2e7c4aa + 45a8f2c commit 14ddc04

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

apis/beacon/pool/attestations.v2.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ post:
5656
operationId: submitPoolAttestationsV2
5757
summary: Submit Attestation objects to node
5858
description: |
59-
Submits Attestation objects to the node. Each attestation in the request body is processed individually.
59+
Submits attestations to the node. Each attestation in the request body is processed individually.
6060
6161
If an attestation is validated successfully, the node MUST publish that attestation on the appropriate subnet.
6262
@@ -82,7 +82,7 @@ post:
8282
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Attestation'
8383
- type: array
8484
items:
85-
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.Attestation'
85+
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.SingleAttestation'
8686
responses:
8787
"200":
8888
description: Attestations are stored in pool and broadcast on the appropriate subnet

apis/eventstream/index.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ get:
2626
- block
2727
- block_gossip
2828
- attestation
29+
- single_attestation
2930
- voluntary_exit
3031
- bls_to_execution_change
3132
- proposer_slashing
@@ -66,6 +67,11 @@ get:
6667
value: |
6768
event: attestation
6869
data: {"aggregation_bits":"0x01", "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505", "data":{"slot":"1", "index":"1", "beacon_block_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "source":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}, "target":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}}
70+
single_attestation:
71+
description: The node has received a SingleAttestation (from P2P or API) that passes validation rules of the `beacon_attestation_{subnet_id}` topic
72+
value: |
73+
event: single_attestation
74+
data: {"committee_index":"1", "attester_index": "1", "data":{"slot":"1", "index":"1", "beacon_block_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "source":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}, "target":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}
6975
voluntary_exit:
7076
description: The node has received a SignedVoluntaryExit (from P2P or API) that passes validation rules of `voluntary_exit` topic
7177
value: |

beacon-node-oapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ components:
413413
$ref: './types/electra/block.yaml#/Electra/SignedBlindedBeaconBlock'
414414
Electra.Attestation:
415415
$ref: './types/electra/attestation.yaml#/Electra/Attestation'
416+
Electra.SingleAttestation:
417+
$ref: './types/electra/attestation.yaml#/Electra/SingleAttestation'
416418
Electra.AttesterSlashing:
417419
$ref: './types/electra/attester_slashing.yaml#/Electra/AttesterSlashing'
418420
Electra.SignedAggregateAndProof:

types/electra/attestation.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,23 @@ Electra:
1616
$ref: '../primitive.yaml#/Signature'
1717
description: "The BLS signature of the `IndexedAttestation`, created by the validator of the attestation."
1818

19+
SingleAttestation:
20+
type: object
21+
description: "The [`SingleAttestation`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.9/specs/electra/beacon-chain.md#singleattestation) object from the CL spec."
22+
required: [committee_index, attester_index, data, signature]
23+
properties:
24+
committee_index:
25+
$ref: "../primitive.yaml#/Uint64"
26+
description: "The attestations committee index."
27+
attester_index:
28+
$ref: "../primitive.yaml#/Uint64"
29+
description: "The validator index that signed this attestation."
30+
data:
31+
$ref: '../attestation_data.yaml#/AttestationData'
32+
signature:
33+
$ref: '../primitive.yaml#/Signature'
34+
description: "BLS aggregate signature."
35+
1936
Attestation:
2037
type: object
2138
description: "The [`Attestation`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/beacon-chain.md#attestation) object from the CL spec."

0 commit comments

Comments
 (0)