-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core/qbft: send qcommit as decided message #508
Conversation
Codecov Report
@@ Coverage Diff @@
## main #508 +/- ##
==========================================
- Coverage 56.34% 56.28% -0.06%
==========================================
Files 87 87
Lines 8001 8029 +28
==========================================
+ Hits 4508 4519 +11
- Misses 2894 2908 +14
- Partials 599 602 +3
Continue to review full report at Codecov.
|
for _, prepare := range prepares { | ||
if !uniq(prepare) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when counting/filtering messages, ensure that only one message per source/process is counted.
@@ -695,7 +717,7 @@ func filterRoundChange[I any, V Value[V]](msgs []Msg[I, V], round int64) []Msg[I | |||
func filterMsgs[I any, V Value[V]](msgs []Msg[I, V], typ MsgType, round int64, value *V, pr *int64, pv *V) []Msg[I, V] { | |||
var ( | |||
resp []Msg[I, V] | |||
dups = make(map[dedupKey]bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already did this in filterMsgs
but since we do not always use this function, generalise the uniqSource[I, V]()
helper function
@@ -142,6 +142,20 @@ func TestQBFT(t *testing.T) { | |||
RandomRound: true, | |||
}) | |||
}) | |||
|
|||
t.Run("drop 30% const", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this issue was uncovered when running multiple 30% lossy tests
cancel() | ||
return | ||
} | ||
t.Logf("%s %v => %v@%d", clock.NowStr(), source, typ, round) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add more test logs
Broadcasting individual COMMIT messages after Decided can result in some being dropped. This can postpone finality in lossy networks.
Rather batch
Qcommit
as justification of a new message typeMsgDecided
. This ensures that if a valid justifiedMsgDecided
is received, that any process will decide. This also makes sending Qcommit explicit and aligns the API with that other messages, mitigating requirement of special case handling.Also ensure that when filtering/counting messages, that only unique sources/processes are included. Generalise this via
uniq := uniqSource
helper function.category: refactor
ticket: #445