状态同步 (Statesync)
For new validator nodes or full nodes, statesync can help reduce the time required to catch up to the current block, especially when chain history grows for a long time.
对于新的验证节点或全节点,statesync 可以帮助减少追平当前区块所需的时间,尤其是当链历史长时间增长后。
These are the settings we currently use for sei pruning and snapshotting for statesync
这些是我们目前用于状态同步的 sei 修剪和快照的设置
Pruning Settings 修剪设置: default
Snapshot Settings 快照设置 :
If you start a new node, you can quickly get caught up on the sei chains by configuring your statesync settings prior to starting the seid
process. Below are instructions on how to enable statesync for your node along with specific configurations per sei chain environment.
如果您启动一个新节点,您可以通过在启动“seid”过程之前,设置您的同步配置来快速追平 sei 链。以下是如何为您的节点启用状态同步以及每个 sei 链环境特定配置的说明。
配置Statesync (Configuring Statesync)
Set the RPC address that your would like to use for statesync: 设置您希望用于 statesync 的 RPC 地址:
The RPC Address to set differs by chain environment 设置的RPC地址因链环境而异
Sei 激励测试网 (Sei Incentivized Testnet)
Sei开发网 (Sei Devnet)
Get the current block info: 获取区块信息:
Get trust height and trust hash info for the block snapshot-interval
blocks previous (1000 in the case of default pruning) and set it to TRUST_HEIGHT
and TRUST_HASH
respectively
获取区块快照块snapshot-interval
先前的信任高度和信任哈希信息(默认修剪情况下为 1000)并将其分别设置为 TRUST_HEIGHT
和 TRUST_HASH
Update config.toml file with the RPC_ADDRESS
, TRUST_HEIGHT
, and TRUST_HASH
using the following command:
使用以下命令,用 RPC_ADDRESS
、TRUST_HEIGHT
和 TRUST_HASH
更新 config.toml 文件:
Reset the chain history: 重置链历史:
You may also need to set the node as a persistent peer: 您可能还需要将节点设置为持久对等点:
The persistent peer to set differs by chain environment 要设置的持久对等点因链环境而异
Sei激励性测试网 (Sei Incentivized Testnet)
Sei开发网 (Sei Devnet)
You can now start your chain and it should find snapshots and catch up. Once you are fully caught up, you may want to disable statesync to avoid any issues when restarting the chain in the future such as during upgrades:
您现在可以启动您的链,它应该会找到快照并追平。一旦你完全追平了,可能会想要禁用 statesync ,进而避免将来重启链时出现任何问题,比如在升级期间:
最后更新于