Commit 22137339 authored by Adrian Sutton's avatar Adrian Sutton

fix(spec): Add missing call to engine_newPayload

The process to create a new block via the engine API only returns the block and doesn't import it.
So an explicit call to engine_newPayload is required to import the payload before making it canonical.
The actual code performs this call, but it was missed in the spec description.
parent 6c6d142d
...@@ -710,6 +710,8 @@ enact the change, as linear rewinds of the tip of the chain may not be supported ...@@ -710,6 +710,8 @@ enact the change, as linear rewinds of the tip of the chain may not be supported
#### L1-sync: payload attributes processing #### L1-sync: payload attributes processing
[exec-engine-comm]: exec-engine.md#engine-api
If the safe and unsafe L2 heads are identical (whether because of failed consolidation or not), we send the L2 payload If the safe and unsafe L2 heads are identical (whether because of failed consolidation or not), we send the L2 payload
attributes to the execution engine to be constructed into a proper L2 block. attributes to the execution engine to be constructed into a proper L2 block.
This L2 block will then become both the new L2 safe and unsafe head. This L2 block will then become both the new L2 safe and unsafe head.
...@@ -728,6 +730,7 @@ The payload attributes are then processed with a sequence of: ...@@ -728,6 +730,7 @@ The payload attributes are then processed with a sequence of:
- `engine_forkchoiceUpdatedV1` with current forkchoice state of the stage, and the attributes to start block building. - `engine_forkchoiceUpdatedV1` with current forkchoice state of the stage, and the attributes to start block building.
- Non-deterministic sources, like the tx-pool, must be disabled to reconstruct the expected block. - Non-deterministic sources, like the tx-pool, must be disabled to reconstruct the expected block.
- `engine_getPayload` to retrieve the payload, by the payload-ID in the result of the previous step. - `engine_getPayload` to retrieve the payload, by the payload-ID in the result of the previous step.
- `engine_newPayload` to import the new payload into the execution engine.
- `engine_forkchoiceUpdatedV1` to make the new payload canonical, - `engine_forkchoiceUpdatedV1` to make the new payload canonical,
now with a change of both `safe` and `unsafe` fields to refer to the payload, and no payload attributes. now with a change of both `safe` and `unsafe` fields to refer to the payload, and no payload attributes.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment