@@ -9,9 +9,8 @@ This specification is based on and extends [Engine API - Amsterdam](./amsterdam.
99> ** Status:** Design proposal. This document is offered as an alternative to
1010> introducing dedicated ` *WithWitness ` methods (cf. issue
1111> [ #741 ] ( https://github.com/ethereum/execution-apis/issues/741 ) and PR
12- > [ #773 ] ( https://github.com/ethereum/execution-apis/pull/773 ) ). It is intended to
13- > be evaluated by the EIP-8025 author team and Engine API maintainers prior to
14- > merging.
12+ > [ #773 ] ( https://github.com/ethereum/execution-apis/pull/773 ) ). It is
13+ > intended to be evaluated by Engine API maintainers prior to merging.
1514
1615## Table of contents
1716
@@ -27,19 +26,17 @@ This specification is based on and extends [Engine API - Amsterdam](./amsterdam.
2726 - [ engine_newPayloadV6] ( #engine_newpayloadv6 )
2827 - [ engine_getPayloadV7] ( #engine_getpayloadv7 )
2928 - [ engine_forkchoiceUpdatedV5] ( #engine_forkchoiceupdatedv5 )
30- - [ Errors] ( #errors )
3129- [ Rationale] ( #rationale )
3230- [ Capabilities and feature gating] ( #capabilities-and-feature-gating )
3331
3432<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3533
3634## Motivation
3735
38- Stateless validation flows (e.g. EIP-8025 Optional Execution Proofs) require the
39- consensus layer (CL) — or a prover acting on its behalf — to obtain the
40- ** execution witness** for a block: the set of state and bytecode accesses
41- produced during execution. Two paths exist for the witness to leave the
42- execution layer (EL):
36+ Stateless validation flows require the consensus layer (CL) — or a prover
37+ acting on its behalf — to obtain the ** execution witness** for a block:
38+ the set of state and bytecode accesses produced during execution. Two
39+ paths exist for the witness to leave the execution layer (EL):
4340
44411 . ** The CL receives an inbound payload over gossip.** The CL forwards it to the
4542 EL via ` engine_newPayload* ` , and wants the EL to attach the witness to the
@@ -64,19 +61,18 @@ added.
6461
6562### ExecutionWitnessV1
6663
67- The execution witness collected by the EL during block execution. Its
68- serialised form is a byte string; the binary encoding (SSZ container, RLP
69- encoding, or other) is defined in the consensus-side companion specification
70- and is out of scope for this document .
64+ ` DATA ` - Variable-length bytes representing an SSZ-encoded
65+ ` ExecutionWitness ` container. The container schema is defined by an
66+ accompanying consensus-specs document and is out of scope for this
67+ specification .
7168
72- The fields are encoded as follows:
73-
74- - ` data ` : ` DATA ` - Variable-length serialised execution witness.
75- - ` format ` : ` String ` - Identifier of the witness encoding format. One of:
76- - ` "ssz" ` - SSZ-encoded ` ExecutionWitness ` container as defined in the
77- consensus-specs companion to EIP-8025.
78- - ` "rlp" ` - RLP-encoded witness format used by current pre-merge witness
79- tooling (e.g. Geth's ` debug_executionWitness ` ).
69+ This follows the same on-wire convention used elsewhere in the Engine API
70+ for SSZ payloads (cf. the ` blob ` field in [ ` BlobV1 ` ] ( ./cancun.md ) ): a
71+ JSON-RPC ` DATA ` value whose underlying bytes are SSZ-encoded according to
72+ a consensus-specs definition. The encoding is fixed by this specification,
73+ so no format tag is required; on SSZ-REST transports (cf.
74+ [ PR #764 ] ( https://github.com/ethereum/execution-apis/pull/764 ) ) the same
75+ bytes are carried directly without hex wrapping.
8076
8177### PayloadStatusV2
8278
@@ -89,9 +85,10 @@ and appends a single optional field: `executionWitness`.
8985 block in the branch defined by payload and its ancestors.
9086- ` validationError ` : ` String|null ` - A message providing additional details on
9187 the validation error if the payload is classified as ` INVALID ` .
92- - ` executionWitness ` : ` Object|null ` - An [ ` ExecutionWitnessV1 ` ] ( #executionwitnessv1 )
93- object, present ** only if** ` requestWitness ` was set to ` true ` in the
94- associated request ** and** ` status ` is ` VALID ` . ` null ` in all other cases.
88+ - ` executionWitness ` : [ ` ExecutionWitnessV1 ` ] ( #executionwitnessv1 ) ` |null ` -
89+ SSZ-encoded execution witness. Present ** only if** ` requestWitness ` was
90+ set to ` true ` in the associated request ** and** ` status ` is ` VALID ` .
91+ ` null ` in all other cases.
9592
9693### PayloadAttributesV5
9794
@@ -154,10 +151,8 @@ additions:
154151 ` result.executionWitness ` to ` null ` and ** MUST NOT** perform additional work
155152 to collect the witness on the critical path.
156153
157- 4 . Witness collection ** MUST NOT** alter the validation outcome. A failure to
158- collect or serialise the witness while ` requestWitness ` is ` true ` and the
159- payload otherwise validates ** MUST** return error code `-38007: Witness
160- unavailable` with the validation outcome unchanged on the EL.
154+ 4 . Witness collection ** MUST NOT** affect the validation outcome reported
155+ in ` result.status ` .
161156
1621575 . Clients that have not advertised the ` engine_newPayloadV6 ` capability via
163158 capabilities exchange ** MUST** continue to be addressed via
@@ -185,9 +180,10 @@ with `payloadAttributes.requestWitness = true`.
185180 - ` blobsBundle ` : [ ` BlobsBundleV2 ` ] ( ./osaka.md#blobsbundlev2 ) - Bundle with data corresponding to blob transactions included into ` executionPayload `
186181 - ` shouldOverrideBuilder ` : ` BOOLEAN ` - Suggestion from the execution layer to use this ` executionPayload ` instead of an externally provided one
187182 - ` executionRequests ` : ` Array of DATA ` - Execution layer triggered requests obtained from the ` executionPayload ` transaction execution.
188- - ` executionWitness ` : ` Object|null ` - An [ ` ExecutionWitnessV1 ` ] ( #executionwitnessv1 )
189- object, present ** only if** the originating ` engine_forkchoiceUpdatedV5 `
190- call set ` payloadAttributes.requestWitness = true ` . ` null ` otherwise.
183+ - ` executionWitness ` : [ ` ExecutionWitnessV1 ` ] ( #executionwitnessv1 ) ` |null ` -
184+ SSZ-encoded execution witness. Present ** only if** the originating
185+ ` engine_forkchoiceUpdatedV5 ` call set
186+ ` payloadAttributes.requestWitness = true ` . ` null ` otherwise.
191187* error: code and message set in case an exception happens while getting the payload.
192188
193189#### Specification
@@ -205,12 +201,6 @@ additions:
205201 (or omitted), the EL ** MUST** set ` result.executionWitness ` to ` null ` and
206202 ** MUST NOT** perform additional work to collect the witness retroactively.
207203
208- 3 . If the EL was unable to collect or serialise the witness while
209- ` requestWitness ` was ` true ` , the EL ** MUST** return error code `-38007:
210- Witness unavailable`. The CL ** MAY** retry retrieval via
211- [ ` engine_newPayloadV6 ` ] ( #engine_newpayloadv6 ) with ` requestWitness = true `
212- on the produced payload.
213-
214204### engine_forkchoiceUpdatedV5
215205
216206This method extends [ ` engine_forkchoiceUpdatedV4 ` ] ( ./amsterdam.md#engine_forkchoiceupdatedv4 )
@@ -249,14 +239,6 @@ the following changes:
249239 ** MUST NOT** perform additional work to collect the witness for this build
250240 job.
251241
252- ## Errors
253-
254- This document introduces one new error code:
255-
256- | Code | Message | Meaning |
257- | --------| ----------------------| --------------------------------------------------------------------------|
258- | -38007 | Witness unavailable | The EL was unable to collect or serialise the requested execution witness. |
259-
260242## Rationale
261243
262244### Why a flag, not a parallel method
@@ -333,6 +315,7 @@ prior capability confirmation from the EL. ELs that do not yet support
333315witness retrieval continue to be addressed via the V5 / V4 / V6 predecessors
334316unmodified.
335317
336- EIP-8025 activation is independent of this capability: an EL may advertise
337- witness-retrieval support across all post-Amsterdam blocks regardless of
338- EIP-8025 fork status, since the flag is opt-in per call.
318+ Witness-retrieval support is independent of any specific fork activation:
319+ once advertised, an EL may serve witnesses for any post-Amsterdam block
320+ the CL requests them for. Because the flag is opt-in per call, the EL
321+ incurs witness-collection cost only when a CL asks for it.
0 commit comments