1

我正在尝试设置一个 4 节点 Indy 网络,但在尝试连接时出现“无效库状态”错误。这是我尝试过的:

# MACHINE 1:

sudo -E apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
bash -c 'echo "deb https://repo.sovrin.org/deb xenial stable" >> /etc/apt/sources.list'
sudo -E apt-get update
sudo -E apt-get -y install indy-node
sudo vim /etc/indy/indy_config.py # update network name to 'indynet'

sudo init_indy_node Alpha 0.0.0.0 9701 0.0.0.0 9702

sudo init_indy_keys --name Alpha

sudo generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 1 --ips '178.62.22.16,178.128.37.97,209.97.136.39,206.189.118.184' --network=indynet

sudo ufw allow 9701
sudo ufw allow 9702

sudo start_indy_node Alpha 0.0.0.0 9701 0.0.0.0 9702

===============================================================================================

# MACHINE 2:

sudo -E apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
bash -c 'echo "deb https://repo.sovrin.org/deb xenial stable" >> /etc/apt/sources.list'
sudo -E apt-get update
sudo -E apt-get -y install indy-node
sudo vim /etc/indy/indy_config.py # update network name to 'indynet'

sudo init_indy_node Beta 0.0.0.0 9703 0.0.0.0 9704

sudo init_indy_keys --name Beta

sudo generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 2 --ips '178.62.22.16,178.128.37.97,209.97.136.39,206.189.118.184' --network=indynet

sudo ufw allow 9703
sudo ufw allow 9704

sudo start_indy_node Beta 0.0.0.0 9703 0.0.0.0 9704

===============================================================================================

# MACHINE 3:

sudo -E apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
bash -c 'echo "deb https://repo.sovrin.org/deb xenial stable" >> /etc/apt/sources.list'
sudo -E apt-get update
sudo -E apt-get -y install indy-node
sudo vim /etc/indy/indy_config.py # update network name to 'indynet'

sudo init_indy_node Gamma 0.0.0.0 9705 0.0.0.0 9706

sudo init_indy_keys --name Gamma

sudo generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 3 --ips '178.62.22.16,178.128.37.97,209.97.136.39,206.189.118.184' --network=indynet

sudo ufw allow 9705
sudo ufw allow 9706

sudo start_indy_node Gamma 0.0.0.0 9705 0.0.0.0 9706

===============================================================================================

# MACHINE 4:

sudo -E apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
bash -c 'echo "deb https://repo.sovrin.org/deb xenial stable" >> /etc/apt/sources.list'
sudo -E apt-get update
sudo -E apt-get -y install indy-node
sudo vim /etc/indy/indy_config.py # update network name to 'indynet'

sudo init_indy_node Theta 0.0.0.0 9707 0.0.0.0 9708

sudo init_indy_keys --name Theta

sudo generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 4 --ips '178.62.22.16,178.128.37.97,209.97.136.39,206.189.118.184' --network=indynet

sudo ufw allow 9707
sudo ufw allow 9708

sudo start_indy_node Theta 0.0.0.0 9707 0.0.0.0 9708

以上命令都是在四台不同的机器上执行的。当我在每台机器上启动 indy-node 时,没有任何输出或任何东西,所以我不确定它是否有效。

在第一台机器上,我像这样安装了 indy-cli:

sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb xenial stable"
sudo apt-get update
sudo apt-get install -y indy-cli

然后我启动了 indy-cli 并创建了一个新的钱包和新的池,并尝试连接:

indy> wallet create mywallet key

indy> wallet open mywallet key

mywallet:indy> wallet list
+----------+---------+
| Name     | Type    |
+----------+---------+
| mywallet | default |
+----------+---------+
Current wallet "mywallet"

mywallet:indy> pool create indynet gen_txn_file=/var/lib/indy/indynet/domain_transactions_genesis

mywallet:indy> pool list
+---------+
| Pool    |
+---------+
| indynet |
+---------+


mywallet:indy> pool connect indynet
Error: Invalid library state
  Caused by: MerkleTree contains invalid item
  Caused by: error while decoding value

谁能告诉我哪里出错了?

4

1 回答 1

1

我相信pool create命令应该是指pool_transactions_genesis,而不是domain_transactions_genesis。DOMAIN 子账本用于总账交易,而 POOL 用于验证者节点信息。

于 2020-04-07T17:37:03.113 回答