Skip to content

Commit

Permalink
Merge branch 'master' into 404-no-sync-committee-contribution
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfyone authored Aug 13, 2024
2 parents 43aece4 + 0628244 commit 99e4a72
Show file tree
Hide file tree
Showing 24 changed files with 470 additions and 53 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ There are likely to be descriptions etc outside of the list below, but new query

| Endpoint | [Lighthouse](https://github.com/sigp/lighthouse) | [Lodestar](https://github.com/ChainSafe/lodestar) | [Nimbus](https://github.com/status-im/nimbus-eth2) | [Prysm](https://github.com/prysmaticlabs/prysm) | [Teku](https://github.com/ConsenSys/teku) |
|---------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|---------------------------------------------------|----------------------------------------------------|-------------------------------------------------|-------------------------------------------|
| [#447](https://github.com/ethereum/beacon-APIs/pull/447) `GET /eth/v2/validator/aggregate_attestation` added | | | | | |
| [#448](https://github.com/ethereum/beacon-APIs/pull/448) `GET /eth/v2/beacon/blocks/{block_id}/attestations` added | | | | | |
| [#448](https://github.com/ethereum/beacon-APIs/pull/448) `GET /eth/v2/beacon/pool/attestations` added | | | | | |
| [#448](https://github.com/ethereum/beacon-APIs/pull/448) `POST /eth/v2/beacon/pool/attestations` added | | | | | |
| [#448](https://github.com/ethereum/beacon-APIs/pull/448) `GET /eth/v2/beacon/pool/attester_slashings` added | | | | | |
| [#448](https://github.com/ethereum/beacon-APIs/pull/448) `POST /eth/v2/beacon/pool/attester_slashings` added | | | | | |
| [#456](https://github.com/ethereum/beacon-APIs/pull/456) `POST /eth/v2/validator/aggregate_and_proofs` added | | | | | |


The Following are no longer in the Standard API, removed since the latest version.
Expand Down
60 changes: 60 additions & 0 deletions apis/beacon/blocks/attestations.v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
get:
operationId: getBlockAttestationsV2
summary: Get block attestations
description: Retrieves attestation included in requested block.
tags:
- Beacon
parameters:
- name: block_id
in: path
required: true
$ref: '../../../beacon-node-oapi.yaml#/components/parameters/BlockId'
responses:
"200":
description: Success
headers:
Eth-Consensus-Version:
$ref: '../../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version'
content:
application/json:
schema:
title: GetBlockAttestationsV2Response
type: object
required: [version, execution_optimistic, finalized, data]
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "phase0"
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
finalized:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized"
data:
anyOf:
- type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Attestation'
- type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.Attestation'
"400":
description: "The block ID supplied could not be parsed"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block ID: current"
"404":
description: "Block not found"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "Block not found"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
1 change: 1 addition & 0 deletions apis/beacon/blocks/attestations.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
get:
operationId: getBlockAttestations
summary: Get block attestations
deprecated: true
description: Retrieves attestation included in requested block.
tags:
- Beacon
Expand Down
96 changes: 96 additions & 0 deletions apis/beacon/pool/attestations.v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
get:
operationId: getPoolAttestationsV2
summary: Get attestations from operations pool
description: Retrieves attestations known by the node but not necessarily incorporated into any block
parameters:
- name: slot
in: query
required: false
schema:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Uint64'
- name: committee_index
in: query
required: false
schema:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Uint64'
tags:
- Beacon
responses:
"200":
description: Successful response
headers:
Eth-Consensus-Version:
$ref: '../../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version'
content:
application/json:
schema:
title: GetPoolAttestationsV2Response
type: object
required: [version, data]
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "phase0"
data:
anyOf:
- type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Attestation'
- type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.Attestation'
"400":
description: "The slot or committee index could not be parsed"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid slot: current"
"500":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError'

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.
If an attestation is validated successfully, the node MUST publish that attestation on the appropriate subnet.
If one or more attestations fail validation, the node MUST return a 400 error with details of which attestations have failed, and why.
parameters:
- in: header
schema:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion'
required: true
name: Eth-Consensus-Version
description: "Version of the attestations being submitted."
tags:
- Beacon
- ValidatorRequiredApi
requestBody:
required: true
content:
application/json:
schema:
anyOf:
- type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Attestation'
- type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.Attestation'
responses:
"200":
description: Attestations are stored in pool and broadcast on the appropriate subnet
"400":
description: "Errors with one or more attestations"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/IndexedErrorMessage"
"500":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError'
2 changes: 2 additions & 0 deletions apis/beacon/pool/attestations.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
get:
operationId: getPoolAttestations
summary: Get Attestations from operations pool
deprecated: true
description: Retrieves attestations known by the node but not necessarily incorporated into any block
parameters:
- name: slot
Expand Down Expand Up @@ -44,6 +45,7 @@ get:
post:
operationId: submitPoolAttestations
summary: Submit Attestation objects to node
deprecated: true
description: |
Submits Attestation objects to the node. Each attestation in the request body is processed individually.
Expand Down
69 changes: 69 additions & 0 deletions apis/beacon/pool/attester_slashings.v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
get:
operationId: getPoolAttesterSlashingsV2
summary: Get attester slashings from operations pool
description: Retrieves attester slashings known by the node but not necessarily incorporated into any block
tags:
- Beacon
responses:
"200":
description: Successful response
headers:
Eth-Consensus-Version:
$ref: '../../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version'
content:
application/json:
schema:
title: GetPoolAttesterSlashingsV2Response
type: object
required: [version, data]
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "phase0"
data:
anyOf:
- type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/AttesterSlashing'
- type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.AttesterSlashing'
"500":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError'

post:
operationId: submitPoolAttesterSlashingsV2
summary: Submit AttesterSlashing object to node's pool
description: Submits AttesterSlashing object to node's pool. Upon successful validation the node MUST broadcast it to network.
parameters:
- in: header
schema:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion'
required: true
name: Eth-Consensus-Version
description: "Version of the attester slashing being submitted."
tags:
- Beacon
requestBody:
required: true
content:
application/json:
schema:
anyOf:
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/AttesterSlashing'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.AttesterSlashing'
responses:
"200":
description: Success
"400":
description: "Invalid attester slashing"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid attester slashing, it will never pass validation so it's rejected"
"500":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError'
2 changes: 2 additions & 0 deletions apis/beacon/pool/attester_slashings.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
get:
operationId: getPoolAttesterSlashings
summary: Get AttesterSlashings from operations pool
deprecated: true
description: Retrieves attester slashings known by the node but not necessarily incorporated into any block
tags:
- Beacon
Expand All @@ -24,6 +25,7 @@ get:
post:
operationId: submitPoolAttesterSlashings
summary: Submit AttesterSlashing object to node's pool
deprecated: true
description: Submits AttesterSlashing object to node's pool and if passes validation node MUST broadcast it to network.
tags:
- Beacon
Expand Down
7 changes: 5 additions & 2 deletions apis/beacon/states/validator_balances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ post:
description: |
Returns filterable list of validators balances.
Balances will be returned for all indices or public key that match known validators. If an index or public key does not
Balances will be returned for all indices or public keys that match known validators. If an index or public key does not
match any known validator, no balance will be returned but this will not cause an error. There are no guarantees for the
returned data in terms of ordering; the index is returned for each balance, and can be used to confirm for which inputs a
response has been returned.
Expand All @@ -90,7 +90,10 @@ post:
in: path
$ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId'
requestBody:
description: "An array of either hex encoded public key (any bytes48 with 0x prefix) or validator index"
description: |
An array of values, with each value either a hex encoded public key (any bytes48 with 0x prefix) or a validator index.
If the supplied list is empty (i.e. the body is `[]`) or no body is supplied then balances will be returned for all validators.
required: false
content:
application/json:
Expand Down
2 changes: 1 addition & 1 deletion apis/node/health.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ get:
"200":
description: Node is ready
"206":
description: Either the beacon node is syncing, or its execution node is optimistic, so data served may be incorrect
description: Either the beacon node is syncing, or its execution node is optimistic or offline, so data served may be incorrect
"400":
description: Invalid syncing status code
"503":
Expand Down
33 changes: 33 additions & 0 deletions apis/validator/aggregate_and_proofs.v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
post:
operationId: "publishAggregateAndProofsV2"
summary: "Publish multiple aggregate and proofs"
description: "Verifies given aggregate and proofs and publishes them on appropriate gossipsub topic."
tags:
- ValidatorRequiredApi
- Validator
parameters:
- in: header
schema:
$ref: '../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion'
required: true
name: Eth-Consensus-Version
description: "Version of the aggregate and proofs being submitted."
requestBody:
required: true
content:
application/json:
schema:
anyOf:
- type: array
items:
$ref: '../../beacon-node-oapi.yaml#/components/schemas/SignedAggregateAndProof'
- type: array
items:
$ref: '../../beacon-node-oapi.yaml#/components/schemas/Electra.SignedAggregateAndProof'
responses:
"200":
description: "Successful response"
"400":
$ref: '../../beacon-node-oapi.yaml#/components/responses/InvalidRequest'
"500":
$ref: '../../beacon-node-oapi.yaml#/components/responses/InternalError'
1 change: 1 addition & 0 deletions apis/validator/aggregate_and_proofs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
post:
operationId: "publishAggregateAndProofs"
summary: "Publish multiple aggregate and proofs"
deprecated: true
description: "Verifies given aggregate and proofs and publishes them on appropriate gossipsub topic."
tags:
- ValidatorRequiredApi
Expand Down
Loading

0 comments on commit 99e4a72

Please sign in to comment.