bosnet / sebak

SEBAK, the next BOScoin Blockchain
https://devteam.blockchainos.org
GNU General Public License v3.0
44 stars 15 forks source link

Fixed to start consensus after nodes restarting simultaneously #835

Closed spikeekips closed 5 years ago

spikeekips commented 5 years ago

Github Issue

Resolves #828

Background

See #828

This problem is caused by the combination of NodeRunner.BroadcastBallot() and NodeRunner.waitForConnectingEnoughNodes(). The network was stuck, failed to collect the enough ballots over threshold. Before enough validators are not connected, the incoming ballot or the proposed ballot is received, the node can not broadcast the next ballots.

Solution

Changes,

codecov-io commented 5 years ago

Codecov Report

Merging #835 into master will decrease coverage by <.01%. The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #835      +/-   ##
==========================================
- Coverage   62.03%   62.03%   -0.01%     
==========================================
  Files         151      151              
  Lines        9890     9895       +5     
==========================================
+ Hits         6135     6138       +3     
- Misses       3096     3097       +1     
- Partials      659      660       +1
Flag Coverage Δ
#integration_tests_long_term 45.52% <50%> (-0.02%) :arrow_down:
#integration_tests_node 41.18% <50%> (-0.02%) :arrow_down:
#unittests 51.26% <50%> (-0.02%) :arrow_down:
Impacted Files Coverage Δ
lib/node/runner/test_connection_manager.go 94.44% <100%> (+0.32%) :arrow_up:
lib/network/validator_connection_manager.go 88.23% <100%> (+0.17%) :arrow_up:
lib/node/runner/checker.go 73.77% <100%> (ø) :arrow_up:
lib/node/runner/node_runner.go 78.31% <33.33%> (-0.41%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 56614e9...ea85a52. Read the comment docs.