Upgrade Process
Locale Network provides upgrade process templates that City Chains can adopt for managing protocol changes. These are not built-in systems—each community configures upgrade governance according to their security requirements and decentralization goals.
The upgrade processes described here are templates. Each City Chain implements upgrade governance according to their community's requirements for security, speed, and decentralization.
Upgrade Types
Parameter Changes
Adjustments to existing protocol values:
| Examples | Risk Level | Typical Process |
|---|---|---|
| Gas limits | Low | Council vote |
| Fee percentages | Low | Community vote |
| Timelock durations | Medium | Supermajority vote |
| Quorum thresholds | Medium | Supermajority vote |
Contract Upgrades
Changes to smart contract logic:
| Examples | Risk Level | Typical Process |
|---|---|---|
| Bug fixes | Medium | Council + short timelock |
| Feature additions | Medium | Community vote + timelock |
| Core logic changes | High | Supermajority + long timelock |
| Proxy updates | High | Supermajority + audit |
Infrastructure Changes
Updates to underlying systems:
| Examples | Risk Level | Typical Process |
|---|---|---|
| Sequencer updates | Medium | Council decision |
| Node software | Medium | Coordinated rollout |
| Bridge contracts | High | Supermajority + audit |
| L1 contract changes | Critical | Full governance + audit |
Governance Process
Standard Upgrade Flow
Proposal Requirements
| Requirement | Description |
|---|---|
| Technical Specification | Detailed description of changes |
| Code Changes | Diff or implementation details |
| Security Analysis | Risk assessment and mitigations |
| Testing Results | Testnet deployment and testing |
| Rollback Plan | How to revert if issues arise |
Voting Requirements
| Upgrade Type | Quorum | Threshold | Voting Period |
|---|---|---|---|
| Parameter | 4% | 50% | 3 days |
| Minor Upgrade | 6% | 60% | 5 days |
| Major Upgrade | 10% | 66% | 7 days |
| Critical Change | 15% | 75% | 14 days |
Timelock System
Purpose
Timelocks provide a delay between vote approval and execution:
| Benefit | Description |
|---|---|
| Review Period | Time to catch issues |
| Exit Window | Users can exit before changes |
| Challenge Period | Guardian can cancel malicious upgrades |
| Transparency | All changes visible before effect |
Timelock Durations
| Change Type | Timelock | Reasoning |
|---|---|---|
| Parameter Adjustment | 24-48 hours | Low risk, faster iteration |
| Contract Upgrade | 7 days | Standard security window |
| Core Protocol Change | 14 days | Maximum review time |
| Emergency Fix | 4-24 hours | Balance speed and security |
Emergency Procedures
Guardian Powers
For early-stage City Chains, a Guardian multi-sig can:
| Action | Requirement | Use Case |
|---|---|---|
| Pause Contracts | 2-of-5 | Active exploit |
| Emergency Upgrade | 4-of-5 | Critical vulnerability |
| Cancel Proposal | 3-of-5 | Malicious upgrade detected |
| Reduce Timelock | 4-of-5 | Urgent fix needed |
Emergency Process
- Detection — Identify critical issue
- Assessment — Guardian evaluates severity
- Pause — If needed, pause affected contracts
- Fix Development — Create and test patch
- Fast-Track Vote — Shortened voting period
- Expedited Execution — Reduced timelock
- Post-Mortem — Document incident and response
Pause Functionality
| Pause Level | Effect | Authority |
|---|---|---|
| Partial | Specific functions disabled | 2-of-5 Guardian |
| Full | All non-essential operations paused | 3-of-5 Guardian |
| Emergency | Complete protocol pause | 4-of-5 Guardian |
Upgrade Patterns
Proxy Upgrades
Upgradeable contracts using proxy pattern:
| Component | Description |
|---|---|
| Proxy Contract | Fixed address, delegates calls |
| Implementation | Contains logic, can be upgraded |
| Admin | Governance-controlled upgrade authority |
| Storage | Preserved across upgrades |
Modular Upgrades
Separate contracts for different functions:
| Advantage | Description |
|---|---|
| Isolated Risk | Change one module without affecting others |
| Easier Testing | Test modules independently |
| Parallel Development | Multiple upgrades simultaneously |
| Gradual Rollout | Upgrade modules one at a time |
Feature Flags
Enable/disable features without code changes:
| Use Case | Description |
|---|---|
| Gradual Rollout | Enable for subset of users |
| Quick Disable | Turn off problematic features |
| A/B Testing | Compare different implementations |
| Emergency Kill Switch | Instant feature shutdown |
Security Considerations
Audit Requirements
| Upgrade Type | Audit Requirement |
|---|---|
| Parameter Change | Internal review |
| Minor Feature | Internal + external review |
| Major Upgrade | Full external audit |
| Core Protocol | Multiple independent audits |
Testing Requirements
| Test Type | Description | When Required |
|---|---|---|
| Unit Tests | Individual function tests | All changes |
| Integration Tests | Cross-contract interactions | Feature changes |
| Fork Tests | Simulate on mainnet state | Major upgrades |
| Testnet Deploy | Full environment testing | All upgrades |
Risk Assessment
| Risk Category | Considerations |
|---|---|
| Technical | Code bugs, unexpected interactions |
| Economic | Token value impact, treasury effects |
| Security | New attack vectors, permission changes |
| Operational | Upgrade execution, rollback ability |
Decentralization Path
Upgrade Authority Evolution
| Phase | Upgrade Authority | Guardian Role |
|---|---|---|
| Launch | Guardian + lite governance | Full emergency powers |
| Growth | Community vote + Guardian veto | Emergency only |
| Mature | Full community governance | Expired or minimal |
| Decentralized | Token holder governance | None |
Reducing Guardian Powers
| Milestone | Action |
|---|---|
| 6 months | Remove parameter change authority |
| 12 months | Remove non-emergency upgrade authority |
| 18 months | Remove veto power |
| 24 months | Guardian sunsets completely |
Implementation Guide
Setting Up Upgrade Governance
- Deploy Timelock — Configure delay periods
- Deploy Governor — Set voting parameters
- Configure Proxies — Point to timelock as admin
- Set Up Guardian — Initialize multi-sig
- Test Upgrades — Simulate on testnet
- Document Process — Clear upgrade procedures
Upgrade Checklist
| Step | Action |
|---|---|
| ☐ | Write technical specification |
| ☐ | Complete code changes |
| ☐ | Run all tests |
| ☐ | Deploy to testnet |
| ☐ | Conduct security review |
| ☐ | Submit governance proposal |
| ☐ | Community discussion period |
| ☐ | Voting period |
| ☐ | Timelock waiting period |
| ☐ | Execute upgrade |
| ☐ | Monitor for issues |
| ☐ | Document completion |
Learn More
- Local Governance Model — Overall governance framework
- Voting Mechanisms — How decisions are made
- Treasury Management — Fund allocation governance
- Architecture Overview — Technical foundation