Upgrade Path
The resolver can be replaced without migrating data. This section explains how to deploy a new resolver and migrate watchers with zero downtime.
Why Upgrade?
The resolver contains the validation logic — data decoding, permission checks, structural validation, replacement handling. If a bug is found or new logic is needed, a new resolver can be deployed while the registry (and all its data) remains untouched.
Migration Steps
- Deploy the new resolver contract, pointing to the same EnergyRegistry
- Authorize the new resolver in the registry: registry.authorizeResolver(newResolver)
- Register a new schema on EAS with the new resolver address
- Announce the new schema UID to watchers
- Watchers update their SCHEMA_UID environment variable and continue attesting
- Once all watchers have migrated, pause the old resolver: oldResolver.pause()
- Deauthorize the old resolver: registry.deauthorizeResolver(oldResolver)
Note
During migration, both resolvers are active simultaneously. Attestations through either schema UID are valid and recorded in the same registry.
What Changes, What Stays
Changes:
✓ New resolver contract address
✓ New schema UID (registered with new resolver)
✓ Watchers update their SCHEMA_UID config
Does NOT change:
✗ Registry address
✗ Watcher IDs and ownership
✗ Project IDs and data
✗ Attester whitelists
✗ Energy accumulators
✗ Historical attestation data (in EAS)
✗ Period locks
✗ Replacement chainsEmergency Pause
The resolver owner can pause attestations at any time if a critical bug is discovered. Pausing blocks new attestations and replacements.
Solidity
// Pause attestations
resolver.pause()
// Resume attestations
resolver.unpause()