Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit f88f952

Browse files
committed
specs/exec-engine: clarify sync section, refer to rollup node spec
1 parent c69be9d commit f88f952

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

specs/exec-engine.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ as the engine implementation can sync state faster through methods like [snap-sy
119119

120120
### Happy-path sync
121121

122-
1. Engine API informs engine of chain head, unconditionally (part of regular node operation):
122+
1. The rollup node informs the engine of the L2 chain head, unconditionally (part of regular node operation):
123123
- [`engine_executePayloadV1`][engine_executePayloadV1] is called with latest L2 block derived from L1.
124124
- [`engine_forkchoiceUpdatedV1`][engine_forkchoiceUpdatedV1] is called with the current
125125
`unsafe`/`safe`/`finalized` L2 block hashes.
126-
2. Engine requests headers from peers, in reverse till the parent hash matches the local chain
127-
3. Engine catches up:
126+
2. The engine requests headers from peers, in reverse till the parent hash matches the local chain
127+
3. The engine catches up:
128128
a) A form of state sync is activated towards the finalized or head block hash
129129
b) A form of block sync pulls block bodies and processes towards head block hash
130130

@@ -134,17 +134,12 @@ the operation within the engine is the exact same as with L1 (although with an E
134134
### Worst-case sync
135135

136136
1. Engine is out of sync, not peered and/or stalled due other reasons.
137-
2. rollup node periodically fetches latest head from engine (`eth_getBlockByNumber`)
138-
3. rollup node activates sync if the engine is out of sync but not syncing through P2P (`eth_syncing`)
139-
4. rollup node inserts blocks, derived from L1, one by one,
140-
starting from the engine head (or genesis block if unrecognized) up to the latest chain head.
141-
(`engine_forkchoiceUpdatedV1`, `engine_executePayloadV1`)
137+
2. The rollup node maintains latest head from engine (poll `eth_getBlockByNumber` and/or maintain a header subscription)
138+
3. The rollup node activates sync if the engine is out of sync but not syncing through P2P (`eth_syncing`)
139+
4. The rollup node inserts blocks, derived from L1, one by one, potentially adapting to L1 reorg(s),
140+
as outlined in the [rollup node spec] (`engine_forkchoiceUpdatedV1`, `engine_executePayloadV1`)
142141

143-
See [rollup node sync spec][rollup-node-sync] for L1-based block syncing specification.
144-
145-
> **TODO**: rollup node block-by-block sync (covered in rollup node PR #43)
146-
147-
[rollup-node-sync]: ./rollup-node.md#sync
142+
[rollup node spec]: rollup-node.md
148143

149144
[eip-2718]: https://eips.ethereum.org/EIPS/eip-2718
150145
[eip-2718-transactions]: https://eips.ethereum.org/EIPS/eip-2718#transactions

0 commit comments

Comments
 (0)