Skip to content
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: add proper upgrade to version 3 in Lido #882

Open
wants to merge 1 commit into
base: feat/vaults
Choose a base branch
from

Conversation

folkyatina
Copy link
Member

Proper upgrade to version 3 for Lido contract

@folkyatina folkyatina requested a review from a team as a code owner November 27, 2024 15:00
Copy link

badge

Hardhat Unit Tests Coverage Summary

Filename                                                       Stmts    Miss  Cover    Missing
-----------------------------------------------------------  -------  ------  -------  -----------------------------------------------------
contracts/0.4.24/Lido.sol                                        174      39  77.59%   390-396, 495-499, 601-639, 696-746, 896, 912-917, 996
contracts/0.4.24/StETH.sol                                        79       0  100.00%
contracts/0.4.24/StETHPermit.sol                                  15       0  100.00%
contracts/0.4.24/lib/Packed64x4.sol                                5       0  100.00%
contracts/0.4.24/lib/SigningKeys.sol                              36       0  100.00%
contracts/0.4.24/lib/StakeLimitUtils.sol                          37       0  100.00%
contracts/0.4.24/nos/NodeOperatorsRegistry.sol                   485       0  100.00%
contracts/0.4.24/oracle/LegacyOracle.sol                          72       0  100.00%
contracts/0.4.24/utils/Pausable.sol                                9       0  100.00%
contracts/0.4.24/utils/Versioned.sol                               5       0  100.00%
contracts/0.6.12/WstETH.sol                                       17       0  100.00%
contracts/0.8.25/Accounting.sol                                   83      81  2.41%    109-476
contracts/0.8.25/interfaces/ILido.sol                              0       0  100.00%
contracts/0.8.25/interfaces/IOracleReportSanityChecker.sol         0       0  100.00%
contracts/0.8.25/interfaces/IPostTokenRebaseReceiver.sol           0       0  100.00%
contracts/0.8.25/interfaces/IStakingRouter.sol                     0       0  100.00%
contracts/0.8.25/interfaces/IWithdrawalQueue.sol                   0       0  100.00%
contracts/0.8.25/utils/Versioned.sol                              11       5  54.55%   35-37, 49-50
contracts/0.8.25/vaults/StakingVault.sol                          67      46  31.34%   83-105, 113, 126-185, 195-206
contracts/0.8.25/vaults/VaultBeaconChainDepositor.sol             21      19  9.52%    47-93
contracts/0.8.25/vaults/VaultDashboard.sol                        33      20  39.39%   35, 60-138
contracts/0.8.25/vaults/VaultFactory.sol                          18       0  100.00%
contracts/0.8.25/vaults/VaultHub.sol                             133     100  24.81%   86-94, 118, 132, 138, 158-414
contracts/0.8.25/vaults/VaultStaffRoom.sol                        48      37  22.92%   50-57, 67, 89-177
contracts/0.8.25/vaults/interfaces/IBeaconProxy.sol                0       0  100.00%
contracts/0.8.25/vaults/interfaces/IHubVault.sol                   0       0  100.00%
contracts/0.8.25/vaults/interfaces/IReportReceiver.sol             0       0  100.00%
contracts/0.8.25/vaults/interfaces/IStakingVault.sol               0       0  100.00%
contracts/0.8.4/WithdrawalsManagerProxy.sol                       61       0  100.00%
contracts/0.8.9/BeaconChainDepositor.sol                          21       2  90.48%   48, 51
contracts/0.8.9/Burner.sol                                        72       0  100.00%
contracts/0.8.9/DepositSecurityModule.sol                        104       0  100.00%
contracts/0.8.9/EIP712StETH.sol                                   16       0  100.00%
contracts/0.8.9/LidoExecutionLayerRewardsVault.sol                16       0  100.00%
contracts/0.8.9/LidoLocator.sol                                   19       0  100.00%
contracts/0.8.9/OracleDaemonConfig.sol                            28       0  100.00%
contracts/0.8.9/StakingRouter.sol                                303       0  100.00%
contracts/0.8.9/WithdrawalQueue.sol                               88       0  100.00%
contracts/0.8.9/WithdrawalQueueBase.sol                          146       0  100.00%
contracts/0.8.9/WithdrawalQueueERC721.sol                         89       0  100.00%
contracts/0.8.9/WithdrawalVault.sol                               21       0  100.00%
contracts/0.8.9/lib/Math.sol                                       4       0  100.00%
contracts/0.8.9/lib/PositiveTokenRebaseLimiter.sol                22       0  100.00%
contracts/0.8.9/lib/UnstructuredRefStorage.sol                     2       0  100.00%
contracts/0.8.9/oracle/AccountingOracle.sol                      171       1  99.42%   674
contracts/0.8.9/oracle/BaseOracle.sol                             89       1  98.88%   397
contracts/0.8.9/oracle/HashConsensus.sol                         263       1  99.62%   1005
contracts/0.8.9/oracle/ValidatorsExitBusOracle.sol                91      91  0.00%    96-461
contracts/0.8.9/proxy/OssifiableProxy.sol                         17       0  100.00%
contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol      155       0  100.00%
contracts/0.8.9/utils/DummyEmptyContract.sol                       0       0  100.00%
contracts/0.8.9/utils/PausableUntil.sol                           31       0  100.00%
contracts/0.8.9/utils/Versioned.sol                               11       0  100.00%
contracts/0.8.9/utils/access/AccessControl.sol                    23       0  100.00%
contracts/0.8.9/utils/access/AccessControlEnumerable.sol           9       0  100.00%
contracts/testnets/sepolia/SepoliaDepositAdapter.sol              21      21  0.00%    49-100
TOTAL                                                           3241     464  85.68%

Diff against master

Filename                                                       Stmts    Miss  Cover
-----------------------------------------------------------  -------  ------  --------
contracts/0.4.24/Lido.sol                                        -38     +39  -22.41%
contracts/0.4.24/StETH.sol                                        +7       0  +100.00%
contracts/0.8.25/Accounting.sol                                  +83     +81  +2.41%
contracts/0.8.25/interfaces/ILido.sol                              0       0  +100.00%
contracts/0.8.25/interfaces/IOracleReportSanityChecker.sol         0       0  +100.00%
contracts/0.8.25/interfaces/IPostTokenRebaseReceiver.sol           0       0  +100.00%
contracts/0.8.25/interfaces/IStakingRouter.sol                     0       0  +100.00%
contracts/0.8.25/interfaces/IWithdrawalQueue.sol                   0       0  +100.00%
contracts/0.8.25/utils/Versioned.sol                             +11      +5  +54.55%
contracts/0.8.25/vaults/StakingVault.sol                         +67     +46  +31.34%
contracts/0.8.25/vaults/VaultBeaconChainDepositor.sol            +21     +19  +9.52%
contracts/0.8.25/vaults/VaultDashboard.sol                       +33     +20  +39.39%
contracts/0.8.25/vaults/VaultFactory.sol                         +18       0  +100.00%
contracts/0.8.25/vaults/VaultHub.sol                            +133    +100  +24.81%
contracts/0.8.25/vaults/VaultStaffRoom.sol                       +48     +37  +22.92%
contracts/0.8.25/vaults/interfaces/IBeaconProxy.sol                0       0  +100.00%
contracts/0.8.25/vaults/interfaces/IHubVault.sol                   0       0  +100.00%
contracts/0.8.25/vaults/interfaces/IReportReceiver.sol             0       0  +100.00%
contracts/0.8.25/vaults/interfaces/IStakingVault.sol               0       0  +100.00%
contracts/0.8.9/Burner.sol                                        +1       0  +100.00%
contracts/0.8.9/LidoLocator.sol                                   +1       0  +100.00%
contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol      -16       0  +100.00%
TOTAL                                                           +369    +347  -10.25%

Results for commit: d56c26f

Minimum allowed coverage is 95%

♻️ This comment has been updated with latest results

@@ -210,6 +210,7 @@ contract Lido is Versioned, StETHPermit, AragonApp {
{
_bootstrapInitialHolder();
_initialize_v2(_lidoLocator, _eip712StETH);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove _initialize_v2 altogether by moving it's logic to v3?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can, but should we?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants