-
Notifications
You must be signed in to change notification settings - Fork 830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fjord: Add FastLZ compression into L1CostFunc #249
Fjord: Add FastLZ compression into L1CostFunc #249
Conversation
f600b2d
to
6f9c662
Compare
2cf18c7
to
e2139eb
Compare
5fdf668
to
3704c9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good. FlzCompressLen
is difficult to review in isolation, but the tests in the monorepo for it look good. Still looking into the differences with Brotli.
c8002af
to
ae09e9f
Compare
Co-authored-by: Michael de Hoog <[email protected]> Co-authored-by: Yukai Tu <[email protected]> Co-authored-by: Danyal Prout <[email protected]>
…e same hardfork block
Co-authored-by: Sebastian Stammler <[email protected]>
ae09e9f
to
f8b1629
Compare
Description
We found that the FastLZ algorithm is a pretty good estimate for the actual results we'd see from zlib compressing the batches we write to L1 (albeit with a different
scalar
as the compression ratios aren't quite as good). See https://github.com/roberto-bayardo/compression-analysis and this sheet.This PR introduces a
flzCompress
call into theDataGas
part of theL1CostFunc
. Companionoptimism
PR is here: ethereum-optimism/optimism#9618Tests
TODO
Additional context
The current naive L1Cost approach:
works pretty well on average, but penalizes very compressible txs (e.g.), and undercharges incompressible txs (e.g.). This change makes the
L1CostFunc
much fairer compared to real-world L1 costs.