Skip to content

Conversation

kovalgek
Copy link

@kovalgek kovalgek commented Sep 2, 2025

Change ValidatorConsolidationRequests contract to follow the new flow for Vault-CLI.

  • add consolidation requests and increase adjustment calldata getter
  • add method that uses previously formed calldata to make batching of consolidation requests and increase adjustment

The Vault CLI gets calldata and than use it in 2 ways

  • calls ValidatorConsolidationRequests batching method
  • uses EIP-5792

@kovalgek kovalgek changed the title Feat/vaults consolidation Vaults consolidation for Vault-CLI Sep 2, 2025
@tamtamchik tamtamchik added solidity Smart contract code changes vaults Lido stVaults related changes labels Sep 3, 2025
Copy link

github-actions bot commented Sep 5, 2025

badge

Hardhat Unit Tests Coverage Summary

Filename                                                                Stmts    Miss  Cover    Missing
--------------------------------------------------------------------  -------  ------  -------  -----------------------------------------------------------------------------------------------
contracts/0.4.24/Lido.sol                                                 279      11  96.06%   809-828, 924-936
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                            436       0  100.00%
contracts/0.4.24/utils/Pausable.sol                                         9       0  100.00%
contracts/0.4.24/utils/UnstructuredStorageExt.sol                          14       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/ValidatorExitDelayVerifier.sol                            75       0  100.00%
contracts/0.8.25/utils/AccessControlConfirmable.sol                         2       0  100.00%
contracts/0.8.25/utils/Confirmable2Addresses.sol                            5       0  100.00%
contracts/0.8.25/utils/Confirmations.sol                                   37       0  100.00%
contracts/0.8.25/utils/PausableUntilWithRoles.sol                           3       0  100.00%
contracts/0.8.25/utils/V3TemporaryAdmin.sol                                52      52  0.00%    83-218
contracts/0.8.25/vaults/LazyOracle.sol                                    114       9  92.11%   220, 373, 385, 401, 448, 488-490, 569
contracts/0.8.25/vaults/OperatorGrid.sol                                  191       0  100.00%
contracts/0.8.25/vaults/PinnedBeaconProxy.sol                               6       0  100.00%
contracts/0.8.25/vaults/StakingVault.sol                                   96       0  100.00%
contracts/0.8.25/vaults/ValidatorConsolidationRequests.sol                 48       3  93.75%   183, 187, 199
contracts/0.8.25/vaults/VaultFactory.sol                                   32       0  100.00%
contracts/0.8.25/vaults/VaultHub.sol                                      405      81  80.00%   247-256, 273-286, 314-336, 432, 508-509, 550-640, 928-930, 995-1001, 1055, 1110-1117, 1391-1409
contracts/0.8.25/vaults/dashboard/Dashboard.sol                           121       6  95.04%   204-214, 591-606
contracts/0.8.25/vaults/dashboard/NodeOperatorFee.sol                      66       0  100.00%
contracts/0.8.25/vaults/dashboard/Permissions.sol                          51       2  96.08%   373-382
contracts/0.8.25/vaults/interfaces/IPinnedBeaconProxy.sol                   0       0  100.00%
contracts/0.8.25/vaults/interfaces/IPredepositGuarantee.sol                 0       0  100.00%
contracts/0.8.25/vaults/interfaces/IStakingVault.sol                        0       0  100.00%
contracts/0.8.25/vaults/interfaces/IVaultFactory.sol                        0       0  100.00%
contracts/0.8.25/vaults/lib/PinnedBeaconUtils.sol                           5       0  100.00%
contracts/0.8.25/vaults/lib/RefSlotCache.sol                               36       0  100.00%
contracts/0.8.25/vaults/predeposit_guarantee/CLProofVerifier.sol           16       1  93.75%   214
contracts/0.8.25/vaults/predeposit_guarantee/MeIfNobodyElse.sol             3       0  100.00%
contracts/0.8.25/vaults/predeposit_guarantee/PredepositGuarantee.sol      151       0  100.00%
contracts/0.8.9/Accounting.sol                                             93       2  97.85%   342-343
contracts/0.8.9/BeaconChainDepositor.sol                                   21       2  90.48%   48, 51
contracts/0.8.9/Burner.sol                                                 92       0  100.00%
contracts/0.8.9/DepositSecurityModule.sol                                 128       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                                            26       0  100.00%
contracts/0.8.9/OracleDaemonConfig.sol                                     28       0  100.00%
contracts/0.8.9/StakingRouter.sol                                         305       0  100.00%
contracts/0.8.9/TriggerableWithdrawalsGateway.sol                          54       1  98.15%   271
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                                        32       0  100.00%
contracts/0.8.9/WithdrawalVaultEIP7002.sol                                 21       0  100.00%
contracts/0.8.9/lib/ExitLimitUtils.sol                                     35       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                               173       0  100.00%
contracts/0.8.9/oracle/BaseOracle.sol                                      89       1  98.88%   401
contracts/0.8.9/oracle/HashConsensus.sol                                  263       1  99.62%   1005
contracts/0.8.9/oracle/ValidatorsExitBus.sol                              138      10  92.75%   458-471, 541
contracts/0.8.9/oracle/ValidatorsExitBusOracle.sol                         52       1  98.08%   217
contracts/0.8.9/proxy/OssifiableProxy.sol                                  17       0  100.00%
contracts/0.8.9/proxy/WithdrawalsManagerProxy.sol                          60       0  100.00%
contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol               232      12  94.83%   305-307, 598-603, 798-833, 954
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/common/utils/PausableUntil.sol                                   29       0  100.00%
TOTAL                                                                    4792     195  95.93%

Diff against master

Filename                                                                Stmts    Miss  Cover
--------------------------------------------------------------------  -------  ------  --------
contracts/0.4.24/Lido.sol                                                 +67     +11  -3.94%
contracts/0.4.24/StETH.sol                                                 +7       0  +100.00%
contracts/0.4.24/nos/NodeOperatorsRegistry.sol                            -76       0  +100.00%
contracts/0.4.24/utils/UnstructuredStorageExt.sol                         +14       0  +100.00%
contracts/0.8.25/ValidatorExitDelayVerifier.sol                           +75       0  +100.00%
contracts/0.8.25/utils/AccessControlConfirmable.sol                        +2       0  +100.00%
contracts/0.8.25/utils/Confirmable2Addresses.sol                           +5       0  +100.00%
contracts/0.8.25/utils/Confirmations.sol                                  +37       0  +100.00%
contracts/0.8.25/utils/PausableUntilWithRoles.sol                          +3       0  +100.00%
contracts/0.8.25/utils/V3TemporaryAdmin.sol                               +52     +52  +100.00%
contracts/0.8.25/vaults/LazyOracle.sol                                   +114      +9  +92.11%
contracts/0.8.25/vaults/OperatorGrid.sol                                 +191       0  +100.00%
contracts/0.8.25/vaults/PinnedBeaconProxy.sol                              +6       0  +100.00%
contracts/0.8.25/vaults/StakingVault.sol                                  +96       0  +100.00%
contracts/0.8.25/vaults/ValidatorConsolidationRequests.sol                +48      +3  +93.75%
contracts/0.8.25/vaults/VaultFactory.sol                                  +32       0  +100.00%
contracts/0.8.25/vaults/VaultHub.sol                                     +405     +81  +80.00%
contracts/0.8.25/vaults/dashboard/Dashboard.sol                          +121      +6  +95.04%
contracts/0.8.25/vaults/dashboard/NodeOperatorFee.sol                     +66       0  +100.00%
contracts/0.8.25/vaults/dashboard/Permissions.sol                         +51      +2  +96.08%
contracts/0.8.25/vaults/interfaces/IPinnedBeaconProxy.sol                   0       0  +100.00%
contracts/0.8.25/vaults/interfaces/IPredepositGuarantee.sol                 0       0  +100.00%
contracts/0.8.25/vaults/interfaces/IStakingVault.sol                        0       0  +100.00%
contracts/0.8.25/vaults/interfaces/IVaultFactory.sol                        0       0  +100.00%
contracts/0.8.25/vaults/lib/PinnedBeaconUtils.sol                          +5       0  +100.00%
contracts/0.8.25/vaults/lib/RefSlotCache.sol                              +36       0  +100.00%
contracts/0.8.25/vaults/predeposit_guarantee/CLProofVerifier.sol          +16      +1  +93.75%
contracts/0.8.25/vaults/predeposit_guarantee/MeIfNobodyElse.sol            +3       0  +100.00%
contracts/0.8.25/vaults/predeposit_guarantee/PredepositGuarantee.sol     +151       0  +100.00%
contracts/0.8.9/Accounting.sol                                            +93      +2  +97.85%
contracts/0.8.9/Burner.sol                                                +21       0  +100.00%
contracts/0.8.9/LidoLocator.sol                                            +8       0  +100.00%
contracts/0.8.9/StakingRouter.sol                                         -11       0  +100.00%
contracts/0.8.9/TriggerableWithdrawalsGateway.sol                         +54      +1  +98.15%
contracts/0.8.9/WithdrawalVault.sol                                       +11       0  +100.00%
contracts/0.8.9/WithdrawalVaultEIP7002.sol                                +21       0  +100.00%
contracts/0.8.9/lib/ExitLimitUtils.sol                                    +35       0  +100.00%
contracts/0.8.9/oracle/AccountingOracle.sol                               -17      -2  +1.05%
contracts/0.8.9/oracle/ValidatorsExitBus.sol                             +138     +10  +92.75%
contracts/0.8.9/oracle/ValidatorsExitBusOracle.sol                        -39      -1  +0.28%
contracts/0.8.9/proxy/WithdrawalsManagerProxy.sol                         +60       0  +100.00%
contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol                 0     +12  -5.17%
contracts/common/utils/PausableUntil.sol                                  +29       0  +100.00%
TOTAL                                                                   +1930    +187  -3.11%

Results for commit: 0defb95

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@kovalgek kovalgek marked this pull request as ready for review September 5, 2025 18:35
@kovalgek kovalgek requested a review from a team as a code owner September 5, 2025 18:35
Copy link
Contributor

@TheDZhon TheDZhon left a comment

Choose a reason for hiding this comment

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

👀

@kovalgek kovalgek requested a review from TheDZhon September 9, 2025 21:01
Copy link
Contributor

@TheDZhon TheDZhon left a comment

Choose a reason for hiding this comment

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

GG 👏

Please address the comments about comments 👾

@kovalgek kovalgek requested a review from TheDZhon September 11, 2025 20:35
Copy link
Contributor

@TheDZhon TheDZhon left a comment

Choose a reason for hiding this comment

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

Splendid!

@kovalgek kovalgek requested a review from TheDZhon September 12, 2025 14:54
@tamtamchik tamtamchik merged commit 1e1ae20 into feat/testnet-2 Sep 15, 2025
13 checks passed
@tamtamchik tamtamchik deleted the feat/vaults-consolidation branch September 15, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solidity Smart contract code changes vaults Lido stVaults related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants