Expand description
§op-alloy-flz
Tiny crate containing FastLZ compression length utilities.
Constants§
- L1_
COST_ FASTLZ_ COEF - https://github.com/ethereum-optimism/op-geth/blob/647c346e2bef36219cc7b47d76b1cb87e7ca29e4/core/types/rollup_cost.go#L79
- L1_
COST_ INTERCEPT - https://github.com/ethereum-optimism/op-geth/blob/647c346e2bef36219cc7b47d76b1cb87e7ca29e4/core/types/rollup_cost.go#L78
Inverted to be used with
saturating_sub. - MIN_
TX_ SIZE_ SCALED - https://github.com/ethereum-optimism/op-geth/blob/647c346e2bef36219cc7b47d76b1cb87e7ca29e4/core/types/rollup_cost.go#82
- NON_
ZERO_ BYTE_ COST - Cost per non-zero byte.
- ZERO_
BYTE_ COST - Cost per zero byte.
Functions§
- data_
gas_ fjord - Calculate the data gas for posting the transaction on L1.
- flz_
compress_ len - Returns the length of the data after compression through FastLZ.
- tx_
estimated_ size_ fjord - Calculate the estimated compressed transaction size in bytes, scaled by 1e6. This value is computed based on the following formula: max(minTransactionSize, intercept + fastlzCoef*fastlzSize)
- tx_
estimated_ size_ fjord_ bytes - Calculate the estimated compressed transaction size in bytes. This value is computed based on the following formula: max(minTransactionSize, intercept + fastlzCoef*fastlzSize) / 1e6