Upgrade MultiGov Contracts#
MultiGov is designed to be flexible but stable. Upgrades should be rare and carefully considered due to the system's complexity and cross-chain nature. When upgrades are necessary, they must be meticulously planned and executed to ensure system integrity and continuity.
Key Considerations for Upgrades#
-
HubGovernor:- Not upgradeable. A new deployment requires redeploying several components of the MultiGov system. Refer to the Process for Major System Upgrade section for more details
-
HubVotePool:- Can be replaced by setting a new
HubVotePoolon theHubGovernor - Requires re-registering all spokes on the new
HubVotePool - Must register the query type and implementation for vote decoding by calling
registerQueryTypeon the newHubVotePool - A new proposal would have to authorize the governor to use the newly created hub vote pool and will also handle registering the appropriate query decoders and registering the appropriate spoke
SpokeVoteAggregators
- Can be replaced by setting a new
-
SpokeMessageExecutor:- Upgradeable via UUPS proxy pattern
- Stores critical parameters in
SpokeMessageExecutorStorage
-
HubEvmSpokeAggregateProposer:- Needs redeployment if
HubGovernorchanges - Requires re-registering all spokes after redeployment
- Needs redeployment if
-
HubProposalMetadata:- Needs redeployment if
HubGovernorchanges, as it referencesHubGovernoras a parameter
- Needs redeployment if
-
SpokeMetadataCollector:- Requires redeployment if the hub chain ID changes or if
HubProposalMetadatachanges
- Requires redeployment if the hub chain ID changes or if
Process for Major System Upgrade#
- New
HubGovernordeployment:- Deploy the new
HubGovernorcontract
- Deploy the new
- Component redeployment:
- Redeploy
HubEvmSpokeAggregateProposerwith the newHubGovernoraddress - Redeploy
HubProposalMetadatareferencing the newHubGovernor - If hub chain ID changes, redeploy
SpokeMetadataCollectoron all spoke chains
- Redeploy
HubVotePoolupdate:- Set the new
HubVotePoolon the newHubGovernor - Register all spokes on the new
HubVotePool - Register the query type and implementation for vote decoding (
HubEvmSpokeVoteDecoder)
- Set the new
- Spoke re-registration:
- Re-register all spokes on the new
HubEvmSpokeAggregateProposer
- Re-register all spokes on the new
- Verification and testing:
- Conduct thorough testing of the new system setup
- Verify all cross-chain interactions are functioning correctly
- System transition and deprecation:
- Create a proposal to switch the timelock to the new governor
- Communicate clearly to the community what changes were made
- Monitoring:
- Implement a transition period where the new system is closely monitored
- Address any issues that arise promptly
Important Considerations#
- Always prioritize system stability, upgrades should only be performed when absolutely necessary
- Thoroughly audit all new contract implementations before proposing an upgrade
- Account for all affected components across all chains in the upgrade plan
- Provide comprehensive documentation for the community about the upgrade process and any changes in functionality
- Always test upgrades extensively on testnets before implementing in production