diff --git a/apis/beacon/pool/attestations.v2.yaml b/apis/beacon/pool/attestations.v2.yaml index 4e6f48f3..2b816253 100644 --- a/apis/beacon/pool/attestations.v2.yaml +++ b/apis/beacon/pool/attestations.v2.yaml @@ -56,7 +56,7 @@ post: operationId: submitPoolAttestationsV2 summary: Submit Attestation objects to node description: | - Submits Attestation objects to the node. Each attestation in the request body is processed individually. + Submits SingleAttestation objects to the node. Each attestation in the request body is processed individually. If an attestation is validated successfully, the node MUST publish that attestation on the appropriate subnet. @@ -82,7 +82,7 @@ post: $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Attestation' - type: array items: - $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.Attestation' + $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.SingleAttestation' responses: "200": description: Attestations are stored in pool and broadcast on the appropriate subnet diff --git a/apis/eventstream/index.yaml b/apis/eventstream/index.yaml index 4116ce6f..825a9225 100644 --- a/apis/eventstream/index.yaml +++ b/apis/eventstream/index.yaml @@ -26,6 +26,7 @@ get: - block - block_gossip - attestation + - single_attestation - voluntary_exit - bls_to_execution_change - proposer_slashing @@ -66,6 +67,11 @@ get: value: | event: attestation 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"}}} + single_attestation: + description: The node has received a SingleAttestation (from P2P or API) that passes validation rules of the `beacon_attestation_{subnet_id}` topic + value: | + event: single_attestation + 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"} voluntary_exit: description: The node has received a SignedVoluntaryExit (from P2P or API) that passes validation rules of `voluntary_exit` topic value: | diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index 31a60561..f6959ce2 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -413,6 +413,8 @@ components: $ref: './types/electra/block.yaml#/Electra/SignedBlindedBeaconBlock' Electra.Attestation: $ref: './types/electra/attestation.yaml#/Electra/Attestation' + Electra.SingleAttestation: + $ref: './types/electra/attestation.yaml#/Electra/SingleAttestation' Electra.AttesterSlashing: $ref: './types/electra/attester_slashing.yaml#/Electra/AttesterSlashing' Electra.SignedAggregateAndProof: diff --git a/types/attestation.yaml b/types/attestation.yaml index d057f4f4..50711193 100644 --- a/types/attestation.yaml +++ b/types/attestation.yaml @@ -14,7 +14,6 @@ IndexedAttestation: signature: $ref: './primitive.yaml#/Signature' description: "The BLS signature of the `IndexedAttestation`, created by the validator of the attestation." - Attestation: type: object description: "The [`Attestation`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#attestation) object from the CL spec." diff --git a/types/electra/attestation.yaml b/types/electra/attestation.yaml index 60cd3bbb..94e32852 100644 --- a/types/electra/attestation.yaml +++ b/types/electra/attestation.yaml @@ -15,7 +15,22 @@ Electra: signature: $ref: '../primitive.yaml#/Signature' description: "The BLS signature of the `IndexedAttestation`, created by the validator of the attestation." - + SingleAttestation: + type: object + 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." + required: [committee_index, attester_index, data, signature] + properties: + committee_index: + $ref: "../primitive.yaml#/Uint64" + description: "The attestations committee index." + attester_index: + $ref: "../primitive.yaml#/Uint64" + description: "The validator index that signed this attestation." + data: + $ref: '../attestation_data.yaml#/AttestationData' + signature: + $ref: '../primitive.yaml#/Signature' + description: "BLS aggregate signature." Attestation: type: object 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."