This repository has been archived by the owner on May 26, 2023. It is now read-only.
obront - Batch validation logic is ordered differently to specification #283
Labels
Reward
A payout will be made for this issue
Specification
An issue related to the specification (low severity)
obront
low
Batch validation logic is ordered differently to specification
Summary
Optimism L2 block derivation has a long list of validation steps performed on incoming blocks. They are described in the spec page, but the code implements the validations in a different order than the spec lays out.
Vulnerability Detail
There is an error in the order which is described in the spec versus the one in the implementation.
According to the specs, the following check comes first:
After it comes this check:
However, in code in
batches.go
executes in reverse:In practice this should not lead to any issues because both are drop rules and are right next to each other.
Impact
The code does not align with the ordering laid out in the specification.
Code Snippet
https://github.com/ethereum-optimism/optimism/blob/407f97b9d13448b766624995ec824d3059d4d4f6/op-node/rollup/derive/batches.go#L98
Tool used
Manual Review
Recommendation
Change the code so that it is in line with the specification.
The text was updated successfully, but these errors were encountered: