About the compression ratio of channel using zlib #9879
zhiqiangxu
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
L1 Data Fee
before and after ecotone upgrade is0.684 * L1 Base Fee * [ Calldata + 188 ]
and[Calldata] * [0.001368 * L1 Base Fee + 0.810949 * L1 Blob Base Fee / 16]
, the0.684
(L1 Fee Scalar
) and0.810949
(Blob Base Fee Scalar
) accounts for the efficiency gains from data compression.To keep things simple, let's only discuss about the case before ecotone upgrade, that is:
0.684 * L1 Base Fee * [ Calldata + 188 ]
.I made an experiment to actually test the compression ratio, the repo is here.
To run it is simple:
(The related code snippet is here)
The output is:
The above output shows that after
84
L2 blocks are added to the channel, it's full and the compressed bytes is99993
, while the uncompressed bytes is109457
.So the actual compression ratio is only
0.91353685
, which is much less compared with0.684
.So it seems OP is charging less
L1 Data Fee
than actual cost to post transactions on L1.Who's paying the extra gas cost ?
Beta Was this translation helpful? Give feedback.
All reactions