Commit 3130a1d
committed
Add pure Peras Voting rules
With the currently selected generation sizes, we hit the different
voting rules in a somewhat decent proportion, even against randomly
generated functions as part of the PerasVotingView interface.
ouroboros-consensus
Peras
Peras voting rules
isPerasVotingAllowed: OK (1.55s)
+++ OK, passed 10000 tests.
Actual result (10000 in total):
60.29% NoVoteReason(VR-1A or VR-2A)
20.90% NoVoteReason(VR-1A or VR-2B)
9.60% VoteReason(VR-2A and VR-2B)
4.93% VoteReason(VR-1A and VR-1B)
2.67% NoVoteReason(VR-1B or VR-2A)
1.61% NoVoteReason(VR-1B or VR-2B)
Should vote according to model (10000 in total):
85.47% False
14.53% True
VR-(1A|1B|2A|2B) (10000 in total):
21.30% (False,True,False,False)
21.24% (False,False,False,False)
10.63% (False,False,True,False)
10.27% (False,True,True,False)
8.99% (False,False,False,True)
8.76% (False,True,False,True)
4.67% (False,True,True,True)
4.26% (False,False,True,True)
1.93% (True,False,False,False)
1.77% (True,True,False,False)
1.71% (True,True,True,False)
1.61% (True,False,True,False)
0.75% (True,True,True,True)
0.74% (True,False,False,True)
0.70% (True,True,False,True)
0.67% (True,False,True,True)
VR-1A (10000 in total):
90.12% False
9.88% True
VR-1B (10000 in total):
50.07% False
49.93% True
VR-2A (10000 in total):
65.43% False
34.57% True
VR-2B (10000 in total):
70.46% False
29.54% True1 parent 3a76d32 commit 3130a1d
File tree
4 files changed
+724
-1
lines changed- ouroboros-consensus
- src/ouroboros-consensus/Ouroboros/Consensus/Peras
- test/consensus-test
- Test/Consensus/Peras
4 files changed
+724
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| |||
672 | 673 | | |
673 | 674 | | |
674 | 675 | | |
| 676 | + | |
675 | 677 | | |
676 | 678 | | |
677 | 679 | | |
| |||
0 commit comments