用快照启动EOS的状态历史节点

EOS状态历史节点可以使用快照方式来启动。

nodeos  \
 --plugin eosio::producer_api_plugin \
 --plugin eosio::chain_api_plugin \
  --plugin eosio::http_plugin \
 --http-server-address 0.0.0.0:8889 \
 --p2p-peer-address 127.0.0.1:9876 \
 --p2p-listen-endpoint 0.0.0.0:9877 \
 --plugin eosio::state_history_plugin --disable-replay-opts  --trace-history --chain-state-history \
 --resource-monitor-space-threshold 99 \
 --data-dir /eos/data \
 --snapshot /eos/data/snapshots/snapshot-00003153b2377b4eea65880311b6aaec4731b64990db594f063e67d78cf95615.bin \
 --delete-all-blocks

state-history目录中的文件会记录snapshot的时间之后的状态历史

chain_state_history.log
trace_histor y.log

--delete-all-blocks用来清空blocks和state目录下的文件,但不会清理state-history的文件。

用快照启动状态历史节点,会自动追加更新state-history下的日志文件,不必手工删除。如果删除则只会包含snapshot之后的数据。

Troubleshoot


  • --snapshot is incompatible with --genesis-json and --genesis-timestamp as the snapshot contains genesis information

注意不能同时配置“genesis-json”和“genesis-timestamp”两项,因为快照中已经存在这两项的值,会发生冲突,因为snapshot中已经包含了genesis信息。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值