Cosmovisor Q&A
Cosmovisor is a commonly used tool in the Cosmos ecosystem. Its main purpose is to automatically upgrade the nodes in the Cosmos ecosystem. It is a gift of many validators, and it is also a software often used by old cats.
But automation is also a double-edged sword, and it’s easy to be caught off guard when the unexpected happens, and it’s a dilemma. The LikeCoin mainnet will be upgraded in July, and it also advocates the use of Cosmovisor. You can refer to the official documents for how to set it up. Lao Mao shares practical experience here for reference:
Cosmosvisor parameters
Q: What are the parameters of Cosmovisor? What settings are proposed?
Answer: DAEMON_HOME, DAEMON_NAME are required, DAEMON_ALLOW_DOWNLOAD_BINARIES, DAEMON_RESTART_AFTER_UPGRADE are true, UNSAFE_SKIP_BACKUP proposal is true.
Q: Where are the Cosmovisor parameters set?
A: In addition to being used as an environment parameter in the Systemd configuration file, it is recommended to also set it as an environment parameter for Liked users, so that cosmovisor can be directly executed.
Q: UNSAFE_SKIP_BACKUP proposes true - wouldn't it be dangerous to not do a backup?
A: Backups are generally quite time-consuming. Instead of doing backups during the upgrade, it is recommended to make backups on the day of the upgrade (but pay attention to the reserved time), and would rather chase blocks when there is an accident. The ideal is to have a backup node without Cosmovisor, and stop at the last block before the upgrade when upgrading.
Q: Is it not recommended to use the DAEMON_ALLOW_DOWNLOAD_BINARIES (automatic download) setting?
Answer: The old cat experience is that the automatic download is quite safe, and the old cat generally uses manual methods to prepare for the upgrade recently, to reduce the risk caused by downloading, and DAEMON_ALLOW_DOWNLOAD_BINARIES is true as a backup setting.
How to set up Cosmovisor for the first time?
A: Create cosmovisor/genesis/bin in Liked's data directory, copy the executable file of the current version to this directory, and execute cosmovisor. It is proposed to determine the success of the setting by direct execution (remember to set the environment parameters), and then execute the cosmovisor with the systemd service.
How do I manually configure a Cosmovisor upgrade?
A: Determine the upgrade directory path (cosmovisor/upgrade/<version>/bin), create this directory path in the Liked data directory, and copy the prepared upgrade version executable file to this directory. Among them, the <version> must be very accurate (if the upgrade instructions are unclear, the proposal should be confirmed with the team), and there should be no mistakes, otherwise the setting is wrong, and it must be downloaded automatically. The premise is of course running on the node cosmovisor.
Upgrade with Cosmovisor, what should I do if there is an accident?
A: If there is any accident during the execution of cosmovisor, I do not know how to deal with it. You can stop using cosmovisor and use liked directly. The setting of cosmovisor will not affect the execution of liked. After the upgrade, you can set it up as you did for the first time you set up Cosmovisor.
Good Luck! Validators.
Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!
- Author
- More