pbft-consensus
pbft-consensus copied to clipboard
Add persistence e2e test.
Persistence issue test where nodes can insert different proposal for the same sequence.
Cluster of 5 nodes: A_0
, A_1
, A_2
, A_3
, A_4
Flow map defined for the round 0:
A_0 -> A_0, A_1, A_2, A_3
A_1 -> A_1, A_2, A_3
A_2 -> A_0, A_2
A_3 -> A_0, A_2
In round 0 node proposer A_0
receives enough commit messages from other nodes defined in the flow map and inserts a proposal.
Node A_3
in round 0 gets locked.
Node A_2
after receiving enough commit messages fails to insert proposal locally and unlocks the proposal and triggers round change.
In round 0 nodes A_1
and A_4
do not receive enough messages on time and trigger round change.
At this point: node A_0
has inserted proposal, node A_1
is not locked, node A_2
is not locked (unlocked because insert failed), node A_3
is locked and node A_4
did not receive any message
After moving to round 1 proposer A_1
creates a new proposal which then is propagated through the network
and gets inserted since there is enough commit messages from nodes A_1
, A_2
and A_4
which is different from the proposal inserted in round 0.
Codecov Report
:exclamation: No coverage uploaded for pull request base (
main@7320bcd
). Click here to learn what that means. The diff coverage isn/a
.
@@ Coverage Diff @@
## main #52 +/- ##
=======================================
Coverage ? 91.97%
=======================================
Files ? 3
Lines ? 835
Branches ? 0
=======================================
Hits ? 768
Misses ? 62
Partials ? 5
:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
5 Code Smells
No Coverage information
0.0% Duplication