Commit f51a572e authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #5279 from ethereum-optimism/fix/delete-dead-code

contracts-bedrock: delete dead SystemConfig code
parents 91f81d99 34d0f8d1
This diff is collapsed.
This diff is collapsed.
...@@ -418,7 +418,7 @@ SequencerFeeVault_Test:test_withdraw_succeeds() (gas: 163228) ...@@ -418,7 +418,7 @@ SequencerFeeVault_Test:test_withdraw_succeeds() (gas: 163228)
SetPrevBaseFee_Test:test_setPrevBaseFee_succeeds() (gas: 11515) SetPrevBaseFee_Test:test_setPrevBaseFee_succeeds() (gas: 11515)
StandardBridge_Stateless_Test:test_isCorrectTokenPair_succeeds() (gas: 49936) StandardBridge_Stateless_Test:test_isCorrectTokenPair_succeeds() (gas: 49936)
StandardBridge_Stateless_Test:test_isOptimismMintableERC20_succeeds() (gas: 33072) StandardBridge_Stateless_Test:test_isOptimismMintableERC20_succeeds() (gas: 33072)
SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 148858) SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 148848)
SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 10546) SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 10546)
SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 10622) SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 10622)
SystemConfig_Setters_TestFail:test_setGasLimit_notOwner_reverts() (gas: 10615) SystemConfig_Setters_TestFail:test_setGasLimit_notOwner_reverts() (gas: 10615)
...@@ -427,6 +427,6 @@ SystemConfig_Setters_TestFail:test_setResourceConfig_badPrecision_reverts() (gas ...@@ -427,6 +427,6 @@ SystemConfig_Setters_TestFail:test_setResourceConfig_badPrecision_reverts() (gas
SystemConfig_Setters_TestFail:test_setResourceConfig_lowGasLimit_reverts() (gas: 16082) SystemConfig_Setters_TestFail:test_setResourceConfig_lowGasLimit_reverts() (gas: 16082)
SystemConfig_Setters_TestFail:test_setResourceConfig_notOwner_reverts() (gas: 11790) SystemConfig_Setters_TestFail:test_setResourceConfig_notOwner_reverts() (gas: 11790)
SystemConfig_Setters_TestFail:test_setResourceConfig_zeroDenominator_reverts() (gas: 13039) SystemConfig_Setters_TestFail:test_setResourceConfig_zeroDenominator_reverts() (gas: 13039)
SystemConfig_Setters_TestFail:test_setUnsafeBlockSigner_notOwner_reverts() (gas: 10639) SystemConfig_Setters_TestFail:test_setUnsafeBlockSigner_notOwner_reverts() (gas: 10616)
TransferOnionTest:test_constructor_succeeds() (gas: 564855) TransferOnionTest:test_constructor_succeeds() (gas: 564855)
TransferOnionTest:test_unwrap_succeeds() (gas: 724958) TransferOnionTest:test_unwrap_succeeds() (gas: 724958)
\ No newline at end of file
...@@ -42,13 +42,6 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -42,13 +42,6 @@ contract SystemConfig is OwnableUpgradeable, Semver {
*/ */
bytes32 public constant UNSAFE_BLOCK_SIGNER_SLOT = keccak256("systemconfig.unsafeblocksigner"); bytes32 public constant UNSAFE_BLOCK_SIGNER_SLOT = keccak256("systemconfig.unsafeblocksigner");
/**
* @notice Minimum gas limit. This should not be lower than the maximum deposit gas resource
* limit in the ResourceMetering contract used by OptimismPortal, to ensure the L2
* block always has sufficient gas to process deposits.
*/
uint64 public constant MINIMUM_GAS_LIMIT = 8_000_000;
/** /**
* @notice Fixed L2 gas overhead. Used as part of the L2 fee calculation. * @notice Fixed L2 gas overhead. Used as part of the L2 fee calculation.
*/ */
...@@ -87,7 +80,7 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -87,7 +80,7 @@ contract SystemConfig is OwnableUpgradeable, Semver {
event ConfigUpdate(uint256 indexed version, UpdateType indexed updateType, bytes data); event ConfigUpdate(uint256 indexed version, UpdateType indexed updateType, bytes data);
/** /**
* @custom:semver 1.1.0 * @custom:semver 1.2.0
* *
* @param _owner Initial owner of the contract. * @param _owner Initial owner of the contract.
* @param _overhead Initial overhead value. * @param _overhead Initial overhead value.
...@@ -105,7 +98,7 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -105,7 +98,7 @@ contract SystemConfig is OwnableUpgradeable, Semver {
uint64 _gasLimit, uint64 _gasLimit,
address _unsafeBlockSigner, address _unsafeBlockSigner,
ResourceMetering.ResourceConfig memory _config ResourceMetering.ResourceConfig memory _config
) Semver(1, 1, 0) { ) Semver(1, 2, 0) {
initialize({ initialize({
_owner: _owner, _owner: _owner,
_overhead: _overhead, _overhead: _overhead,
......
...@@ -176,7 +176,7 @@ contract SystemConfig_Setters_Test is SystemConfig_Init { ...@@ -176,7 +176,7 @@ contract SystemConfig_Setters_Test is SystemConfig_Init {
} }
function testFuzz_setGasLimit_succeeds(uint64 newGasLimit) external { function testFuzz_setGasLimit_succeeds(uint64 newGasLimit) external {
uint64 minimumGasLimit = sysConf.MINIMUM_GAS_LIMIT(); uint64 minimumGasLimit = sysConf.minimumGasLimit();
newGasLimit = uint64( newGasLimit = uint64(
bound(uint256(newGasLimit), uint256(minimumGasLimit), uint256(type(uint64).max)) bound(uint256(newGasLimit), uint256(minimumGasLimit), uint256(type(uint64).max))
); );
......
...@@ -42,6 +42,6 @@ contract SystemConfig_GasLimitLowerBound_Invariant is Test { ...@@ -42,6 +42,6 @@ contract SystemConfig_GasLimitLowerBound_Invariant is Test {
* than the hard-coded lower bound. * than the hard-coded lower bound.
*/ */
function invariant_gasLimitLowerBound() external { function invariant_gasLimitLowerBound() external {
assertTrue(config.gasLimit() >= config.MINIMUM_GAS_LIMIT()); assertTrue(config.gasLimit() >= config.minimumGasLimit());
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment