Skip to content

Commit

Permalink
Merge branch 'master' into post_attestation_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
eserilev authored Oct 9, 2024
2 parents f2f7969 + e7f7d70 commit 997ddb7
Show file tree
Hide file tree
Showing 23 changed files with 491 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ There are likely to be descriptions etc outside of the list below, but new query
| [#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 | | | | | |
| [#452](https://github.com/ethereum/beacon-APIs/pull/452) `POST /eth/v1/beacon/states/{state_id}/validator_identities` added | | | | | |
| [#456](https://github.com/ethereum/beacon-APIs/pull/456) `POST /eth/v2/validator/aggregate_and_proofs` added | | | | | |


Expand Down
2 changes: 1 addition & 1 deletion apis/beacon/blob_sidecars/blob_sidecars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ get:
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella, deneb]
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "deneb"
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
Expand Down
3 changes: 2 additions & 1 deletion apis/beacon/blocks/blinded_block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ get:
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella, deneb]
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "phase0"
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
Expand All @@ -39,6 +39,7 @@ get:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Electra.SignedBlindedBeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use Accept header to choose this response type"
Expand Down
1 change: 1 addition & 0 deletions apis/beacon/blocks/blinded_blocks.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ post:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Electra.SignedBlindedBeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body."
Expand Down
1 change: 1 addition & 0 deletions apis/beacon/blocks/blinded_blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ post:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Electra.SignedBlindedBeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body."
Expand Down
3 changes: 2 additions & 1 deletion apis/beacon/blocks/block.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ get:
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella, deneb]
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "phase0"
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
Expand All @@ -39,6 +39,7 @@ get:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Electra.SignedBeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use Accept header to choose this response type"
Expand Down
1 change: 1 addition & 0 deletions apis/beacon/blocks/blocks.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ post:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlockContents"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Electra.SignedBlockContents"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body."
Expand Down
1 change: 1 addition & 0 deletions apis/beacon/blocks/blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ post:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlockContents"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Electra.SignedBlockContents"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body."
Expand Down
71 changes: 71 additions & 0 deletions apis/beacon/states/validator_identities.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
post:
operationId: "postStateValidatorIdentities"
summary: "Get validator identities from state"
description: |
Returns filterable list of validators identities.
Identities 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 identity will be returned but this will not cause an error. There are no guarantees for the
returned data in terms of ordering.
Depending on `Accept` header data can be returned either as JSON or as bytes serialized by SSZ.
tags:
- Beacon
parameters:
- name: state_id
in: path
$ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId'
requestBody:
description: "An array of values, with each value either a hex encoded public key (any bytes48 with 0x prefix) or a validator index."
required: false
content:
application/json:
schema:
type: array
uniqueItems: true
items:
description: "Either hex encoded public key (any bytes48 with 0x prefix) or validator index"
type: string
responses:
"200":
description: Success
content:
application/json:
schema:
title: PostStateValidatorIdentitiesResponse
type: object
required: [execution_optimistic, finalized, data]
properties:
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
finalized:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized"
data:
type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/ValidatorIdentityResponse'
application/octet-stream:
schema:
description: "SSZ serialized results. Use Accept header to choose this response type"
"400":
description: "Invalid state ID or malformed request"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid state ID: current"
"404":
description: "State not found"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "State not found"
"406":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/NotAcceptable"
"500":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError'
3 changes: 2 additions & 1 deletion apis/debug/state.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ get:
properties:
version:
type: string
enum: [ phase0, altair, bellatrix, capella, deneb ]
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "phase0"
execution_optimistic:
$ref: "../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
Expand All @@ -39,6 +39,7 @@ get:
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconState"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconState"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BeaconState"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Electra.BeaconState"
application/octet-stream:
schema:
description: "SSZ serialized state bytes. Use Accept header to choose this response type"
Expand Down
3 changes: 2 additions & 1 deletion apis/validator/blinded_block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ get:
properties:
version:
type: string
enum: [ phase0, altair, bellatrix, capella, deneb ]
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "bellatrix"
data:
anyOf:
Expand All @@ -58,6 +58,7 @@ get:
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BlindedBeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BlindedBeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlindedBeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Electra.BlindedBeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`."
Expand Down
3 changes: 2 additions & 1 deletion apis/validator/block.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ get:
properties:
version:
type: string
enum: [ phase0, altair, bellatrix, capella, deneb ]
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "phase0"
data:
anyOf:
Expand All @@ -55,6 +55,7 @@ get:
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlockContents"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Electra.BlockContents"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`."
Expand Down
13 changes: 7 additions & 6 deletions apis/validator/block.v3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,17 @@ get:
Servers must support the following values of the boost factor which encode common
preferences:
* `builder_boost_factor=0`: prefer the execution node payload unless an error makes it
* `builder_boost_factor=0`: prefer the local execution node payload unless an error makes it
unviable.
* `builder_boost_factor=100`: default profit maximization mode; choose whichever
* `builder_boost_factor=100`: profit maximization mode; choose whichever
payload pays more.
* `builder_boost_factor=2**64 - 1`: prefer the builder payload unless an error or
* `builder_boost_factor=2**64 - 1`: prefer the external builder payload unless an error or
beacon node health check makes it unviable.
Servers should use saturating arithmetic or another technique to ensure that large values of
the `builder_boost_factor` do not trigger overflows or errors. If this parameter is
provided and the beacon node is not configured with a builder then the beacon node MUST
respond with a full block, which the caller can choose to reject if it wishes. If this
parameter is **not** provided then it should be treated as having the default value of 100.
respond with a full block, which the caller can choose to reject if it wishes.
If the value is provided but out of range for a 64-bit unsigned integer, then an error
response with status code 400 MUST be returned.
schema:
Expand All @@ -90,7 +89,7 @@ get:
properties:
version:
type: string
enum: [ phase0, altair, bellatrix, capella, deneb ]
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "phase0"
execution_payload_blinded:
type: boolean
Expand All @@ -111,6 +110,8 @@ get:
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BlindedBeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlockContents"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlindedBeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Electra.BlockContents"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Electra.BlindedBeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block or blinded block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version` and block type in `Eth-Blinded-Payload`."
Expand Down
16 changes: 16 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ paths:
$ref: "./apis/beacon/states/validator.yaml"
/eth/v1/beacon/states/{state_id}/validator_balances:
$ref: "./apis/beacon/states/validator_balances.yaml"
/eth/v1/beacon/states/{state_id}/validator_identities:
$ref: "./apis/beacon/states/validator_identities.yaml"
/eth/v1/beacon/states/{state_id}/committees:
$ref: "./apis/beacon/states/committee.yaml"
/eth/v1/beacon/states/{state_id}/sync_committees:
Expand Down Expand Up @@ -239,6 +241,8 @@ components:
$ref: './types/api.yaml#/ValidatorResponse'
ValidatorBalanceResponse:
$ref: './types/api.yaml#/ValidatorBalanceResponse'
ValidatorIdentityResponse:
$ref: './types/api.yaml#/ValidatorIdentityResponse'
ValidatorStatus:
$ref: './types/api.yaml#/ValidatorStatus'
Committee:
Expand Down Expand Up @@ -395,6 +399,18 @@ components:
$ref: './types/primitive.yaml#/Blob'
Deneb.BlobSidecars:
$ref: './types/deneb/blob_sidecar.yaml#/Deneb/BlobSidecars'
Electra.BeaconState:
$ref: './types/electra/state.yaml#/Electra/BeaconState'
Electra.BlockContents:
$ref: './types/electra/block_contents.yaml#/Electra/BlockContents'
Electra.SignedBeaconBlock:
$ref: './types/electra/block.yaml#/Electra/SignedBeaconBlock'
Electra.SignedBlockContents:
$ref: './types/electra/block_contents.yaml#/Electra/SignedBlockContents'
Electra.BlindedBeaconBlock:
$ref: './types/electra/block.yaml#/Electra/BlindedBeaconBlock'
Electra.SignedBlindedBeaconBlock:
$ref: './types/electra/block.yaml#/Electra/SignedBlindedBeaconBlock'
Electra.Attestation:
$ref: './types/electra/attestation.yaml#/Electra/Attestation'
Electra.SingleAttestation:
Expand Down
14 changes: 14 additions & 0 deletions types/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ ValidatorBalanceResponse:
$ref: "./primitive.yaml#/Gwei"
description: "Current validator balance in gwei."

ValidatorIdentityResponse:
type: object
required: [index, pubkey, activation_epoch]
properties:
index:
$ref: './primitive.yaml#/Uint64'
description: "Index of validator in validator registry."
pubkey:
$ref: './primitive.yaml#/Pubkey'
description: "Public key of validator."
activation_epoch:
$ref: "./primitive.yaml#/Uint64"
description: "Epoch when validator activated. 'FAR_FUTURE_EPOCH' if not activated"

ValidatorStatus:
description: |
Possible statuses:
Expand Down
8 changes: 4 additions & 4 deletions types/deneb/block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Deneb:
$ref: './execution_payload.yaml#/Deneb/ExecutionPayload'

BeaconBlock:
description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#beaconblock) object from the CL Deneb spec."
description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/beacon-chain.md#beaconblock) object from the CL Deneb spec."
allOf:
- $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon'
- type: object
Expand All @@ -65,7 +65,7 @@ Deneb:

SignedBeaconBlock:
type: object
description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#signedbeaconblock) object envelope from the CL Deneb spec."
description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Deneb spec."
required: [message, signature]
properties:
message:
Expand All @@ -84,7 +84,7 @@ Deneb:
$ref: './execution_payload.yaml#/Deneb/ExecutionPayloadHeader'

BlindedBeaconBlock:
description: "A variant of the [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#beaconblock) object from the CL Deneb spec, which contains a `BlindedBeaconBlockBody` rather than a `BeaconBlockBody`."
description: "A variant of the [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/beacon-chain.md#beaconblock) object from the CL Deneb spec, which contains a `BlindedBeaconBlockBody` rather than a `BeaconBlockBody`."
allOf:
- $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon'
- type: object
Expand All @@ -95,7 +95,7 @@ Deneb:

SignedBlindedBeaconBlock:
type: object
description: "A variant of the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#signedbeaconblock) object envelope from the CL Deneb spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`."
description: "A variant of the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Deneb spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`."
required: [message, signature]
properties:
message:
Expand Down
Loading

0 comments on commit 997ddb7

Please sign in to comment.