Skip to content

Commit 0b8f939

Browse files
authored
Merge branch 'ethereum:main' into main
2 parents 0805683 + 4140e52 commit 0b8f939

31 files changed

+828
-462
lines changed

graphql.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -473,22 +473,6 @@
473473
"isDeprecated": false,
474474
"deprecationReason": null
475475
},
476-
{
477-
"name": "totalDifficulty",
478-
"description": "TotalDifficulty is the sum of all difficulty values up to and including\nthis block.",
479-
"args": [],
480-
"type": {
481-
"kind": "NON_NULL",
482-
"name": null,
483-
"ofType": {
484-
"kind": "SCALAR",
485-
"name": "BigInt",
486-
"ofType": null
487-
}
488-
},
489-
"isDeprecated": false,
490-
"deprecationReason": null
491-
},
492476
{
493477
"name": "ommerCount",
494478
"description": "OmmerCount is the number of ommers (AKA uncles) associated with this\nblock. If ommers are unavailable, this field will be null.",

schema.graphqls

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,6 @@ type Block {
122122
"""Difficulty is a measure of the difficulty of mining this block."""
123123
difficulty: BigInt!
124124

125-
"""
126-
TotalDifficulty is the sum of all difficulty values up to and including
127-
this block.
128-
"""
129-
totalDifficulty: BigInt!
130-
131125
"""
132126
OmmerCount is the number of ommers (AKA uncles) associated with this
133127
block. If ommers are unavailable, this field will be null.

src/debug/getters.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
receiptsRoot: '0xccd2d33763dc0ac3fe02d4ecbbcd7d2bdc6f57db635ba31007184679303721d7'
109109
miner: '0x0000000000000000000000000000000000000000'
110110
difficulty: '0x1'
111-
totalDifficulty: '0x1'
112111
extraData: '0x00000000000000000000000000000000000000000000000000000000000000008c6a091f07e4ba3930f2f5fabbfc5b1c70986319096760ba200a6abc0d30e33c2d501702d1b58d7f75807bdbf981044557628611319121170b96466ec06bb3fd01'
113112
size: '0x3a0'
114113
gasLimit: '0xffffffffffff'
@@ -145,7 +144,6 @@
145144
receiptsRoot: '0x2b5c77f6e7764d2468178fab7253346b9b8bb6a34b63946f6bdc2f5ad398bfc3'
146145
miner: '0x0000000000000000000000000000000000000000'
147146
difficulty: '0x2'
148-
totalDifficulty: '0x2'
149147
extraData: '0x00000000000000000000000000000000000000000000000000000000000000004d04551bdd9ae08af1fd661e49d4ab662c98c532c7ec0e4656a27e4de7d330af578ab1e4f5e49e085ff1d78673c7388ed9ccf017fbe89e53066bfa4018142c0701'
150148
size: '0x3a0'
151149
gasLimit: '0xffffffffffff'

src/engine/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The Engine JSON-RPC API is a collection of methods that all execution clients implement.
44
This interface allows the communication between consensus and execution layers of the two-component post-Merge Ethereum Client.
55

6-
This API is in *active development* and currently specified in markdown documents specified by fork scopes ([Paris](./paris.md), [Shanghai](./shanghai.md), [Cancun](./cancun.md)).
6+
This API is in *active development* and currently specified in markdown documents specified by fork scopes ([Paris](./paris.md), [Shanghai](./shanghai.md), [Cancun](./cancun.md), [Prague](./prague.md)).
77

88
## References
99
* [Engine API: A Visual Guide](https://hackmd.io/@danielrachi/engine_api)

src/engine/cancun.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This specification is based on and extends [Engine API - Shanghai](./shanghai.md
1212
- [Structures](#structures)
1313
- [ExecutionPayloadV3](#executionpayloadv3)
1414
- [BlobsBundleV1](#blobsbundlev1)
15+
- [BlobAndProofV1](#blobandproofv1)
1516
- [PayloadAttributesV3](#payloadattributesv3)
1617
- [Methods](#methods)
1718
- [engine_newPayloadV3](#engine_newpayloadv3)
@@ -26,7 +27,12 @@ This specification is based on and extends [Engine API - Shanghai](./shanghai.md
2627
- [Request](#request-2)
2728
- [Response](#response-2)
2829
- [Specification](#specification-2)
30+
- [engine_getBlobsV1](#engine_getblobsv1)
31+
- [Request](#request-3)
32+
- [Response](#response-3)
33+
- [Specification](#specification-3)
2934
- [Deprecate `engine_exchangeTransitionConfigurationV1`](#deprecate-engine_exchangetransitionconfigurationv1)
35+
- [Update the methods of previous forks](#update-the-methods-of-previous-forks)
3036

3137
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3238

@@ -64,6 +70,13 @@ The fields are encoded as follows:
6470

6571
All of the above three arrays **MUST** be of same length.
6672

73+
### BlobAndProofV1
74+
75+
The fields are encoded as follows:
76+
77+
- `blob`: `DATA` - `FIELD_ELEMENTS_PER_BLOB * BYTES_PER_FIELD_ELEMENT = 4096 * 32 = 131072` bytes (`DATA`) representing a SSZ-encoded `Blob` as defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844).
78+
- `proof`: `DATA` - `KZGProof` as defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844), 48 bytes (`DATA`).
79+
6780
### PayloadAttributesV3
6881

6982
This structure has the syntax of [`PayloadAttributesV2`](./shanghai.md#payloadattributesv2) and appends a single field: `parentBeaconBlockRoot`.
@@ -170,6 +183,36 @@ Refer to the specification for [`engine_getPayloadV2`](./shanghai.md#engine_getp
170183

171184
5. Client software **MAY** use any heuristics to decide whether to set `shouldOverrideBuilder` flag or not. If client software does not implement any heuristic this flag **SHOULD** be set to `false`.
172185

186+
### engine_getBlobsV1
187+
188+
Consensus layer clients **MAY** use this method to fetch blobs from the execution layer blob pool.
189+
190+
*Note*: This is a new optional method introduced after Cancun. It is defined here because it is backwards-compatible with Cancun.
191+
192+
#### Request
193+
194+
* method: `engine_getBlobsV1`
195+
* params:
196+
1. `Array of DATA`, 32 Bytes - Array of blob versioned hashes.
197+
* timeout: 1s
198+
199+
#### Response
200+
201+
* result: `Array of BlobAndProofV1` - Array of [`BlobAndProofV1`](#BlobAndProofV1), items of which may be `null`.
202+
* error: code and message set in case an error occurs during processing of the request.
203+
204+
#### Specification
205+
206+
1. Given an array of blob versioned hashes client software **MUST** respond with an array of `BlobAndProofV1` objects with matching versioned hashes, respecting the order of versioned hashes in the input array.
207+
208+
1. Client software **MUST** place responses in the order given in the request, using `null` for any missing blobs. For instance, if the request is `[A_versioned_hash, B_versioned_hash, C_versioned_hash]` and client software has data for blobs `A` and `C`, but doesn't have data for `B`, the response **MUST** be `[A, null, C]`.
209+
210+
1. Client software **MUST** support request sizes of at least 128 blob versioned hashes. The client **MUST** return `-38004: Too large request` error if the number of requested blobs is too large.
211+
212+
1. Client software **MAY** return an array of all `null` entries if syncing or otherwise unable to serve blob pool data.
213+
214+
1. Callers **MUST** consider that execution layer clients may prune old blobs from their pool, and will respond with `null` if a blob has been pruned.
215+
173216
### Deprecate `engine_exchangeTransitionConfigurationV1`
174217

175218
This document introduces deprecation of [`engine_exchangeTransitionConfigurationV1`](./paris.md#engine_exchangetransitionconfigurationv1). The deprecation is specified as follows:
@@ -192,4 +235,4 @@ For the following methods:
192235

193236
a validation **MUST** be added:
194237

195-
1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of payload or payloadAttributes greater or equal to the Cancun activation timestamp.
238+
1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of payload or payloadAttributes greater or equal to the Cancun activation timestamp.

src/engine/common.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Execution layer clients **MUST** support `engine_exchangeCapabilities` method, w
161161

162162
#### Specification
163163

164-
1. Consensus and execution layer client software **MAY** exchange with a list of currently supported Engine API methods. Execution layer client software **MUST NOT** log any error messages if this method has either never been called or haven't been called for a significant amount of time.
164+
1. Consensus and execution layer client software **MAY** exchange with a list of currently supported Engine API methods. Execution layer client software **MUST NOT** log any error messages if this method has either never been called or hasn't been called for a significant amount of time.
165165

166166
2. Request and response lists **MUST** contain Engine API methods that are currently supported by consensus and execution client software respectively. Name of each method in both lists **MUST** include suffixed version. Consider the following examples:
167167
* Client software of both layers currently supports `V1` and `V2` versions of `engine_newPayload` method:

src/engine/identification.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ This enum defines a standard for specifying a client with just two letters. Clie
3838
- `LS`: lodestar
3939
- `NM`: nethermind
4040
- `NB`: nimbus
41+
- `TE`: trin-execution
4142
- `TK`: teku
4243
- `PM`: prysm
4344
- `RH`: reth

src/engine/openrpc/methods/blob.yaml

Lines changed: 32 additions & 0 deletions
Large diffs are not rendered by default.

src/engine/openrpc/methods/payload.yaml

Lines changed: 23 additions & 190 deletions
Large diffs are not rendered by default.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
BlobAndProofV1:
2+
title: Blob and proof object V1
3+
type: object
4+
required:
5+
- blob
6+
- proof
7+
properties:
8+
blob:
9+
title: Blob
10+
$ref: '#/components/schemas/bytes'
11+
proof:
12+
title: proof
13+
$ref: '#/components/schemas/bytes48'
14+

0 commit comments

Comments
 (0)