-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 #9053
Conversation
WalkthroughThe Ethereum network has seen updates to its gas price oracle and compression utilities to improve efficiency and accommodate network upgrades. A test for the gas price oracle ensures its proper function, while the oracle itself now accounts for new network chains, Fjord and Ecotone. Compression techniques are refined in the Solidity library to optimize gas usage. Lastly, a new cost calculation method using FastLZ compression is introduced for L1 transactions, signifying a shift in fee structures following the Fjord upgrade. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #9053 +/- ##
===========================================
+ Coverage 19.38% 24.50% +5.12%
===========================================
Files 151 104 -47
Lines 5912 3750 -2162
Branches 1271 541 -730
===========================================
- Hits 1146 919 -227
+ Misses 4691 2785 -1906
+ Partials 75 46 -29
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Would super appreciate thorough specs with reasoning before any implementation is merged |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
fefdb39
to
d64c3fa
Compare
d64c3fa
to
4bd3fb2
Compare
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Closing in favor of #9618, which uses a different base branch |
Reopening #8635, targeting Fjord rather than Ecotone.
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 theGasPriceOracle
. Companion op-geth PR is here: ethereum-optimism/op-geth#202See specs update here: ethereum-optimism/specs#25
Tests
Added tests comparing compression results from solidity + golang.
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.