-
Notifications
You must be signed in to change notification settings - Fork 212
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/upgrade on forking #978
base: feat/vaults
Are you sure you want to change the base?
Conversation
don't read addresses from locator in Sanity Checker ctor
Hardhat Unit Tests Coverage Summary
Diff against master
Results for commit: 47fb019 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
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.
👀
run: cp deployed-mainnet.json deployed-mainnet-upgrade.json | ||
|
||
- name: Run upgrade | ||
run: ./scripts/dao-upgrade.sh |
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.
🧠 let's think about the granular approach:
- pre-deployment
- deployed but pre-vote
- vote started
- vote finished not enacted
- vote finished and enacted
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.
shall have entry point from dao-ops to run arbitrary evm scripts (later-later)
scripts/upgrade/steps.json
Outdated
@@ -1,3 +1,9 @@ | |||
{ | |||
"steps": [] | |||
"steps": [ | |||
"upgrade/steps/0100-deploy-contracts", |
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.
can we re-use scratch?
seems not but would need to sync both
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.
🧠 Testnet and Mainnet both together?
bytes32 internal constant DEFAULT_ADMIN_ROLE = 0x00; | ||
// Burner | ||
bytes32 internal constant REQUEST_BURN_SHARES_ROLE = keccak256("REQUEST_BURN_SHARES_ROLE"); | ||
bytes32 internal constant REQUEST_BURN_MY_STETH_ROLE = keccak256("REQUEST_BURN_MY_STETH_ROLE"); |
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.
@TheDZhon need to redo ACL for Burner
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.
double check that Burner isn't cached somewhere
} | ||
|
||
function _finishUpgrade() internal { | ||
if (msg.sender != _voting) revert OnlyVotingCanUpgrade(); |
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.
🧠 after DG here should be Agent (not for this particular line)
_assertSingleOZRoleHolder(_withdrawalVault, DEFAULT_ADMIN_ROLE, _agent); | ||
_assertSingleOZRoleHolder(_withdrawalVault, ADD_FULL_WITHDRAWAL_REQUEST_ROLE, _validatorsExitBusOracle); | ||
|
||
// VaultHub |
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.
here will be PDG too
- probably two new gate seals
contracts/0.8.9/Burner.sol
Outdated
* The initialization is moved from the constructor to be able to set the shares burnt counters | ||
* to the up-to-date values from the old Burner upon the upgrade. | ||
*/ | ||
function initialize( |
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.
- we have to migrate the whole state, the most important is about
*BurnRequested
- transfer stETH back here
⚠️
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.
let's pass the prev burner address
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 be a part of the finalizeUpgrade_Vx for Lido
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.
probably should be a proxy?
unit tests are not updated yet
function _assertAragonAppImplementation(IAragonAppRepo repo, address implementation) internal view { | ||
(, address actualImplementation, ) = repo.getLatest(); | ||
if (actualImplementation != implementation) { | ||
revert IncorrectAragonAppImplementation(address(repo), implementation); | ||
} | ||
} |
Check warning
Code scanning / Slither
Unused return Medium
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.
👍 Great structure!
Some notes about burner, withdrawal vault, and beacon 👀
Some code style enforcement would probably help
_setContractVersion(3); | ||
|
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.
let's check oldBurner != newBurner
contracts/0.4.24/Lido.sol
Outdated
|
||
_initialize_v3(); | ||
_initialize_v3(_oldBurner); |
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.
address predepositGuarantee; | ||
|
||
// New non-proxy contracts | ||
address burner; |
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.
let's make it a proxy, 7201 storage (a separate PR)
address voting; | ||
address nodeOperatorsRegistry; | ||
address simpleDvt; | ||
address wstETH; |
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.
probably can remove it bc new locator has it, for old one the workaround is retrieve through WQ
// New non-aragon implementations | ||
address accountingOracleImplementation; | ||
address newLocatorImplementation; | ||
address withdrawalVaultImplementation; |
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.
// | ||
event UpgradeFinished(); | ||
|
||
struct UpgradeTemplateV3Params { |
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.
No description provided.