-
Notifications
You must be signed in to change notification settings - Fork 7
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(zkevm-integration): implement add-draft-interface
#132
feat(zkevm-integration): implement add-draft-interface
#132
Conversation
contracts/ronin/profile/Profile.sol
Outdated
/** | ||
* @inheritdoc IProfile | ||
*/ | ||
function changeSequencerAddr(address id, address sequencer) external onlyAdmin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the default sequencer, aggregator is profile id, it's very likely that we need to change sequencer, aggregator address after creating rollup. But this function requires admin not the candidate admin, so this operation must go through proposal. Does it match with the requirements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latest sync with @phuctd95 I can confirm this follows the requirements.
40288a7
to
3cfb932
Compare
47b12b9
to
3f357bb
Compare
Slither reportTHIS CHECKLIST IS NOT COMPLETE. Use
reentrancy-ethImpact: High
dpos-contract/src/ronin/validator/CoinbaseExecution.sol Lines 219 to 271 in 37aa3df
dpos-contract/src/ronin/validator/CoinbaseExecution.sol Lines 112 to 175 in 37aa3df
dpos-contract/src/ronin/validator/CoinbaseExecution.sol Lines 112 to 175 in 37aa3df
dpos-contract/src/ronin/staking/CandidateStaking.sol Lines 120 to 155 in 37aa3df
dpos-contract/src/ronin/validator/CoinbaseExecution.sol Lines 112 to 175 in 37aa3df
dpos-contract/src/ronin/validator/CoinbaseExecution.sol Lines 112 to 175 in 37aa3df
shadowing-stateImpact: High
uninitialized-stateImpact: High
|
Storage Layout Change ReportLayout Changes for ProfileXComponents--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/profile/ProfileXComponents.sol .729635267 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/profile/ProfileXComponents.sol .730635281 +0000
@@ -3,4 +3,5 @@
2 _consensus2Id mapping(TConsensus => address)
3 _profileChangeCooldown uint256
4 _vrfKeyHash2Id mapping(bytes32 => address)
- 5 __gap bytes32[46]
+🏴 5 _rollupId2Id mapping(uint32 => address)
+🏴 6 __gap bytes32[45]
Layout Changes for ProfileHandler--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/profile/ProfileHandler.sol .380630559 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/profile/ProfileHandler.sol .386630640 +0000
@@ -3,4 +3,5 @@
2 _consensus2Id mapping(TConsensus => address)
3 _profileChangeCooldown uint256
4 _vrfKeyHash2Id mapping(bytes32 => address)
- 5 __gap bytes32[46]
+🏴 5 _rollupId2Id mapping(uint32 => address)
+🏴 6 __gap bytes32[45]
Layout Changes for ProfileStorage--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/profile/ProfileStorage.sol .181627874 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/profile/ProfileStorage.sol .181627874 +0000
@@ -3,4 +3,5 @@
2 _consensus2Id mapping(TConsensus => address)
3 _profileChangeCooldown uint256
4 _vrfKeyHash2Id mapping(bytes32 => address)
- 5 __gap bytes32[46]
+🏴 5 _rollupId2Id mapping(uint32 => address)
+🏴 6 __gap bytes32[45]
Layout Changes for Profile--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/profile/Profile.sol .607633621 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/profile/Profile.sol .607633621 +0000
@@ -3,7 +3,7 @@
2 _consensus2Id mapping(TConsensus => address)
3 _profileChangeCooldown uint256
4 _vrfKeyHash2Id mapping(bytes32 => address)
- 5 __gap bytes32[46]
-
+🏴 5 _rollupId2Id mapping(uint32 => address)
+🏴 6 __gap bytes32[45]
51 _initialized uint8
51: 1 _initializing bool
Layout Changes for Profile_Mainnet--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/profile/Profile_Mainnet.sol .310629614 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/profile/Profile_Mainnet.sol .310629614 +0000
@@ -3,7 +3,7 @@
2 _consensus2Id mapping(TConsensus => address)
3 _profileChangeCooldown uint256
4 _vrfKeyHash2Id mapping(bytes32 => address)
- 5 __gap bytes32[46]
-
+🏴 5 _rollupId2Id mapping(uint32 => address)
+🏴 6 __gap bytes32[45]
51 _initialized uint8
51: 1 _initializing bool
Layout Changes for SlashingExecution--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/validator/SlashingExecution.sol .128789051 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/validator/SlashingExecution.sol .128789051 +0000
@@ -32,5 +32,6 @@
173 _lockedConsensusList address[]
174 _exitInfo mapping(address => struct ICommonInfo.EmergencyExitInfo)
175 _lockedFundReleased mapping(address => bool)
- 176 ______gap uint256[44]
-
+🏴 176 _validatorL2MiningReward mapping(address => uint256)
+🏴 177 _delegatorL2MiningReward mapping(address => uint256)
+🏴 178 ______gap uint256[42]
Layout Changes for CoinbaseExecution--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/validator/CoinbaseExecution.sol .018787567 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/validator/CoinbaseExecution.sol .018787567 +0000
@@ -42,5 +42,6 @@
230 _lockedConsensusList address[]
231 _exitInfo mapping(address => struct ICommonInfo.EmergencyExitInfo)
232 _lockedFundReleased mapping(address => bool)
- 233 ______gap uint256[44]
-
+🏴 233 _validatorL2MiningReward mapping(address => uint256)
+🏴 234 _delegatorL2MiningReward mapping(address => uint256)
+🏴 235 ______gap uint256[42]
Layout Changes for EmergencyExit--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/validator/EmergencyExit.sol .280791102 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/validator/EmergencyExit.sol .280791102 +0000
@@ -38,5 +38,6 @@
226 _lockedConsensusList address[]
227 _exitInfo mapping(address => struct ICommonInfo.EmergencyExitInfo)
228 _lockedFundReleased mapping(address => bool)
- 229 ______gap uint256[44]
-
+🏴 229 _validatorL2MiningReward mapping(address => uint256)
+🏴 230 _delegatorL2MiningReward mapping(address => uint256)
+🏴 231 ______gap uint256[42]
Layout Changes for CoinbaseExecutionDependant--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/validator/CoinbaseExecutionDependant.sol .200790023 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/validator/CoinbaseExecutionDependant.sol .200790023 +0000
@@ -42,5 +42,6 @@
230 _lockedConsensusList address[]
231 _exitInfo mapping(address => struct ICommonInfo.EmergencyExitInfo)
232 _lockedFundReleased mapping(address => bool)
- 233 ______gap uint256[44]
-
+🏴 233 _validatorL2MiningReward mapping(address => uint256)
+🏴 234 _delegatorL2MiningReward mapping(address => uint256)
+🏴 235 ______gap uint256[42]
Layout Changes for RoninValidatorSet--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/validator/RoninValidatorSet.sol .048787972 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/validator/RoninValidatorSet.sol .048787972 +0000
@@ -44,5 +44,6 @@
231 _lockedConsensusList address[]
232 _exitInfo mapping(address => struct ICommonInfo.EmergencyExitInfo)
233 _lockedFundReleased mapping(address => bool)
- 234 ______gap uint256[44]
-
+🏴 234 _validatorL2MiningReward mapping(address => uint256)
+🏴 235 _delegatorL2MiningReward mapping(address => uint256)
+🏴 236 ______gap uint256[42]
Layout Changes for RoninValidatorSetConstructor--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/validator/RoninValidatorSetConstructor.sol .114788862 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/validator/RoninValidatorSetConstructor.sol .114788862 +0000
@@ -44,5 +44,6 @@
231 _lockedConsensusList address[]
232 _exitInfo mapping(address => struct ICommonInfo.EmergencyExitInfo)
233 _lockedFundReleased mapping(address => bool)
- 234 ______gap uint256[44]
-
+🏴 234 _validatorL2MiningReward mapping(address => uint256)
+🏴 235 _delegatorL2MiningReward mapping(address => uint256)
+🏴 236 ______gap uint256[42]
Layout Changes for SlashingExecutionDependant--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/validator/SlashingExecutionDependant.sol .111788822 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/validator/SlashingExecutionDependant.sol .111788822 +0000
@@ -32,5 +32,6 @@
173 _lockedConsensusList address[]
174 _exitInfo mapping(address => struct ICommonInfo.EmergencyExitInfo)
175 _lockedFundReleased mapping(address => bool)
- 176 ______gap uint256[44]
-
+🏴 176 _validatorL2MiningReward mapping(address => uint256)
+🏴 177 _delegatorL2MiningReward mapping(address => uint256)
+🏴 178 ______gap uint256[42]
Layout Changes for CommonStorage--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/ronin/validator/storage-fragments/CommonStorage.sol .254790751 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/ronin/validator/storage-fragments/CommonStorage.sol .254790751 +0000
@@ -30,5 +30,6 @@
171 _lockedConsensusList address[]
172 _exitInfo mapping(address => struct ICommonInfo.EmergencyExitInfo)
173 _lockedFundReleased mapping(address => bool)
- 174 ______gap uint256[44]
-
+🏴 174 _validatorL2MiningReward mapping(address => uint256)
+🏴 175 _delegatorL2MiningReward mapping(address => uint256)
+🏴 176 ______gap uint256[42]
Layout Changes for MockProfile--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/mocks/MockProfile.sol .265480606 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/mocks/MockProfile.sol .265480606 +0000
@@ -3,8 +3,8 @@
2 _consensus2Id mapping(TConsensus => address)
3 _profileChangeCooldown uint256
4 _vrfKeyHash2Id mapping(bytes32 => address)
- 5 __gap bytes32[46]
-
+🏴 5 _rollupId2Id mapping(uint32 => address)
+🏴 6 __gap bytes32[45]
51 _initialized uint8
51: 1 _initializing bool
51: 2 _verificationFailed bool
Layout Changes for MockRoninValidatorSetExtended--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/mocks/validator/MockRoninValidatorSetExtended.sol .944557222 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/mocks/validator/MockRoninValidatorSetExtended.sol .944557222 +0000
@@ -44,8 +44,8 @@
231 _lockedConsensusList address[]
232 _exitInfo mapping(address => struct ICommonInfo.EmergencyExitInfo)
233 _lockedFundReleased mapping(address => bool)
- 234 ______gap uint256[44]
-
-
+🏴 234 _validatorL2MiningReward mapping(address => uint256)
+🏴 235 _delegatorL2MiningReward mapping(address => uint256)
+🏴 236 ______gap uint256[42]
278 _initialized bool
279 _epochs uint256[]
Layout Changes for MockRoninValidatorSetOverridePrecompile--- https://github.com/ronin-chain/dpos-contract/blob/3cfb9321dd623494b6a169a8b6b7d1464d4f7a59/src/mocks/validator/MockRoninValidatorSetOverridePrecompile.sol .981557721 +0000
+++ https://github.com/ronin-chain/dpos-contract/blob/9bbee5535e63931a6acd210546092dd72b43c644/src/mocks/validator/MockRoninValidatorSetOverridePrecompile.sol .981557721 +0000
@@ -44,5 +44,6 @@
231 _lockedConsensusList address[]
232 _exitInfo mapping(address => struct ICommonInfo.EmergencyExitInfo)
233 _lockedFundReleased mapping(address => bool)
- 234 ______gap uint256[44]
-
+🏴 234 _validatorL2MiningReward mapping(address => uint256)
+🏴 235 _delegatorL2MiningReward mapping(address => uint256)
+🏴 236 ______gap uint256[42]
|
script/PostChecker.sol
Outdated
} | ||
|
||
console.log(StdStyle.green("Cheat fast forward to 1 epoch ...\n")); | ||
LibWrapUpEpoch.wrapUpEpoch(); | ||
} | ||
|
||
function _randomlySubmitL2BlockReward( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing check the state change accurately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
3f357bb
to
452796c
Compare
…Set): add related function to support zk-evm integration
9bbee55
to
3dab0b3
Compare
Description
PR to merge from implement-feature/zkevm-integration/add-draft-interface to feature/zkevm-integration.