v0.3.5-patch

FIRMACHAIN v0.3.5-patch Upgrade Guide

This document is a guide on upgrading FIRMACHAIN from v0.3.3 to v0.3.5-patch.

v0.3.3-patch(security patch) is identical to v0.3.3.

1. Summary

FIRMACHAIN will halt at block height 4,806,000 once the Mainnet(Colosseum) proposal passes. The expected time of the aforementioned halt is December 20, 2022 UTC 12:00. Following are the features once the network upgrades to v0.3.5-patch.

  • IBC V3 - Upgraded from V1 to V3. Includes Interchain Account

  • Wasmd - Module that enables cosmwasm. (The official version has been applied.)

  • Minimum Commission Rate - “Minimum Commission Rate” has been adjusted per the second Proposal. (0% -> 5%). If you set your commission rate below 5% or fail to specify a commission rate when running the edit-validator transaction, the commission rate will automatically be set to 5%. Additionally, users who have been charged a commission of less than 5% will be charged a fixed 5% commission post-upgrade.

[Upgrade features]

Following are the details on the module version change.

BeforeAfterOthers

Cosmos SDK

v0.44.5

v0.45.9

-

Tendermint

v0.34.14

v0.34.21

-

IBC

v1.2.2

v3.3.0

-

CosmWasm

-

v0.29.2

-

Chain Binary

v0.3.3

v0.3.5-patch

-

Minimum commission rate

0%

5%

2. Preparing for the Upgrade Binary

Prepare the FirmaChain v0.3.5-patch binary for the upgrade.

# You must install go, gcc and make in order to run the build.
sudo snap install go --classic
sudo apt install gcc
sudo apt-get install make

# Binary build
git clone https://github.com/firmachain/firmachain.git
cd firmachain
git checkout v0.3.5-patch
make install

This upgrade will not support the binary download method used in the previous upgrades. This is because with the addition of the CosmWasm module, users must install the "libwasmvm.so" library that suits the user’s respective operating system and version.

3. Stand by at upgrade height

Once the chain network reaches block height 4,806,000 on the v0.3.3, the network will display an “Error Message’ and will come to a halt. However, the process will still remain in alive state. If you see the following error message, please manually kill the nodes. (If you have registered using system service, you must STOP the service.)

# Error message
ERR UPGRADE "v0.3.5" NEEDED at height: 4806000:
panic: UPGRADE "v0.3.5" NEEDED at height: 4806000:

So you have to manually kill firmachaind process.

# using binary
pkill firmachaind

# using system service
sudo systemctl stop firmachaind

4. Backup (optional)

If you are faced with any problems during the upgrade, you might have to restart the upgrade from the original version. Therefore, we highly recommend you backup the original version of the network before upgrading. (Per Pruning Default approximately 200~250 GB expected)

tar -cvf firmachain_bak_20221207.tar .firmachain

Due to the large size of the chain folder, it might take some time to compress the folder. If you are currently using a cloud server, we recommend you use the snapshot feature on the instance server.

5. Restart to Upgrade Version

Once you’ve killed the chain, please change to v0.3.5 binary created using make install.

sudo mv ~/go/bin/firmachaind /usr/local/bin/firmachaind

Please check the version once you’ve prepared your binary. If the version information is different from the one mentioned in the “Code Block” below, please create a new binary or contact us to solve the issue.

# Check binary version
firmachaind version && firmachaind version --long
=> name: FirmaChain
   server_name: firmachaind
   version: 0.3.5-patch version --long
   ...
   cosmos_sdk_version: v0.45.9

# Check build
firmachaind version -- long | grep "wasm"
=> Output Message
- github.com/CosmWasm/wasmd@v0.29.2 => github.com/CosmWasm/wasmd@v0.29.2
- github.com/CosmWasm/wasmvm@v1.1.1

Once you’ve checked the version, please restart the chain.

# using binary
firmachaind start

# using system service
sudo systemctl start firmachaind

* To see the system service registration method, please visit the following link.

More than 67% of the total Validators must run the new binary in order for the block to initiate the building process. Please wait until the chain starts building new blocks.

6. Starting with Cosmovisor (Optional)

Cosmovisor is a chain binary process manager that monitors the chain upgrade proposals. Once the upgrade proposal “Pass”, Cosmovisor will automatically download the new version and once the network hits the designated block height in the proposal, the chain will restart using the downloaded binary.

Changing the binary file path of v0.3.3. If you are building the chain using Cosmovisor, the chain will restart using the chain binary in genesis/bin.

# v0.3.3 binary
sudo mv /usr/local/bin/firmachaind $DAEMON_HOME/cosmovisor/genesis/bin/firmachaind

Changing the binary file path of v0.3.5. Once the block height reaches the predesignated height, Cosmovisor will automatically select the appropriate version in the Upgrade path to restart the chain.

# v0.3.5 binary
mv go/bin/firmachaind $DAEMON_HOME/cosmovisor/upgrades/v0.3.5/bin/firmachaind

If you start using Cosmovisor, the process will start from the binary in the genesis. At the upgrade block height, the chain will automatically restart with the v0.3.5 binary.

cosmovisor run start

7. Notes for reference

If you have any issues in the chain upgrade process please contact us for support. E-mail: contact@firmachain.org

Last updated