This guide describes how to migrate from Council daemon v1 to Council daemon v2.
This guide is for the Goerli test network.
Council daemon currently fetches keys from Node Operator Registry contract. In future validators set can be expanded with Community and DVT validators sets. In new protocol version Staking Router contract manages these different sets of validators. These sets implemented as Staking Modules of Staking Router. Currently only curated set (Node Operator Registry contract keys) exists. Council daemon v2 supports Staking Router contract.
For fetching keys from different Staking Modules Council daemon v2 uses Keys API service. Keys API is a simple HTTP API to fetch keys from staking modules contracts. It stores keys in a database. To read more about Keys API check document
The database is used as a caching layer of the Keys API. Since we will support a wide range of modules in the future, we need a database to store keys and other staking modules information in a more flexible way.
Using RabbitMQ is a step towards decentralization and reducing dependence on SaaS solutions.
The deployment consists of two parts:
Since the application was changed and it is important for us to keep the Consuls up and running during the upgrade, we need to leave the old Council daemon v1 instance running and start the new Council daemon v2.
You can read how to start a new build of the application in the guide. This document contains the configuration files and a short guide on how to run Council daemon v2.
In the result of voting for the protocol upgrade to v2, Council daemon v2 will switch to Staking Router contract automatically and start handling deposits and pauses. Council daemon v1 will handle deposits and pauses before voting.
We have added the following logs to the application to check switching to new contracts, where they indicate that the contract addresses have changed.
The addresses will be different, not as in the example.
To update, we need to run a new build of the application (Council daemon v2) without turning off the old build (Council daemon v1). In order to start a new build it is necessary to fill in the file with ENV variables. There is an example below to fill out. Data for RabbitMQ will be sent to your personal messages.
The completed configuration file must be named as .env
Next, take the docker-compose configuration file and put it next to the completed .env
file.
After installing the docker-compose file and the .env configuration file, simply type the command:
Next, we can read the log:
In this step, it is important to make sure that you have not shut down the old application instance. We will let you know when you can turn it off.
You may have errors in your logs but this should not interfere with the functionality of the application.
After March 20th we will enact the vote and advise when you can disable the old instance.