`tezos-client bootstrapped`:为什么退出得太早,真的没有等待引导到网络?
1 个回答
- 投票数
在区块链或节点上没有指示器可以知道链是最新的还是"自举的".这就是区块链的工作方式.任何时候都可能有新的区块或链的新分支.您的节点知道区块链的本地存储版本是否是真相的唯一方法是询问网络上的其他节点对等点.如您所知,方法是通过tezos-client bootstrapped
.
所以问题归结为,为什么tezos-client bootstrapped
行为不正确?为什么不在时"撒谎"给您?关键是配置,以便在我们完全可以确定自己被引导之前,确定要与多少节点对等进行确认的阈值.简而言之,在启动节点时,您将需要以下内容:
./tezos-node run --bootstrap-threshold=10
这将与10个对等方确认,然后您将看到通过tezos-client bootstrapped
进行的"bootstrapped"确认.
仅供参考,这是运行./tezos-node run help
的节点手册页中有关该参数的官方描述:
--bootstrap-threshold=NUM
Set the number of peers with whom a chain synchronization must be
completed to bootstrap the node
There is no indicator on the blockchain or the node to know if the chain is at latest or "bootstrapped". That's how blockchains work. At any moment there could be a new block or a new fork of the chain. The only way for your node to know if your local stored version of the blockchain is the source of truth is by asking other node peers on the network. As you already know, the way to do this is via tezos-client bootstrapped
.
So the question comes down to, why isn't tezos-client bootstrapped
behaving correctly? why is it "lying" to you when it isn't? The key is the configuration to set the threshold for how many node peers to confirm with before we can confidently agree that we are bootstrapped. Simply put, when starting your node, you would want something like this:
./tezos-node run --bootstrap-threshold=10
This would confirm with 10 peers before you would see "bootstrapped" confirmation using tezos-client bootstrapped
.
FYI, here is the official description for the argument from the node man page by running ./tezos-node run help
:
--bootstrap-threshold=NUM
Set the number of peers with whom a chain synchronization must be
completed to bootstrap the node
当我们从头开始启动Tezos节点时,需要很长时间进行引导.我们可以使用
tezos-client bootstrapped
命令监视进度.但是,该命令通常在引导的早期阶段退出,并告诉
Bootstrapped.
是什么意思?是命令的错误,还是
Bootstrapped
的概念与我所拥有的完全(或几乎完全)数据库同步不同?而且,当前建议的检查我的节点是否完全引导的方法是什么?(当然,我可以定期使用
tezos-client bootstrapped
命令查看当前状态,但这有点乏味...)