3.2.2. mijin Catapult(v.2) version up¶
- creation-day:
Aug. 1, 2022
- update date:
Nov. 27, 2026
3.2.2.1. Upgrading to 1.0.3.11¶
Warning
Warning
Failure_Aggregate_V2_Prohibited で拒否されます。Failure_Aggregate_V3_Prohibited で拒否されます。両方が承認される期間はありません。/mijin/forks (see mijin Catapult(v.2) How to check status ).3.2.2.1.1. Changes in 1.0.3.11¶
Item |
Details |
|---|---|
catapult-server |
mijin-1.0.3.11 |
catapult-rest |
mijin-2.5.2-100311 (changed from restify to Fastify) |
MongoDB |
8.0.38. When upgrading from 1.0.3.6 (MongoDB 5.0), the data compatibility version (featureCompatibilityVersion) is raised one step at a time. mijin-init-tools does this automatically |
REST rate limit ( |
Requests are now counted per IP as the number of requests in each time window (for 30tps, 100 requests per 3.3 seconds). The average limit is the same, but if you send many requests in a short time, |
Owner of files and containers |
All node files (including those under |
REST additions |
|
3.2.2.1.2. Preparation¶
Before upgrading the first node, decide the following two things.
The order in which to upgrade nodes: api1 → api2 → peer1 → peer2 → …
The fork height
N(Step.3).
sudo ).3.2.2.1.2.1. Check the free space on the root volume (all nodes)¶
/). The current images stay, so the root volume needs free space for the new images.upgrade fails while pulling the images. Check the free space on all nodes before you upgrade the first node.Node |
Images pulled |
Free space needed (guideline) |
|---|---|---|
api node |
catapult-server, catapult-rest, MongoDB 8.0 (and the intermediate MongoDB versions when upgrading from 1.0.3.8 or earlier) |
10 GB or more |
peer node |
catapult-server |
5 GB or more |
Avail column of df -h /.$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 21G 8.0G 73% /
Note
3.2.2.1.3. Step.1 Install mijin-init-tools (all nodes)¶
uname -m ), verify the checksum, and place it at /usr/local/bin/mijin-init-tools.$ VERSION=0.1.2 $ BASE=https://tools.catapult.mijin.io/mijin-init-tools/$VERSION $ FILE=mijin-init-tools-linux-$(uname -m) $ cd /tmp $ curl -fsSLO "$BASE/$FILE" $ curl -fsSLO "$BASE/$FILE.sha256" $ sha256sum -c "$FILE.sha256" mijin-init-tools-linux-x86_64: OK $ sudo install -m 0755 -o root -g root "$FILE" /usr/local/bin/mijin-init-tools $ rm -f "$FILE" "$FILE.sha256" $ mijin-init-tools version
Warning
If sha256sum -c does not print OK, do not install the file; stop the work and contact support.
3.2.2.1.4. Step.2 Create the configuration file (all nodes)¶
/etc/mijin/init.yml from the settings used when the stack was created (the cfn-init metadata).$ sudo mijin-init-tools import-config
/etc/mijin/init.yml if there are no differences. The written content is displayed, so check that the hosts ( api_hosts, peer_hosts ) and the shared data storage location ( share_mode ) match the stack settings.v100311, as in catapult_version: v10039 -> v100311 (written).Warning
error: the settings in the metadata do not match the configs deployed on this node is displayed followed by the differing values, and init.yml is not written. This happens, for example, when the stack parameters were changed later. Do not write init.yml by hand to proceed; contact support.3.2.2.1.5. Step.3 Decide the fork height¶
height in /chain/info, and decide the fork height N with the following formula. Use the same N on all nodes.N = 今のブロック高 + (ノード数 × 1 台あたりの作業時間 ÷ ブロック生成時間) + 十分な余裕
Note
' separators, as in 5'405'000.3.2.2.1.6. Step.4 Upgrade (one node at a time)¶
$ sudo mijin-init-tools upgrade --fork-height <N>
upgrade installs the packages, updates the configuration files, upgrades the MongoDB data (on api nodes), changes the file ownership, and restarts the node.[upgrade] done is displayed at the end.Output |
Meaning |
|---|---|
|
The fork heights decided. From the second node on, the height recorded by the first node is used (even if |
|
The MongoDB data is being upgraded one step at a time (when upgrading from 1.0.3.6) |
|
This node has returned to voting and finalization has advanced. You may proceed to the next node |
Warning
upgrade finally waits up to 10 minutes for finalization to advance. If it does not advance, it displays finalization did not move and exits with an error. The upgrade itself is complete, but do not proceed to the next node. Check whether any other voting node has stopped; if one has, fix it by following When mijin Catapult(v.2) Finalization Stops before proceeding.error: line and contact support without proceeding to the next node. Running the same command again resumes from where it stopped./mijin/peersinfo you can check that the block heights and finalized heights of all nodes match.$ curl -s http://localhost:3000/mijin/peersinfo | jq -r '.[] | [.host, .height, .latestFinalizedBlock.height] | @tsv'
peer1.mijin.internal 558 528
peer2.mijin.internal 558 528
api1.mijin.internal 558 528
3.2.2.1.7. Step.5 Confirm that the fork height has been passed¶
transactionVersions in /mijin/forks. After the fork height, current becomes [3].$ curl -s http://localhost:3000/mijin/forks | jq .transactionVersions
3.2.2.2. Upgrading to 1.0.3.9 or earlier¶
Warning
Note
These steps assume Docker Compose v2 ( docker compose ). In environments running Compose v1, such as the free edition image, read it as docker-compose (with a hyphen). Note that the output format of the commands may differ depending on the Compose version.
3.2.2.2.1. Step.1¶
3.2.2.2.2. Step.2¶
Switch to the ‘catapult’ user running mijin.
$ sudo su - catapult
catapult@api1:~$
3.2.2.2.3. Step.3¶
Node |
Directories |
API/Dual |
mijin-catapult-package/package/api/catapult/ |
PEER |
mijin-catapult-package/package/peer/catapult/ |
For API nodes, move as follows
catapult@api1:~$ cd mijin-catapult-package/package/api/catapult/
catapult@api1:~/mijin-catapult-package/package/api/catapult$
3.2.2.2.4. Step.4¶
3.2.2.2.4.1. For API nodes¶
Four containers are running. Make sure that all States are Up. If there is something wrong, the state will be Exit instead of Up and you will be in a down state.
catapult@api1:~/mijin-catapult-package/package/api/catapult$ docker compose ps
Name Command State Ports
--------------------------------------------------------------------------------------------
catapult_api-node-broker_1 bash -c /bin/bash /scripts ... Up
catapult_api-node_1 bash -c perl /scripts/wait ... Up 0.0.0.0:7900->7900/tcp
catapult_db_1 docker-entrypoint.sh bash ... Up 27017/tcp
catapult_rest-gateway_1 docker-entrypoint.sh ash - ... Up 0.0.0.0:3000->3000/tcp
3.2.2.2.4.2. For PEER node¶
catapult@peer1:~/mijin-catapult-package/package/peer/catapult$ docker compose ps
Name Command State Ports
--------------------------------------------------------------------------------------
catapult_peer-node_1 bash -c /bin/bash /scripts ... Up 0.0.0.0:7900->7900/tcp
3.2.2.2.5. Step.5¶
Stop all mijin containers using Docker Compose.
3.2.2.2.5.1. All containers stopped¶
catapult@api1:~/mijin-catapult-package/package/api/catapult$ docker compose down
Stopping catapult_rest-gateway_1 ... done
Stopping catapult_api-node_1 ... done
Stopping catapult_db_1 ... done
Removing catapult_api-node-broker_1 ... done
Removing catapult_rest-gateway_1 ... done
Removing catapult_api-node_1 ... done
Removing catapult_db_1 ... done
Removing network catapult_default
3.2.2.2.5.2. After stopping, check the lock file and delete it if any.¶
catapult@api1:~/mijin-catapult-package/package/api/catapult$ ls -la /mnt/mijin/blocks/data/*.lock
---------- 1 catapult catapult 0 Jul 14 02:17 /mnt/mijin/blocks/data/broker.lock
---------- 1 catapult catapult 0 Jul 14 02:17 /mnt/mijin/blocks/data/server.lock
$ rm -rf /mnt/mijin/blocks/data/broker.lock /mnt/mijin/blocks/data/server.lock
3.2.2.2.6. Step.6¶
catapult@api1:~/mijin-catapult-package/package/api/catapult$ sed -i -e s/gcc-1.0.0.0/gcc-1.0.0.1/g docker-compose.yml
Note
3.2.2.2.7. Step.7¶
catapult@api1:~/mijin-catapult-package/package/api/catapult$ docker compose up -d
Creating network "catapult_default" with the default driver
Creating catapult_db_1 ... done
Creating catapult_rest-gateway_1 ... done
Creating catapult_api-node-broker_1 ... done
Creating catapult_api-node_1 ... done
