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
Fix invalid signers message broadcast on multikey #5817
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## rc/sirius-patch-2 #5817 +/- ##
=====================================================
- Coverage 80.19% 80.15% -0.04%
=====================================================
Files 708 708
Lines 94083 94086 +3
=====================================================
- Hits 75446 75415 -31
- Misses 13293 13327 +34
Partials 5344 5344 ☔ View full report in Codecov by Sentry. |
@@ -1556,29 +1603,56 @@ func TestVerifyInvalidSigners(t *testing.T) { | |||
func TestSubroundEndRound_CreateAndBroadcastInvalidSigners(t *testing.T) { | |||
t.Parallel() | |||
|
|||
wg := &sync.WaitGroup{} | |||
wg.Add(1) | |||
t.Run("redundancy node should not send", 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.
"redundancy node should not send while the main is active"
@@ -589,20 +589,31 @@ func (sr *subroundEndRound) createAndBroadcastHeaderFinalInfo() { | |||
} | |||
|
|||
func (sr *subroundEndRound) createAndBroadcastInvalidSigners(invalidSigners []byte) { | |||
isSelfLeader := sr.IsSelfLeaderInCurrentRound() && sr.ShouldConsiderSelfKeyInConsensus() | |||
if !isSelfLeader && !sr.IsMultiKeyLeaderInCurrentRound() { |
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.
can we change the condition to
if !(isSelfLeader || sr.IsMultiKeyLeaderInCurrentRound())
would be easier to read
container := mock.InitConsensusCore() | ||
messenger := &mock.BroadcastMessengerMock{ | ||
BroadcastConsensusMessageCalled: func(message *consensus.Message) error { | ||
wg.Done() |
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.
can you do the wg.Done after the wasCalled = true?
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.
Normal allin test: master-ace90ef010 -> fix_multikey_invalid_signe-624cbd54fe
--- Specific errors ---
block hash does not match 9031
wrong nonce in block 3592
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 0
receipts hash missmatch 0
/------/
--- Statistics ---
Nr. of all ERRORS: 3
Nr. of all WARNS: 3319
Nr. of new ERRORS: 3
Nr. of new WARNS: 18
Nr. of PANICS: 0
/------/
--- ERRORS ---
/------/
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?