Validator Upgrade Guide
Before upgrading, check the changelog for the target version to determine whether the upgrade is breaking or non-breaking.
| Upgrade Type | How to Identify | Database | Downtime |
|---|---|---|---|
| Non-breaking | Patch/minor release, no consensus contract changes | Carries over | Minimal |
| Breaking | Changelog mentions "upgrade consensus contracts" or new consensus deployment | Must be deleted | Full restart required |
π‘
When in doubt, treat it as a breaking change β the only cost is a longer sync time.
Non-Breaking Upgrade
No re-staking is required. You can minimize downtime by preparing the new version while your current node is still running.
- Download and extract into a fresh folder β See download instructions. Always use a clean directory.
- Configure the new version β Set up
config.yamland.envas described in the configuration section. You can reference your previous settings, but do not blindly copy config files β new versions may include updated defaults or new fields. - Copy the data folder β Copy
data/from your old installation to the new one (contains database and keystore). Skip this if yourdatadirpoints outside the project directory. - Validate β Run
./bin/genlayernode doctorand ensure all checks pass. - Switch over β Stop the old node, then start the new one.
Breaking Change Upgrade
Breaking changes involve a new consensus deployment. The old database is incompatible, so it cannot be reused. Re-staking is required β you must stake again using the validator wizard.
β οΈ
Always back up your keystore before a breaking upgrade. You can copy the data/node/keystore/ directory or use genlayernode account export. See backing up your operator key.
- Read the changelog β Check the changelog for version-specific instructions and what changed.
- Back up your keystore β Copy
data/node/keystore/to a safe location. - Download and extract into a fresh folder β See download instructions.
- Configure from scratch β Create
config.yamland.envusing the new example files as a base. Do not copy your old config β the schema may have changed. Refer to the configuration section for the current format. - Import your operator key β Copy your backed-up keystore into
data/node/keystore/, or re-import using the CLI. See restoring your operator key. - Do NOT copy the old database β Delete
data/node/genlayer.dbif you accidentally copied the fulldata/folder. The node will create a fresh database and sync from genesis. - Validate β Run
./bin/genlayernode doctorand ensure all checks pass. - Stop the old node, start the new one.
Migration Notes
v0.4.x to v0.5.0 (Breaking)
- The two consensus contract addresses (
contractmainaddressandcontractdataaddress) have been replaced by a singleconsensusaddressfield. Do not copy your old consensus config β use the new exampleconfig.yaml. - The GenLayer Chain ZKSync RPC URLs (
genlayerchainrpcurlandgenlayerchainwebsocketurl) have changed. Update both the HTTP RPC and WebSocket URLs in yourconfig.yamlto the new endpoints. - Database must be wiped (the node creates a fresh one on startup).
- Re-staking is required β breaking changes involve a new consensus deployment, so you must stake again using the validator wizard.
Quick Troubleshooting
- Node won't start β Run
./bin/genlayernode doctor. If it reports unknown config fields, reconfigure from the new example. - Not participating in consensus β Verify the consensus contract address,
validatorWalletAddress, andoperatorAddressare correct. - Key errors β Your operator key wasn't imported. See restoring your operator key.
- Slow sync after breaking upgrade β Expected. Ensure
genesisis set inconfig.yamlto avoid scanning from block 0.