Closed thpun closed 2 years ago
thank you for raising this. Have you tried without docker? the 7nodes examples can run without docker.
I made a simple test, stop every nodes, remove all raft folders, start again and I still have my contract and transaction, by running the 7nodes examples without docker.
I've done same thing with docker compose, and it's absent as you mention. (CTRL-C on docker-compose up, deleting the every raft folders only on the volumes, docker-compose up)
same with docker-compose stop and start.
did docker-compose stop and docker-compose start without removing the raft folders, I loose the blockchain.
My guess is that when the docker is starting, there is the geth init
that is applied over existing qdata
Resolved by editing/changing the docker-compose file, docker-compose.yml.txt Here I removed all rm, mkdir, geth init for quorum and tessera containers.
So the setup is done with the original docker-compose, then you should use this one.
I will discuss if we should have a better docker-compose file that init once, and reuse the volume. docker-compose down doesn't remove the volumes by default.
Hopefully this solved your issue, if not please re-open
System information
Quorum release version: 21.7.1
OS & Version: Ubuntu 20.04 running Quroum in docker
Expected behaviour
Blockchain data persists after removing raft log folders (i.e.
quorum-raft-state/
,raft-snap/
&raft-wal
), as written in https://consensys.net/docs/goquorum/en/latest/configure-and-manage/manage/node-network-migration/#peers-need-a-new-networking-configurationActual behaviour
When all 3 folders (i.e.
quorum-raft-state/
,raft-snap/
&raft-wal
) are removed, the block number drops to zero. When onlyquorum-raft-state/
&raft-snap/
are removed, all nodes encountered panic.Steps to reproduce the behaviour
I started off with the classic 7-node example in https://github.com/ConsenSys/quorum-examples with command
PRIVATE_CONFIG=ignore QUORUM_CONSENSUS=raft docker-compose up -d
and then edited the docker-compose.yml in order to avoid data loss when restarting the docker containers (removing those lines which modifies and initializes/qdata
and/qdata/dd
).After running for some time and having some transactions in the blockchain, the block number grows to 119.
Following https://consensys.net/docs/goquorum/en/21.10.0/configure-and-manage/manage/node-network-migration/#peers-need-a-new-networking-configuration, I am trying to add a new peer which is not in the same machine with the original 7 nodes, communicating via public network.
My procedure would be:
permissioned-nodes.json
andstatic-nodes.json
In step 4, when all 3 folders are removed, block number in all nodes goes back to zero (which I refer this as losing blockchain data) once the nodes are started.
By restoring the blockchain by docker volume backup, and retry everything from step 1. And in step 4, when only
quorum-raft-state/
andraft-snap
are removed, the nodes run into panic.(If i dont remove the raft folder and the original docker network bridge, the new peer 8 in another machine will not be able to communicate with the raft network with either
rafthttp: failed to find member 3 in cluster 1000
in the new node (peer 8) orrafthttp: failed to dial 8 on stream MsgApp v2 (peer 8 failed to find local node 1)
in the original nodes. But if i remove the raft folder, the blockchain data is lost 😢 )