pbft-consensus icon indicating copy to clipboard operation
pbft-consensus copied to clipboard

Add persistence e2e test.

Open 0xSasaPrsic opened this issue 2 years ago • 2 comments

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.

0xSasaPrsic avatar May 05 '22 10:05 0xSasaPrsic

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@7320bcd). Click here to learn what that means. The diff coverage is n/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

codecov-commenter avatar Jun 14 '22 13:06 codecov-commenter

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Oct 26 '23 09:10 sonarqubecloud[bot]