quorum icon indicating copy to clipboard operation
quorum copied to clipboard

Mining wont start in Quorum (IBFT) in particular scenario

Open alejoloaiza opened this issue 8 years ago • 5 comments

System information

Geth Version: 1.7.2-stable Quorum Version: 2.0.0 Architecture: amd64 Network Id: 1 Go Version: go1.9 Operating System: linux

OS & Version:Linux version 4.15.0-30-generic (buildd@lgw01-amd64-060) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #32-Ubuntu SMP Thu Jul 26 17:42:43 UTC 2018

Expected behaviour

Block creation should start once the 5th validator out of 7 possible validators connects to the network.

Actual behaviour

Block creation with Quorum (IBFT) have NOT started after 30 minutes of waiting, and 5 validators are connected out of 7 present in extradata field.

Steps to reproduce the behaviour

Step 1:

Create a docker network with 7 nodes using istanbul with command: istanbul setup --num 7 --docker-compose --verbose --quorum --save

Step 2:

Now lets start only 4 validators:

docker-compose -f docker-compose.yml up -d eth-stats constellation-0 constellation-1 constellation-2 constellation-3 validator-0 validator-1 validator-2 validator-3

Check that mining is not happening with geth attach http://localhost:8545 it will show at block: 0

Step 3:

Wait 30 minutes, and bring up the 5th node:

docker-compose -f docker-compose.yml up -d constellation-4 validator-4

After waiting another 30 minutes there is not mining going on. I'm still at block 0.

instance: Geth/validator-0/v1.7.2-stable/linux-amd64/go1.9 coinbase: 0xa81807268ae6e6f8dddaeac7a75001c764d9d81f at block: 0 (Sun, 12 Aug 2018 22:00:22 -05)

Its important to mention that if I initiate all 5 nodes at the same time, mining starts happening, but it doesnt work if I bring only 4 wait and after 30 mins initiate the 5th validator.

Thanks a lot. Regards.

alejoloaiza avatar Aug 16 '18 19:08 alejoloaiza

Hey @alejoloaiza is there anything in the logs? Also, why not prime the network with existing nodes and then add new ones via istanbul interface?

fixanoid avatar Aug 17 '18 15:08 fixanoid

Hi @fixanoid I understand that it's an option to start with some validators and keep adding the rest after, that is what I finally did to "resolve" the problem, but I feel this it is a bug that should be fixed instead of using a workaround, many users will encounter such issues in the future because normally if 7 entities gather and start a quorum-IBFT network, by definition they will define themselves as validators and then during network creation they will not join to the network at the exact same time, and then this issue will come. Let me get some logs and come back to you.

alejoloaiza avatar Aug 17 '18 15:08 alejoloaiza

@alejoloaiza agreed, I'm going to file this as a bug and will get someone to look into it.

fixanoid avatar Aug 17 '18 15:08 fixanoid

@fixanoid I am facing similar issue. I started a single node IBFT network. Then I added another validator to the network. And then voted for the new validator from the 1st node. Now both stop creating blocks. On the logs of second node I see "Block Sealing Failed: err=unauthorized" message.

To fix this I had to restart both the nodes. This issue was not there earlier.

web3rover avatar Sep 16 '18 16:09 web3rover

Hi @alejoloaiza, I ran some tests using the above configuration and the mining starts at the onset of a new round. As the timeout increases from one round to the next, the time at which mining starts depends on when the 5th node is added. Please refer section 4.5.2 Liveness of PBFT paper for more details on the round/view timeouts. You should notice mining to start if you wait a little longer for the new round to start.

I am closing the ticket for now as the behavior is as expected. Please reopen if you don't see mining to begin even after new round starts.

jbhurat avatar Oct 10 '18 14:10 jbhurat