Cardano Node (cnode) 1.29.0 升级 备忘
今日github正式发布了 1.29.0 的cnode,应对将至的 9月12日 Alonzo hard fork
以下是升级节点的概要流水账
1. git 拉取源码,编译
和以前的版本操作无异,略过不表
https://github.com/input-output-hk/cardano-node/releases
2. 下载 Alonzo 的 genesis 文件,并添加至节点配置文件
genesis下载地址(选mainnet):
把文件保存到以下路径
: $CNODE_HOME/files/
编辑 config.json
添加两行
cd $CNODE_HOME/files/
vi config.json
注意文件名和路径以实际情况为准
"AlonzoGenesisFile": "/opt/cardano/cnode/files/mainnet-alonzo-genesis.json",
"AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
添加完保存。
3. 重启节点
此时bin文件应已编译替换完成,可以首先检查验证以下版本和hash是否正确
root@ada2:/opt/cardano/cnode/files# cardano-cli version
cardano-cli1.29.0
- linux-x86_64 - ghc-8.10
git rev4c59442958072657812c6c0bb8e0b4ab85ce1ba2
root@adalocal2:/opt/cardano/cnode/files# cardano-node version
cardano-node1.29.0
- linux-x86_64 - ghc-8.10
git rev4c59442958072657812c6c0bb8e0b4ab85ce1ba2
这样就代表ok了,启动节点
如果是直接把bin文件复制替换的其他机器节点,可能会因为依赖的欠缺或版本不一致会导致启动失败报错:
cardano-node: symbol lookup error: cardano-node: undefined symbol: crypto_vrf_publickeybytes
此时最简单的做法是运行一次 cntools的 prereq.sh
,自动打完补丁后即可解决问题。
root@ada2:~/tmp# ./prereqs.sh
A new version of prereqs script is available, do you want to download the latest version? (yes/no): no
Using apt to prepare packages for "Ubuntu" system
Updating system packages...
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
W: Failed to fetch https://dl.yarnpkg.com/debian/dists/stable/InRelease The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
W: Some index files failed to download. They have been ignored, or old ones used instead.
Installing missing prerequisite packages, if any..
Installing GHC v8.10.4 ..
... ...
./prereqs.sh: line 252: ghc: command not found
Uninstalling Cabal v3.2.0.0 ..
[ Warn ] New GHCup version available: 0.1.16.2. To upgrade, run 'ghcup upgrade'
[ Warn ] New GHC version available: 8.10.3. To upgrade, run 'ghcup install ghc 8.10.3'
Installing Cabal v3.4.0.0..
[ Warn ] New GHCup version available: 0.1.16.2. To upgrade, run 'ghcup upgrade'
[ Warn ] New GHC version available: 8.10.3. To upgrade, run 'ghcup install ghc 8.10.3'
[ Error ] No available Cabal version for 3.4.0.0
Creating Folder Structure ..
Environment Variable already set up!
IOG fork of libsodium installed to /usr/local/lib/
Downloading files...
流水账备忘-毕。
