engine: add Rest-SSZ spec#793
Conversation
|
One thing that I think would make sense would be to reuse the base structure of the beacon api (https://github.com/ethereum/beacon-APIs/) - this includes several things:
|
For top-up sync we also need "current block number", similar to |
|
I opened #773 a few weeks ago with a narrower scope: adding a single new endpoint ( Since #793 is now doing a full Engine API refactor with the same REST+SSZ foundation, I think the witness endpoint fits naturally into this design. A few thoughts: The witness endpoint should be added to this new spec. The existing two-call flow ( Suggested endpoint: Benchmark data (ethrex, 203 txs, 36 Mgas, ~502 MB SSZ witness):
Happy to close #773 in support of this PR I think it's a better, more seamless flow. Would love to discuss where the witness endpoint fits best in the new endpoint table. |
There have been multiple attempts at this already.
Moving away from JSON-RPC to REST-SSZ.
However most kept the engine api as is.
I think we have a good shot at refactoring the engine api with this change.
This Draft does that; the move and the refactoring.
Happy for any feedback I can get!
The core of the change is:
engine_newPayloadV{1..5}POST /{fork}/payloadsparentBeaconBlockRootandexecutionRequestsfolded into the SSZ envelope;expectedBlobVersionedHashesremoved;INVALID_BLOCK_HASHremoved from the status enumengine_forkchoiceUpdatedV{1..4}POST /{fork}/forkchoicepayload_attributes, and (Amsterdam+) optionalcustody_columnsengine_getPayloadV{1..6}GET /{fork}/payloads/{id}engine_getPayloadBodiesByHashV{1,2}POST /{fork}/bodies/hash{fork}selects the response schema (not the era of requested blocks);POSTbecause hash lists are too large for URLsengine_getPayloadBodiesByRangeV{1,2}GET /{fork}/bodies?from=...&count=...{fork}selects the response schemaengine_getBlobsV1POST /blobs/v1engine_getBlobsV2POST /blobs/v2engine_getBlobsV3POST /blobs/v3engine_getBlobsV4POST /blobs/v4engine_getClientVersionV1GET /identity+X-Engine-Client-Versionrequest headerengine_exchangeCapabilitiesGET /capabilitiesengine_exchangeTransitionConfigurationV1