Skip to content

Add Dual Governance to protocol scratch deploy#1401

Open
sandstone-ag wants to merge 12 commits into
developfrom
feat/dg-scratch-deployment
Open

Add Dual Governance to protocol scratch deploy#1401
sandstone-ag wants to merge 12 commits into
developfrom
feat/dg-scratch-deployment

Conversation

@sandstone-ag

Copy link
Copy Markdown

Add Dual Governance to protocol scratch deploy

Context

After the deployment of Dual Governance on Lido mainnet we need to add the DG deployment to protocol scratch deploy routine.

Problem

DAO-654
After the deployment of Dual Governance on Lido mainnet we need to add the DG deployment to protocol scratch deploy routine.

Solution

Added DG to scratch deployment

@tamtamchik tamtamchik requested a review from arwer13 August 26, 2025 19:35
@sandstone-ag sandstone-ag force-pushed the feat/dg-scratch-deployment branch from 466b5f6 to e60b63d Compare August 28, 2025 13:52
@sandstone-ag sandstone-ag force-pushed the feat/dg-scratch-deployment branch from e60b63d to d7844ec Compare September 12, 2025 17:22
@github-actions

github-actions Bot commented Sep 12, 2025

Copy link
Copy Markdown

badge

Hardhat Unit Tests Coverage Summary

Details
Filename                                                                Stmts    Miss  Cover    Missing
--------------------------------------------------------------------  -------  ------  -------  -----------------------------------------------------------------------------------------------------------
contracts/0.4.24/Lido.sol                                                 281      11  96.09%   825-844, 940-952
contracts/0.4.24/StETH.sol                                                 80       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                                   41       0  100.00%
contracts/0.4.24/nos/NodeOperatorsRegistry.sol                            435       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/vaults/LazyOracle.sol                                    134      18  86.57%   203-209, 248, 276-279, 436, 449, 467, 515, 556-558, 650, 658
contracts/0.8.25/vaults/OperatorGrid.sol                                  196       1  99.49%   203
contracts/0.8.25/vaults/PinnedBeaconProxy.sol                               6       0  100.00%
contracts/0.8.25/vaults/StakingVault.sol                                  111      14  87.39%   307-341
contracts/0.8.25/vaults/ValidatorConsolidationRequests.sol                 48       3  93.75%   183, 187, 199
contracts/0.8.25/vaults/VaultFactory.sol                                   34       0  100.00%
contracts/0.8.25/vaults/VaultHub.sol                                      425      76  82.12%   257-266, 281-287, 342-366, 383, 552-553, 595-688, 997-999, 1087-1091, 1147, 1202-1209, 1495-1496, 1511-1521
contracts/0.8.25/vaults/dashboard/Dashboard.sol                           137       8  94.16%   183-201, 327, 636-649
contracts/0.8.25/vaults/dashboard/NodeOperatorFee.sol                      70       0  100.00%
contracts/0.8.25/vaults/dashboard/Permissions.sol                          47       2  95.74%   321-330
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/RecoverTokens.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      213      12  94.37%   483-503, 532, 671, 678, 700
contracts/0.8.9/Accounting.sol                                             96       2  97.92%   349-350
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/TokenRateNotifier.sol                                      36      36  0.00%    35-130
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                               174       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%   307-309, 600-605, 800-835, 956
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%
contracts/tooling/AlertingHarness.sol                                      54       1  98.15%   97
contracts/tooling/sepolia/SepoliaDepositAdapter.sol                        21      21  0.00%    55-106
TOTAL                                                                    5006     234  95.33%

Diff against master

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: e47c1ec

Minimum allowed coverage is 95%

♻️ This comment has been updated with latest results

@arwer13 arwer13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the work!

I see these follow ups:

  1. Rebase on up-to-date vaults branch #1287

  2. Add integration which verifies dual governance upgrade pass (for any dummy one). Boilerplates for the voting script (contract) is in the vaults branch as well. At the moment it won't work because proper roles distribution (in LidoTemplate.sol) is missing.

  3. Make sure no-DG setup is also operational. It is at the moment, but after the roles tinkering there gonna be two Aragon roles configuration. Actually, I'm not 100% sure we optional DG installation is worth the effort, but likely it is. To simplify we can split LidoTemplate into LidoTemplateBase, LidoTemplate and LidoTemplateWithDG - it seems not much work. But for the integration tests and for the utility contracts/scripts which do an upgrade there must be two setups to support in this case. Wdyt @tamtamchik ?

networkState[Sk.dualGovernanceConfig].dual_governance.sanity_check_params.min_withdrawals_batch_size,
},
},
dual_governance_config_provider: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just

Suggested change
dual_governance_config_provider: {
dual_governance_config_provider: networkState[Sk.dualGovernanceConfig].dual_governance_config_provider

here and similar places, why not?

}
}

async function runCommand(command: string, workingDirectory: string) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

runCommand duplicates here and in dg-installation.ts . May move to lib/subprocess.ts or some other lib file

@tamtamchik

Copy link
Copy Markdown
Member

Make sure no-DG setup is also operational. It is at the moment, but after the roles tinkering there gonna be two Aragon roles configuration. Actually, I'm not 100% sure we optional DG installation is worth the effort, but likely it is. To simplify we can split LidoTemplate into LidoTemplateBase, LidoTemplate and LidoTemplateWithDG - it seems not much work. But for the integration tests and for the utility contracts/scripts which do an upgrade there must be two setups to support in this case. Wdyt @tamtamchik ?

Agree, we need no-DG setup also for some devnets to simplify operational work when DG not related to the scope of changes.

@tamtamchik tamtamchik added infrastructure Infrastructure changes refactoring Quality improving code changes labels Sep 24, 2025
@sandstone-ag sandstone-ag force-pushed the feat/dg-scratch-deployment branch from 2e73c48 to 4b6dc09 Compare September 29, 2025 08:37
@sandstone-ag sandstone-ag changed the base branch from master to feat/vaults September 29, 2025 08:37
@sandstone-ag sandstone-ag marked this pull request as ready for review September 29, 2025 08:51
@sandstone-ag sandstone-ag requested a review from a team as a code owner September 29, 2025 08:51
@sandstone-ag sandstone-ag requested a review from a team as a code owner September 29, 2025 13:57
@sandstone-ag sandstone-ag force-pushed the feat/dg-scratch-deployment branch from c732df7 to ea79118 Compare September 29, 2025 14:02
@sandstone-ag sandstone-ag force-pushed the feat/dg-scratch-deployment branch 2 times, most recently from fb6aefd to 673d745 Compare September 29, 2025 17:41
@sandstone-ag sandstone-ag force-pushed the feat/dg-scratch-deployment branch 2 times, most recently from 8b44c84 to b4e43e0 Compare September 30, 2025 08:07
@sandstone-ag sandstone-ag force-pushed the feat/dg-scratch-deployment branch from b4e43e0 to d8f4ffd Compare September 30, 2025 08:12
@sandstone-ag sandstone-ag force-pushed the feat/dg-scratch-deployment branch from b791b52 to e54cd83 Compare September 30, 2025 09:36
Base automatically changed from feat/vaults to develop December 2, 2025 22:08
@rkolpakov rkolpakov force-pushed the feat/dg-scratch-deployment branch 3 times, most recently from 33da977 to 29bb052 Compare January 20, 2026 11:41
@rkolpakov rkolpakov force-pushed the feat/dg-scratch-deployment branch from 29bb052 to 796b7d4 Compare January 20, 2026 11:43
@rkolpakov rkolpakov force-pushed the feat/dg-scratch-deployment branch from 6372be6 to 41a7b84 Compare January 20, 2026 12:41
@rkolpakov rkolpakov force-pushed the feat/dg-scratch-deployment branch 2 times, most recently from 652c798 to 3d6a09e Compare January 21, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Infrastructure changes refactoring Quality improving code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants