8000 [EPIC] Triggerable Withdrawals by mkurayan · Pull Request #1018 · lidofinance/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[EPIC] Triggerable Withdrawals #1018

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

Open
wants to merge 438 commits into
base: develop
Choose a base branch
from
Open

[EPIC] Triggerable Withdrawals #1018

wants to merge 438 commits into from

Conversation

mkurayan
Copy link
Contributor
@mkurayan mkurayan commented Apr 8, 2025

Summary

This PR introduces an potential implementation of EIP-7685: General Purpose Execution Layer Requests. Specifically, it implements EIP-7002: Execution Layer Triggerable Withdrawals within the Lido WithdrawalVault contract, which serves as the withdrawal credentials address for Lido validators.

@tamtamchik tamtamchik changed the title Feat/triggerable exits feat: triggerable exits Apr 11, 2025
@tamtamchik tamtamchik added valset Updates from the ValSet Tech team solidity Smart contract code changes tests When it comes to testing the code labels Apr 11, 2025
Copy link
github-actions bot commented Apr 17, 2025

badge

Hardhat Unit Tests Coverage Summary

Filename                                                       Stmts    Miss  Cover    Missing
-----------------------------------------------------------  -------  ------  -------  ---------
contracts/0.4.24/Lido.sol                                        212       0  100.00%
contracts/0.4.24/StETH.sol                                        72       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                   434       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/ValidatorExitDelayVerifier.sol                   64       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                                        71       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                                   20       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%   267
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                            30       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                      193       0  100.00%
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/ValidatorsExitBus.sol                     138       1  99.28%   531
contracts/0.8.9/oracle/ValidatorsExitBusOracle.sol                52       1  98.08%   221
contracts/0.8.9/proxy/OssifiableProxy.sol                         17       0  100.00%
contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol      232       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                                                           3211      28  99.13%

Diff against master

Filename                                              Stmts    Miss  Cover
--------------------------------------------------  -------  ------  --------
contracts/0.4.24/nos/NodeOperatorsRegistry.sol          -78       0  +100.00%
contracts/0.8.25/ValidatorExitDelayVerifier.sol         +64       0  +100.00%
contracts/0.8.9/LidoLocator.sol                          +2       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                  +30       0  +100.00%
contracts/0.8.9/oracle/AccountingOracle.sol              +3      -2  +1.05%
contracts/0.8.9/oracle/ValidatorsExitBus.sol           +138      +1  +99.28%
contracts/0.8.9/oracle/ValidatorsExitBusOracle.sol      -39      -1  +0.28%
TOTAL                                                  +195      -1  +0.09%

Results for commit: 2a25c7a

Minimum allowed coverage is 95%

♻️ This comment has been updated with latest results

@F4ever F4ever changed the title feat: triggerable exits [EPIC] Triggerable Withdrawals Apr 24, 2025
Comment on lines +403 to +405
function _slotToTimestamp(uint64 slot) internal view returns (uint256) {
return GENESIS_TIME + slot * SECONDS_PER_SLOT;
}

Check warning

Code scanning / Slither

Potential Arithmetic Overflow Medium

ValidatorExitDelayVerifier._slotToTimestamp(uint64) contains integer variables whose type is larger than the type of one of its intermediate expressions. Consider casting sub expressions explicitly as they might lead to unexpected overflow:
In [GENESIS_TIME + slot * SECONDS_PER_SLOT](contracts/0.8.25/ValidatorExitDelayVerifier.sol#L372) intermidiate expressions returns type of lower order:
slot * SECONDS_PER_SLOT returns uint64, but the type of the resulting expression is uint256.
GENESIS_TIME + ... returns uint64, but the type of the resulting expression is uint256.
@tamtamchik tamtamchik added the next upgrade Things to pickup for the next protocol upgrade label Jun 16, 2025
mkurayan and others added 19 commits June 17, 2025 11:18
…wv-comment

feat: update addWithdrawalRequests method comment
fix: bump accounting oracle initial version to 3
feat(TW): deploy separate gate seals for WQ, VEBO and TWG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next upgrade Things to pickup for the next protocol upgrade solidity Smart contract code changes tests When it comes to testing the code valset Updates from the ValSet Tech team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0