恢复操作(Recovery Operations)

本页讨论了在链遇到问题时验证者和节点运营者需要采取的操作 This page discusses operations that validators and node operators will need to take if the chain runs into issues

创建备份 (Creating backups)

There are 3 things should always backup when trying to recover your node. Failure to do any of these may result in your keys being permanently lost or your validator double signing and kicked out.

尝试恢复节点时,应始终备份3样东西。否则都可能导致您密钥永久丢失或您验证者双重签名然后被踢出。

  • $HOME/.sei/data/priv_validator_state.json - this file keeps track of what round of consensus you are voting on. When using someone else's snapshot, not replacing this results in double signing / tombstoning. You can run $HOME/.sei/data/priv_validator_state.json -这个文件记录了你投票的共识轮数。使用其他人的快照时,不替换它会导致双重签名/逻辑删除。你可以运行:

cp $HOME/.sei/data/priv_validator_state.json $HOME/.sei
cat $HOME/.sei/data/priv_validator_state.json -> Save to Lastpass, password manager...etc.
  • $HOME/.sei/config/priv_validator_key.json- this file contains the private key that your validator signs blocks with. If you lose this, it becomes more difficult to recover a halted chain since we lose your voting power permanently $HOME/.sei/config/priv_validator_key.json- 此文件包含您验证者用来签署区块的私钥。如果您不幸丢失,恢复停止的链会变得更加困难,因为我们会永久失去你的投票权

cp $HOME/.sei/config/priv_validator_key.json $HOME/.sei
cat $HOME/.sei/data/priv_validator_skey.json -> Save to Lastpass, password manager...etc.
  • Any keys. Anything in seid keys list should be saved (both the mnemonic and the key). Failure to save this may result in losing your funds 任何秘钥。 seid keys list 中的任何内容都应保存(助记符和密钥)。未保存可能会导致您的资金损失

seid keys add $NAME -> Save output to Lastpass, password manager...etc.
seid keys export $NAME -> Save output to Lastpass, password manager...etc.

状态同步 (State Sync)

You can use state sync to resolve corrupt data issues that you may have run into if you used the wrong seid version when starting the chain. Instructions for State Sync can be found here.

如果在启动链时使用了错误的 seid 版本,您可以使用状态同步,来解决可能遇到的数据损坏。可以在 此处 找到状态同步的说明。

从快照回复 (Recover from snapshot)

When state sync is not working or there are no available state sync providers, you'll need to recover from a file-based snapshot that is provided. However, caution must be taken as to not lose any of the files that should have been already backed up.

当状态同步不起作用或没有可用的状态同步提供者时,您将需要用提供的基于文件的快照中恢复。但是,请务必注意不要丢失任何应该已经备份的文件。

Given a snapshot, please run these commands to ensure you don't accidentally overwrite your priv_validator_state.json file

对任意快炒,请运行这些命令,来确保您不会意外覆盖您的 priv_validator_state.json 文件

sudo systemctl stop seid
# BACKUP ~/.sei/config/priv_validator_key.json
cp $HOME/.sei/data/priv_validator_state.json $HOME/.sei
seid tendermint unsafe-reset-all --keep-addr-book --home $HOME/.sei
### untar the backup into the sei folder (NOTE: this will vary depending on who provides the snapshot)###
tar -xzf atlantic-sub1-data-backup.tar.gz --directory $HOME/.sei
rm $HOME/.sei/data/priv_validator_state.json
cp $HOME/.sei/priv_validator_state.json $HOME/.sei/data
sudo systemctl start seid
rm $HOME/.sei/priv_validator_state.json

未解决的问题列表 (List of Open Issues)

Below, we detail various open issues the team has encountered and how we can work around them.

下面,我们会详细介绍团队遇到的各种未解决问题以及我们如何解决这些问题。

Wasm CPU 架构问题 (Wasm CPU architecture issue)

This issue arises when you try to use a $HOME/wasm/ directory that was generated by a machine with a different architecture. An example of a log you will see is:

当您尝试使用由具有不同体系结构的机器生成的 $HOME/wasm/ 目录时,会出现此问题。您将看到的日志示例如下:

Sep 06 18:35:26 Ubuntu-2004-focal-64-minimal seid[1127368]: 6:35PM ERR Error calling the VM: Error instantiating a Wasm module: Error instantiating module: CpuFeature("EnumSet(AVX512DQ | AVX512VL | AVX512F)"): execute wasm contract failed

To fix this, please use State Sync to rebuild your wasm/ directory.

要解决此问题,请使用状态同步来重建您的 wasm/ 目录。

应用哈希错误 (App Hash errors)

There are a few scenarios where this may arise: 导致这种问题的情况有:

  • 1.Nondeterminism in sei-chain code sei-chain 代码中的非确定性

  • 2.Incorrect seid/genesis file 不正确的 seid/genesis 文件

In these cases, you will need to restore using someone else's data and then continuing to run your chain with the correct seid version

在这些情况下,您将需要使用其他人的数据进行恢复,然后继续使用正确的 seid 版本运行您的链

在共识回合/轮次中落后 (Falling behind in consensus rounds)

If the chain is halted for a prolonged amount of time, we have encountered issues where some validators may end up falling behind in consensus rounds. I.e.

如果链长时间停止,我们会遇到一些验证者可能最终在共识轮次中落后的问题。比如:

curl localhost:26657/consensus_state | jq '.round_state.height_vote_set[-1].round'

This differs from what other validators are seeing. Please work with a member on the Sei team to figure out the right consensus round. Next, please change the following configs to 5ms

这与其他验证者看到的不同。请与 Sei 团队的成员一起找出正确的共识轮次。接下来,请将以下配置更改为 5ms

timeout_propose_delta = "500ms"
timeout_prevote_delta = "500ms"
timeout_precommit_delta = "500ms"

Once this is done, restart seid, monitor the consensus round until it's about 1 round ahead of what everyone else is on, then change the values back to 500ms

完成此操作后,重新启动 seid,监控共识轮,直到比其他人领先大约 1 轮,然后将值改回“500ms”

最后更新于