Skip to content
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

feat(contracts): change MAX_COMMIT_SCALAR and MAX_BLOB_SCALAR to 1e18 #1354

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions contracts/src/L2/predeploys/L1GasPriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ contract L1GasPriceOracle is OwnableBase, IL1GasPriceOracle {
/// ```
/// commit_scalar = commit_gas_per_tx * fluctuation_multiplier * 1e9
/// ```
/// So, the value should not exceed 10^18 * 1e9 normally.
uint256 private constant MAX_COMMIT_SCALAR = 10 ** 18 * PRECISION;
/// So, the value should not exceed 10^9 * 1e9 normally.
uint256 private constant MAX_COMMIT_SCALAR = 10 ** 9 * PRECISION;

/// @dev The maximum possible l1 blob fee scalar after Curie.
/// We derive the blob scalar by
/// ```
/// blob_scalar = fluctuation_multiplier / compression_ratio / blob_util_ratio * 1e9
/// ```
/// So, the value should not exceed 10^18 * 1e9 normally.
uint256 private constant MAX_BLOB_SCALAR = 10 ** 18 * PRECISION;
/// So, the value should not exceed 10^9 * 1e9 normally.
uint256 private constant MAX_BLOB_SCALAR = 10 ** 9 * PRECISION;

/*************
* Variables *
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/test/L1GasPriceOracle.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ contract L1GasPriceOracleTest is DSTestPlus {
uint256 private constant PRECISION = 1e9;
uint256 private constant MAX_OVERHEAD = 30000000 / 16;
uint256 private constant MAX_SCALAR = 1000 * PRECISION;
uint256 private constant MAX_COMMIT_SCALAR = 10 ** 18 * PRECISION;
uint256 private constant MAX_BLOB_SCALAR = 10 ** 18 * PRECISION;
uint256 private constant MAX_COMMIT_SCALAR = 10 ** 9 * PRECISION;
uint256 private constant MAX_BLOB_SCALAR = 10 ** 9 * PRECISION;

L1GasPriceOracle private oracle;
Whitelist private whitelist;
Expand Down
Loading