This bounty is no longer available
Web3 DAO | Optimism Logo

Use readers when encoding & decoding binary data

Organization

Optimism

Deadline

N/A

Status

ENDED


INSTRUCTIONS

In several places, we use offsets & manual indexing to parse binary data. These should be migrated to a reader based API.

One example: https://github.com/ethereum-optimism/optimism/blob/694f3ea0bccacf46464d19b05b1aac31a1fdd7a7/op-node/rollup/derive/l1_block_info.go#L48-L111

Example of this migration in another location: https://github.com/ethereum-optimism/optimism/pull/4720

Search string: repo:ethereum-optimism/optimism offset += language:Go path:/^op-node\//. Can do one or all. Either is fine.