-
Notifications
You must be signed in to change notification settings - Fork 126
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
add delayed upgrade #2735
base: release_loopring_3.6.3
Are you sure you want to change the base?
add delayed upgrade #2735
Conversation
// Enable the circuit | ||
circuit.enabled = true; | ||
|
||
emit CircuitDisabled(blockType, blockSize, blockVersion); |
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.
this is enabled ,can add an event
nextEffectiveTime = _nextEffectiveTime; | ||
} | ||
|
||
emit SettingsUpdated(block.timestamp, _nextEffectiveTime); |
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.
should not modify current event, can add another event which only update but not effect
@@ -55,6 +55,16 @@ abstract contract IBlockVerifier is Claimable | |||
external | |||
virtual; | |||
|
|||
/// @dev Enables the use of the specified circuit. |
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.
/// @dev Enables the use of the specified circuit. | |
/// @dev Enables the use of a specified circuit. |
mapping (address => uint) internal exchangeStake; | ||
|
||
uint public nextEffectiveTime; |
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.
This will change the data storage layout table and break upgradeability!!!!!
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.
Since you have contract LoopringV3 is ILoopringV3, ReentrancyGuard
, changing any storage layout in IloopringV3 will break upgradabilty.
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.
loopringv3 is not deployed using proxy mode
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.
because it has no initialize
function
@@ -17,11 +17,13 @@ contract BlockVerifier is ReentrancyGuard, IBlockVerifier | |||
struct Circuit | |||
{ | |||
bool registered; | |||
uint registeredTime; |
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.
will you deploy a new BlockVerifier or upgrade an existing deployment?
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.
blockverifier is the same case
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.
But you are modifying the code, so what did you mean "is the same"?
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.
sorry for my confused statement. I mean that block verifier also cannot be deployed by using proxy mode like in loopringv3 so that only way to upgrade smart contract is to deploy a new one. so the disorder of storage of it doesn't matter.
@letsgoustc @kl456123 I think "delayed upgrade" is a general feature to all contracts. It's supposed to be contract-agnostic, you probably just need a wrapping "owner contract" that implements a delay internally without any change to the contracts being owned. |
I think we should schedule a call for discussion. |
Yes I also think it is absolutely feasible and might be a better way to reach the same goal |
No description provided.