Engine API changes introduced in Osaka.
This specification is based on and extends Engine API - Prague specification.
Table of Contents
The fields are encoded as follows:
commitments:Array of DATA- Array ofKZGCommitmentas defined in EIP-4844, 48 bytes each (DATA).proofs:Array of DATA- Array ofKZGProof(48 bytes each, type defined in EIP-4844, semantics defined in EIP-7594).blobs:Array of DATA- Array of blobs, each blob isFIELD_ELEMENTS_PER_BLOB * BYTES_PER_FIELD_ELEMENT = 4096 * 32 = 131072bytes (DATA) representing a SSZ-encodedBlobas defined in EIP-4844
blobs and commitments arrays MUST be of same length and proofs MUST contain exactly CELLS_PER_EXT_BLOB * len(blobs) cell proofs.
The fields are encoded as follows:
blob:DATA-FIELD_ELEMENTS_PER_BLOB * BYTES_PER_FIELD_ELEMENT = 4096 * 32 = 131072bytes (DATA) representing a SSZ-encodedBlobas defined in EIP-4844.proofs:Array of DATA- Array ofKZGProofas defined in EIP-4844, 48 bytes each (DATA).
proofs MUST contain exactly CELLS_PER_EXT_BLOB cell proofs.
This method is updated in a backward incompatible way. Instead of returning BlobBundleV1, it returns BlobsBundleV2.
- method:
engine_getPayloadV5 - params:
payloadId:DATA, 8 Bytes - Identifier of the payload build process
- timeout: 1s
- result:
objectexecutionPayload:ExecutionPayloadV3blockValue:QUANTITY, 256 Bits - The expected value to be received by thefeeRecipientin weiblobsBundle:BlobsBundleV2- Bundle with data corresponding to blob transactions included intoexecutionPayloadshouldOverrideBuilder:BOOLEAN- Suggestion from the execution layer to use thisexecutionPayloadinstead of an externally provided oneexecutionRequests:Array of DATA- Execution layer triggered requests obtained from theexecutionPayloadtransaction execution.
- error: code and message set in case an exception happens while getting the payload.
This method follows the same specification as engine_getPayloadV4 with changes of the following:
-
Client software MUST return
-38005: Unsupported forkerror if thetimestampof the built payload does not fall within the time frame of the Osaka fork. -
The call MUST return
BlobsBundleV2with emptyblobs,commitmentsandproofsif the payload doesn't contain any blob transactions. -
The call MUST return
blobsandproofsthat match thecommitmentslist, i.e.assert len(blobsBundle.commitments) == len(blobsBundle.blobs)andassert len(blobsBundle.proofs) == len(blobsBundle.blobs) * CELLS_PER_EXT_BLOBandassert verify_cell_kzg_proof_batch(commitments, cell_indices, cells, blobsBundle.proofs)(see EIP-7594 consensus-specs)commitmentsshould list each commitmentCELLS_PER_EXT_BLOBtimes, repeating it for every cell. In python,[blobsBundle.commitments[i] for i in range(len(blobsBundle.blobs)) for _ in range(CELLS_PER_EXT_BLOB)]cell_indicesshould be[0, ..., CELLS_PER_EXT_BLOB, 0, ..., CELLS_PER_EXT_BLOB, ...]. In python,list(range(CELLS_PER_EXT_BLOB)) * len(blobsBundle.blobs)cellsis the list of cells for an extended blob. In python,[cell for blob in blobsBundle.blobs for cell in compute_cells(blob)](see compute_cells in consensus-specs)- All of the inputs to
verify_cell_kzg_proof_batchhave the same length,CELLS_PER_EXT_BLOB * len(blobsBundle.blobs)
Consensus layer clients MAY use this method to fetch blobs from the execution layer blob pool.
- method:
engine_getBlobsV2 - params:
Array of DATA, 32 Bytes - Array of blob versioned hashes.
- timeout: 1s
- result:
Array of BlobAndProofV2- Array ofBlobAndProofV2ornullin case of any missing blobs. - error: code and message set in case an error occurs during processing of the request.
Refer to the specification for engine_getBlobsV1 with changes of the following:
- Given an array of blob versioned hashes client software MUST respond with an array of
BlobAndProofV2objects with matching versioned hashes, respecting the order of versioned hashes in the input array. - Client software MUST return
nullin case of any missing or older version blobs. For instance,- if the request is
[A_versioned_hash, B_versioned_hash, C_versioned_hash]and client software has data for blobsAandC, but doesn't have data forB, the response MUST benull. - if the request is
[A_versioned_hash_for_blob_with_blob_proof], the response MUST benullas well.
- if the request is
- Client software MUST support request sizes of at least 128 blob versioned hashes. The client MUST return
-38004: Too large requesterror if the number of requested blobs is too large. - Client software MUST return
nullif syncing or otherwise unable to serve blob pool data. - Callers MUST consider that execution layer clients may prune old blobs from their pool, and will respond with
nullif a blob has been pruned.
Consensus layer clients MAY use this method to fetch blobs from the execution layer blob pool, with support for partial responses. For an all-or-nothing query style, refer to engine_getBlobsV2.
- method:
engine_getBlobsV3 - params:
Array of DATA, 32 Bytes - Array of blob versioned hashes.
- timeout: 1s
- result:
Array of BlobAndProofV2- Array ofBlobAndProofV2, insertingnullonly at the positions of the missing blobs, or anullliteral in the designated cases specified below. - error: code and message set in case an error occurs during processing of the request.
To assist the reader, we highlight differences against
engine_getBlobsV2using italic.
- Given an array of blob versioned hashes client software MUST respond with an array of
BlobAndProofV2objects with matching versioned hashes, respecting the order of versioned hashes in the input array. - Given an array of blob versioned hashes, if client software has every one of the requested blobs, it MUST return an array of
BlobAndProofV2objects whose order exactly matches the input array. For instance, if the request is[A_versioned_hash, B_versioned_hash, C_versioned_hash]and client software hasA,BandCavailable, the response MUST be[A, B, C]. - If one or more of the requested blobs are unavailable, the client MUST return an array of the same length and order, inserting
nullonly at the positions of the missing blobs. For instance, if the request is[A_versioned_hash, B_versioned_hash, C_versioned_hash]and client software has data for blobsAandC, but doesn't have data forB, the response MUST be[A, null, C]. If all blobs are missing, the client software must return an array of matching length, filled withnullat all positions. - Client software MUST support request sizes of at least 128 blob versioned hashes. The client MUST return
-38004: Too large requesterror if the number of requested blobs is too large. - Client software MUST return
nullif syncing or otherwise unable to generally serve blob pool data. - Callers MUST consider that execution layer clients may prune old blobs from their pool, and will respond with
nullat the corresponding position if a blob has been pruned.
This section defines how Osaka payload should be handled by the 'Cancun API'.
For the following methods:
a validation MUST be added:
- Client software MUST return
-38005: Unsupported forkerror if the Osaka fork has been activated.
This section defines how Osaka payload should be handled by the 'Prague API'.
For the following methods:
a validation MUST be added:
- Client software MUST return
-38005: Unsupported forkerror if thetimestampof payload is greater than or equal to the Osaka activation timestamp.