本次是一个大更新,官方计划的转主网的时间是 7月底。由于 1.35.0 的 release 已经放出,提前做一下升级。
基本的升级流程和以前版本一致,相同的部分略过不表。有一个小坑需要备忘一下

按以前的步骤git更新到目标版本, 然后运行 cabal_build_all.sh

编译遇错

提示错误退出,排除了网络问题后 发现缺少了东西

:~/git/cardano-node# $CNODE_HOME/scripts/cabal-build-all.sh
Deleting build config artifact to remove cached version, this prevents invalid Git Rev
Running cabal update to ensure you're on latest dependencies..
Downloading the latest package list from hackage.haskell.org
Package list of hackage.haskell.org is up to date at index-state 2022-07-05T07:45:23Z
Building..
Warning: Requested index-state 2022-02-18T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2022-02-17T23:17:49Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: cardano-crypto-class-2.0.0 (user goal)
[__1] rejecting: cardano-crypto-class:+secp256k1-support (conflict: pkg-config
package libsecp256k1-any, not found in the pkg-config database)
[__1] rejecting: cardano-crypto-class:-secp256k1-support (manual flag can only
be changed explicitly)
[__1] fail (backjumping, conflict set: cardano-crypto-class,
cardano-crypto-class:secp256k1-support)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: cardano-crypto-class,
cardano-crypto-class:secp256k1-support

Overwriting cabal.project.local to include cardano-addresses and bech32 ..
cabal: Could not resolve dependencies:
[__0] trying: cardano-crypto-class-2.0.0 (user goal)
[__1] rejecting: cardano-crypto-class:+secp256k1-support (conflict: pkg-config
package libsecp256k1-any, not found in the pkg-config database)
[__1] rejecting: cardano-crypto-class:-secp256k1-support (manual flag can only
be changed explicitly)
[__1] fail (backjumping, conflict set: cardano-crypto-class,
cardano-crypto-class:secp256k1-support)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: cardano-crypto-class,
cardano-crypto-class:secp256k1-support

翻了一下技术交流群的记录.. 走了点弯路 去检查 libsodium 什么的,其实都是无关的。
缺少的是 secp256k1 (其实错误日志上已经写了)

安装 secp256k1

cd ~/git
git clone https://github.com/bitcoin-core/secp256k1
cd secp256k1
git checkout ac83be33
./autogen.sh
./configure --enable-module-schnorrsig --enable-experimental
make && sudo make install

然后再运行 cabal_build_all.sh 编译顺利进行,问题解决。

这个 Secp256k1 居然是之前版本不需要的,但 1.35 的 release note 没有说明也不更新进 prereqs.sh , IOHK没有fork一个过来自己下面要去 bitcoin-core 那里拉git。 槽点略多。。。

额外提示:

  1. 偷懒不想每个relay都编译cnode , 但每台relay更新 1.35.0 的bin之前,都得把这个 secp256k1 给安装一下。
  2. 引用官方原话

With this version, the ledger state will need to be replayed from the genesis block, meaning that the initial synchronisation may be slow. Users should account for this when deploying the node.

升级后需要重新验证全部的块,第一次启动过程非常久... 要做好时间计划。


相关文档

https://docs.cardano.org/en/latest/

https://github.com/input-output-hk/cardano-node/blob/master/doc/getting-started/install.md

标签: cardano, cnode, build, cabal

添加新评论