Commit f2bc0a79 authored by protolambda's avatar protolambda

specs: span-batches spec - fix lint and add explicit check of L1 origin of span-batch

parent 9b4b5c83
......@@ -150,9 +150,13 @@ Span-batch rules, in validation order:
- Rules:
- `start_epoch_num + sequence_window_size < inclusion_block_number` -> `drop`:
i.e. the batch must be included timely.
- `start_epoch_num > epoch.number + 1` -> `future`: i.e. the L1 origin may jump to the next L1 block, but not further.
- `end_epoch_num == epoch.number`:
- If `batch.l1_origin_check != epoch.hash[:20]` -> `drop`: verify the batch is intended for this L1 chain.
- `start_epoch_num > epoch.number + 1` -> `future`:
i.e. the L1 origin may jump to the next L1 block, but not further.
- If `end_epoch_num >= inclusion_block_number` -> `drop`:
if the end of the span is past the L1 block it was included in,
it cannot possibly reference the chain it was included in, and is thus non-canonical.
- If `batch.l1_origin_check` does not match the canonical L1 chain at `end_epoch_num` -> `drop`:
verify the batch is intended for this L1 chain.
- `start_epoch_num < epoch.number` -> `drop`: must have been duplicate batch,
we may be past this L1 block in the safe L2 chain. If a span-batch overlaps with older information,
it is dropped, since partially valid span-batches are not accepted.
......
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