@@ -161,6 +161,33 @@ no-op, step `0150` renounces WQ/VEBO admin immediately, and step `0160` calls
161161` LidoTemplate.finalizePermissionsWithoutDGDeployment() ` (keeps Voting as
162162permission manager) before setting the template owner to Agent.
163163
164+ The two external staking modules have one toggle each, same falsy spellings,
165+ both enabled by default: ` CSM_DEPLOYMENT_ENABLED ` and ` CMV2_DEPLOYMENT_ENABLED ` .
166+ With one off, step ` 0135 ` skips that module's deploy from
167+ ` lidofinance/community-staking-module ` , and step ` 0140 ` leaves it unplugged — the
168+ step keys off the module's state entry, so nothing else has to change. The two
169+ deploys are independent in that repo: separate ` just ` recipes, forge scripts and
170+ artifact files, and CMv2 deploys its own ` Ejector ` , ` HashConsensus ` , ` Accounting `
171+ and ` FeeOracle ` rather than reusing CSM's. Note these are the deploy-side
172+ switches; ` INTEGRATION_WITH_CSM=off ` is the separate test-side one.
173+
174+ What does couple them is on this side: StakingRouter assigns module ids in plug
175+ order (NOR 1, SimpleDVT 2, then whichever of CSM / CMv2 was deployed), and
176+ ` ConsolidationMigrator ` takes ` [consolidationMigrator].targetModuleId ` as an
177+ immutable constructor argument back in step ` 0083 ` . So turning CSM off while CMv2
178+ stays on makes CMv2 module 3, not 4 — set the param (or
179+ ` CONSOLIDATION_MIGRATOR_TARGET_MODULE_ID ` ) to match. The preflight checks that
180+ pairing up front, before the expensive external deploy; the assert at the end of
181+ ` 0140 ` is the late backstop. With CMv2 off, ` ConsolidationMigrator ` is still
182+ deployed and its target id simply stays unassigned (preflight warns).
183+
184+ Independently of the toggles, plugging the external modules needs Aragon Agent
185+ authority — their first admin is the Agent (` CSM_FIRST_ADMIN_ADDRESS ` ), so the
186+ ` resume() ` / ` updateInitialEpoch ` / ` registerPauser ` calls in ` 0140 ` are made
187+ through ` impersonate(agent) ` , i.e. ` hardhat_impersonateAccount ` . Unlike the DG
188+ step, that part does not work on a live network — there it would take an
189+ Agent-executed vote or DG proposal.
190+
164191### Dual Governance configuration
165192
166193The ` [dualGovernance] ` section of the deploy-params toml mirrors the structure
@@ -788,21 +815,21 @@ Two scope gaps to keep in mind:
788815
789816### Files of interest
790817
791- | File | Role |
792- | ------------------------------------------------------------ | ------------------------------------------------------------- |
793- | ` scripts/dao-deploy.sh ` | Entry point; wipes state file, compiles, runs ` migrate.ts ` |
794- | ` scripts/utils/migrate.ts ` | Iterates ` steps.json ` , imports each step, calls ` main() ` |
795- | ` lib/scratch.ts ` | ` applyDeploySteps ` , ` deployScratchProtocol ` (step runner) |
796- | ` lib/env-flags.ts ` | ` isDGDeploymentEnabled ` , ` isResumeEnabled ` , ` isTruthyEnv ` |
797- | ` scripts/scratch/deploy-params-testnet.toml ` | All deploy parameters (` [dualGovernance] ` at the bottom) |
798- | ` scripts/scratch/steps/0145-unpause-sealables.ts ` | DG prerequisite: resume WQ + VEBO pre-role-transfer |
799- | ` scripts/scratch/steps/0150-transfer-roles.ts ` | Admin hand-off to Agent; defers WQ/VEBO renounce for DG |
800- | ` scripts/scratch/steps/0160-deploy-dual-governance.ts ` | Forge bridge + ResealManager wiring + template finalize |
801- | ` contracts/0.4.24/template/LidoTemplate.sol ` | ` finalizePermissions{After,Without}DGDeployment ` , ` setOwner ` |
802- | ` scripts/utils/upgrade.ts ` | Shared ` executeDGProposal ` helper |
803- | ` lib/state-file.ts ` | ` Sk ` enum, ` getAddress ` , ` tryGetAddress ` , state reset/persist |
804- | ` lib/config-schemas.ts ` | Zod schema for ` [dualGovernance] ` |
805- | ` test/integration/dual-governance/dg-scratch.integration.ts ` | Post-launch topology assertions + e2e proposal |
818+ | File | Role |
819+ | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
820+ | ` scripts/dao-deploy.sh ` | Entry point; wipes state file, compiles, runs ` migrate.ts ` |
821+ | ` scripts/utils/migrate.ts ` | Iterates ` steps.json ` , imports each step, calls ` main() ` |
822+ | ` lib/scratch.ts ` | ` applyDeploySteps ` , ` deployScratchProtocol ` (step runner) |
823+ | ` lib/env-flags.ts ` | ` isDGDeploymentEnabled ` , ` isCSMDeploymentEnabled ` , ` isCMv2DeploymentEnabled ` , ` isResumeEnabled ` |
824+ | ` scripts/scratch/deploy-params-testnet.toml ` | All deploy parameters (` [dualGovernance] ` at the bottom) |
825+ | ` scripts/scratch/steps/0145-unpause-sealables.ts ` | DG prerequisite: resume WQ + VEBO pre-role-transfer |
826+ | ` scripts/scratch/steps/0150-transfer-roles.ts ` | Admin hand-off to Agent; defers WQ/VEBO renounce for DG |
827+ | ` scripts/scratch/steps/0160-deploy-dual-governance.ts ` | Forge bridge + ResealManager wiring + template finalize |
828+ | ` contracts/0.4.24/template/LidoTemplate.sol ` | ` finalizePermissions{After,Without}DGDeployment ` , ` setOwner ` |
829+ | ` scripts/utils/upgrade.ts ` | Shared ` executeDGProposal ` helper |
830+ | ` lib/state-file.ts ` | ` Sk ` enum, ` getAddress ` , ` tryGetAddress ` , state reset/persist |
831+ | ` lib/config-schemas.ts ` | Zod schema for ` [dualGovernance] ` |
832+ | ` test/integration/dual-governance/dg-scratch.integration.ts ` | Post-launch topology assertions + e2e proposal |
806833
807834## Protocol Parameters
808835
0 commit comments