升级本地节点到EOS 1.8.0

in #cn5 years ago

昨天的帖子提到编译了 EOS 1.8.0,但是单单编译可还不够,还要将之前运行的v1.7.4版本的节点升级到v1.8.0才行。


(图源 :pixabay)

不过因为这次是共识升级(硬分叉)版本,所以以往的直接替换是行不通的啦。

删除bnet plugin设置

首先我们要删除之前bnet相关设置,因为在v1.8.0中bnet已经彻底不被支持啦。

如果没有删除相关设置,运行v1.8.0版本的话,就会出现类似如下unrecognised option错误:

error 2019-06-30T01:39:04.740 nodeos main.cpp:120 main ] Throw location unknown (consider using BOOST_THROW_EXCEPTION)
Dynamic exception type: boost::wrapexcept<boost::program_options::unknown_option>
std::exception::what: unrecognised option 'bnet-follow-irreversible'

删除相关目录

因为是共识协议升级,所以新版本的chainbase和之前版本chainbase是不兼容的,在运行新版本之前需要删除data目录下的如下内容:

  • blocks/reversible directory
  • state-history directory
  • state directory

如果没有删除上述目录就开始运行v1.8.0,那么就会出现如下错误:

N5boost10wrapexceptISt13runtime_errorEE: chainbase database format not compatible with this version of chainbase.

Replay

当做完上述工作后,再次重启v1.8.0的nodeos,系统会自动进行replay。

不过看起来,replay是一个漫长的工作,我这跑了约12个小时,才将将完成1/4,目测全部完成,需要2天以上。

升级指南中的步骤

把升级指南中的步骤附一份,供大家参考。

  • Ensure that their existing node is running the most recent stable release (1.7) of nodeos and then shut down nodeos.

  • Make a backup and delete the blocks/reversible directory, state-history directory, and state directory within the data directory.

  • Replace their old version of nodeos with the new release.

  • Start the new 1.8 release of nodeos and let it complete replay from genesis and catch up with syncing with the network. The node should receive blocks and LIB should advance. Nodes running v1.8 and v1.7 will continue to coexist in the same network prior to the activation of the first protocol upgrade feature.

相关链接


Vote For Me As Witness
https://steemit.com/~witnesses type in oflyhigh and click VOTE

Vote @oflyhigh via Steemconnect
Thank you!

Sort:  

Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!

1.8了,Voice差不多要出来了

Posted using Partiko iOS