diff --git a/CHANGES.md b/CHANGES.md index 7fa04728..e0191eef 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,7 +17,8 @@ There are likely to be descriptions etc outside of the list below, but new query | [#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 | | | | | | | [#472](https://github.com/ethereum/beacon-APIs/pull/472) `single_attestation EVENT` added | | | | | | - +| [#495](https://github.com/ethereum/beacon-APIs/pull/495) `GET /eth/v1/beacon/execution_payload/{block_id}` added (EIP-7732) | | | | | | +| [#495](https://github.com/ethereum/beacon-APIs/pull/495) `execution_payload EVENT` added (EIP-7732) | | | | | | The Following are no longer in the Standard API, removed since the latest version. diff --git a/apis/beacon/execution_payloads/execution_payload.yaml b/apis/beacon/execution_payloads/execution_payload.yaml new file mode 100644 index 00000000..ea5a7e4f --- /dev/null +++ b/apis/beacon/execution_payloads/execution_payload.yaml @@ -0,0 +1,63 @@ +get: + operationId: getExecutionPayload + summary: Get execution payload + description: | + Retrieves execution payload details for a given block id. + Depending on `Accept` header it can be returned either as json or as bytes serialized by SSZ. + tags: + - EIP-7732 + - Draft + parameters: + - name: block_id + in: path + required: true + $ref: '../../../beacon-node-oapi.yaml#/components/parameters/BlockId' + responses: + "200": + description: "Successful response" + headers: + Eth-Consensus-Version: + $ref: '../../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version' + required: false + content: + application/json: + schema: + title: GetExecutionPayloadResponse + type: object + required: [data] + properties: + version: + type: string + enum: [eip7732] + example: "eip7732" + execution_optimistic: + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" + finalized: + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized" + data: + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Eip7732.SignedExecutionPayloadEnvelope" + application/octet-stream: + schema: + description: "SSZ serialized execution payload bytes. Use Accept header to choose this response type" + "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: "Execution payload not found" + content: + application/json: + schema: + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" + example: + code: 404 + message: "Execution payload not found" + "406": + $ref: "../../../beacon-node-oapi.yaml#/components/responses/NotAcceptable" + "500": + $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError" diff --git a/apis/eventstream/index.yaml b/apis/eventstream/index.yaml index 825a9225..ac827af9 100644 --- a/apis/eventstream/index.yaml +++ b/apis/eventstream/index.yaml @@ -38,6 +38,8 @@ get: - light_client_optimistic_update - payload_attributes - blob_sidecar + # EIP-7732 + - execution_payload responses: "200": description: Opened SSE stream. @@ -152,6 +154,11 @@ get: value: | event: blob_sidecar data: {"block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "index": "1", "slot": "1", "kzg_commitment": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505", "versioned_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"} + execution_payload: + description: The node has received an execution payload (from P2P or API) that is successfully imported on the fork-choice `on_execution_payload` handler + value: | + event: execution_payload + data: {"slot":"10", "block_root":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "execution_block_hash" : "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "execution_optimistic": false} "400": description: "The topics supplied could not be parsed" content: diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index de9460b5..a6c07576 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -64,6 +64,10 @@ tags: [Checkout validator flow](./validator-flow.md) to learn how to use this api. - name: Rewards description: Endpoints to query rewards and penalties for validators. + - name: EIP-7732 + description: Set of endpoints specific to EIP-7732 (ePBS). + - name: Draft + description: Draft endpoints which are used for testing and prototyping. paths: @@ -111,6 +115,8 @@ paths: $ref: "./apis/beacon/blocks/attestations.v2.yaml" /eth/v1/beacon/blob_sidecars/{block_id}: $ref: "./apis/beacon/blob_sidecars/blob_sidecars.yaml" + /eth/v1/beacon/execution_payload/{block_id}: + $ref: "./apis/beacon/execution_payloads/execution_payload.yaml" /eth/v1/beacon/rewards/sync_committee/{block_id}: $ref: "./apis/beacon/rewards/sync_committee.yaml" /eth/v1/beacon/deposit_snapshot: @@ -425,6 +431,10 @@ components: $ref: './types/electra/light_client.yaml#/Electra/LightClientOptimisticUpdate' Electra.BlobSidecars: $ref: './types/electra/blob_sidecar.yaml#/Electra/BlobSidecars' + Eip7732.ExecutionPayloadEnvelope: + $ref: './types/eip7732/execution_payload_envelope.yaml#/ExecutionPayloadEnvelope' + Eip7732.SignedExecutionPayloadEnvelope: + $ref: './types/eip7732/execution_payload_envelope.yaml#/SignedExecutionPayloadEnvelope' Node: $ref: './types/fork_choice.yaml#/Node' ExtraData: diff --git a/types/eip7732/execution_payload_envelope.yaml b/types/eip7732/execution_payload_envelope.yaml new file mode 100644 index 00000000..84d9b20c --- /dev/null +++ b/types/eip7732/execution_payload_envelope.yaml @@ -0,0 +1,31 @@ +ExecutionPayloadEnvelope: + type: object + description: "The [`ExecutionPayloadEnvelope`](https://github.com/ethereum/consensus-specs/blob/dev/specs/_features/eip7732/beacon-chain.md#executionpayloadenvelope) object from the CL eip7732 spec." + required: [payload, execution_requests, builder_index, beacon_block_root, slot, blob_kzg_commitments, state_root] + properties: + payload: + $ref: '../deneb/execution_payload.yaml#/Deneb/ExecutionPayload' + execution_requests: + $ref: '../electra/execution_requests.yaml#/Electra/ExecutionRequests' + builder_index: + $ref: '../primitive.yaml#/Uint64' + beacon_block_root: + $ref: '../primitive.yaml#/Root' + slot: + $ref: '../primitive.yaml#/Uint64' + blob_kzg_commitments: + type: array + items: + $ref: '../primitive.yaml#/KZGCommitment' + state_root: + $ref: '../primitive.yaml#/Root' + +SignedExecutionPayloadEnvelope: + type: object + description: "The [`SignedExecutionPayloadEnvelope`](https://github.com/ethereum/consensus-specs/blob/dev/specs/_features/eip7732/beacon-chain.md#signedexecutionpayloadenvelope) object envelope from the CL eip7732 spec." + required: [message, signature] + properties: + message: + $ref: '#/ExecutionPayloadEnvelope' + signature: + $ref: '../primitive.yaml#/Signature' diff --git a/wordlist.txt b/wordlist.txt index bfb27ac7..5facd177 100644 --- a/wordlist.txt +++ b/wordlist.txt @@ -36,3 +36,5 @@ KZGProof KZGProofs KZGCommitmentInclusionProof LMD +eip7732 +ePBS