Commit 94c7094b authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: cleanup

Ensure that the `unsafeBlockSigner` is in its own
storage slot so that its easy to do state proofs
against its value.
parent 48547026
This diff is collapsed.
This diff is collapsed.
...@@ -379,7 +379,7 @@ SequencerFeeVault_Test:test_minWithdrawalAmount_succeeds() (gas: 5420) ...@@ -379,7 +379,7 @@ SequencerFeeVault_Test:test_minWithdrawalAmount_succeeds() (gas: 5420)
SequencerFeeVault_Test:test_receive_succeeds() (gas: 17336) SequencerFeeVault_Test:test_receive_succeeds() (gas: 17336)
SequencerFeeVault_Test:test_withdraw_notEnough_reverts() (gas: 9309) SequencerFeeVault_Test:test_withdraw_notEnough_reverts() (gas: 9309)
SequencerFeeVault_Test:test_withdraw_succeeds() (gas: 159816) SequencerFeeVault_Test:test_withdraw_succeeds() (gas: 159816)
SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 61966) SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 61952)
SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 10523) SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 10523)
SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 10510) SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 10510)
SystemConfig_Setters_TestFail:test_setGasLimit_notOwner_reverts() (gas: 10614) SystemConfig_Setters_TestFail:test_setGasLimit_notOwner_reverts() (gas: 10614)
......
...@@ -104,27 +104,29 @@ ...@@ -104,27 +104,29 @@
➡ contracts/L1/SystemConfig.sol:SystemConfig ➡ contracts/L1/SystemConfig.sol:SystemConfig
======================= =======================
+---------------+-------------+------+--------+-------+--------------------------------------------+ +-------------------+-------------+------+--------+-------+--------------------------------------------+
| Name | Type | Slot | Offset | Bytes | Contract | | Name | Type | Slot | Offset | Bytes | Contract |
+==================================================================================================+ +======================================================================================================+
| _initialized | uint8 | 0 | 0 | 1 | contracts/L1/SystemConfig.sol:SystemConfig | | _initialized | uint8 | 0 | 0 | 1 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| _initializing | bool | 0 | 1 | 1 | contracts/L1/SystemConfig.sol:SystemConfig | | _initializing | bool | 0 | 1 | 1 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| __gap | uint256[50] | 1 | 0 | 1600 | contracts/L1/SystemConfig.sol:SystemConfig | | __gap | uint256[50] | 1 | 0 | 1600 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| _owner | address | 51 | 0 | 20 | contracts/L1/SystemConfig.sol:SystemConfig | | _owner | address | 51 | 0 | 20 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| __gap | uint256[49] | 52 | 0 | 1568 | contracts/L1/SystemConfig.sol:SystemConfig | | __gap | uint256[49] | 52 | 0 | 1568 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| overhead | uint256 | 101 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig | | overhead | uint256 | 101 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| scalar | uint256 | 102 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig | | scalar | uint256 | 102 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| batcherHash | bytes32 | 103 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig | | unsafeBlockSigner | address | 103 | 0 | 20 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| gasLimit | uint64 | 104 | 0 | 8 | contracts/L1/SystemConfig.sol:SystemConfig | | batcherHash | bytes32 | 104 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig |
+---------------+-------------+------+--------+-------+--------------------------------------------+ |-------------------+-------------+------+--------+-------+--------------------------------------------|
| gasLimit | uint64 | 105 | 0 | 8 | contracts/L1/SystemConfig.sol:SystemConfig |
+-------------------+-------------+------+--------+-------+--------------------------------------------+
======================= =======================
➡ contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist ➡ contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist
......
...@@ -52,16 +52,17 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -52,16 +52,17 @@ contract SystemConfig is OwnableUpgradeable, Semver {
uint256 public scalar; uint256 public scalar;
/** /**
* @notice Identifier for the batcher. For version 1 of this configuration, this is represented * @notice Address corresponding to the key that can propagate unsafe blocks
* as an address left-padded with zeros to 32 bytes. * across the p2p network. This value should not be tightly packed
* into a storage slot with another value to make state proofs more simple.
*/ */
bytes32 public batcherHash; address public unsafeBlockSigner;
/** /**
* @notice Address corresponding to the key that can propagate unsafe blocks * @notice Identifier for the batcher. For version 1 of this configuration, this is represented
* across the p2p network. * as an address left-padded with zeros to 32 bytes.
*/ */
address public unsafeBlockSigner; bytes32 public batcherHash;
/** /**
* @notice L2 gas limit. * @notice L2 gas limit.
......
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