-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix test_optimistic_confirmation_violation_without_tower() #13043
Conversation
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.
Nice!
local-cluster/tests/local_cluster.rs
Outdated
| // C can avoid NoPropagatedConfirmation erorrs and continue to generate blocks | ||
| // 2) Provide gosisp discovery for `A` when it restarts because `A` will restart | ||
| // at a different gossip port than the entrypoint saved in C's gosisp table |
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.
| // C can avoid NoPropagatedConfirmation erorrs and continue to generate blocks | |
| // 2) Provide gosisp discovery for `A` when it restarts because `A` will restart | |
| // at a different gossip port than the entrypoint saved in C's gosisp table | |
| // C can avoid NoPropagatedConfirmation errors and continue to generate blocks | |
| // 2) Provide gossip discovery for `A` when it restarts because `A` will restart | |
| // at a different gossip port than the entrypoint saved in C's gossip table |
You still blaming the keyboard? 😆
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.
Oh, that's just how I thought those were words were spelled, totally on purpose
Pull request has been modified.
Codecov Report
@@ Coverage Diff @@
## master #13043 +/- ##
=======================================
Coverage 82.1% 82.1%
=======================================
Files 366 366
Lines 86101 86101
=======================================
+ Hits 70742 70749 +7
+ Misses 15359 15352 -7 |
| // 1) Propagate A's votes for S2 to validator C after A shuts down so that | ||
| // C can avoid NoPropagatedConfirmation errors and continue to generate blocks | ||
| // 2) Provide gossip discovery for `A` when it restarts because `A` will restart | ||
| // at a different gossip port than the entrypoint saved in C's gossip table |
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.
TIL
local-cluster/tests/local_cluster.rs
Outdated
| for a in ancestors { | ||
| if votes_on_c_fork.contains(&a) { | ||
| bad_vote_detected = true; | ||
| break; |
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.
well, this only breaks from the newly-added inner for loop, maybe break 'outer or use if ancestors.any(|a| votes_on_c_fork.contains(a)) { bad_vote_detected = true; break}.
I'd prefer the latter. Nested loops are hard to manage as this bug illustrates. ;)
I think the outer loop will wait for the timeout needlessly currently with the new code.
|
@carllin Hooray! Thanks for debugging the propagation error and actually helping to fix the flaky |
e1988d0 to
5e6bfc6
Compare
Co-authored-by: Carl Lin <carl@solana.com> (cherry picked from commit dd6ccca)
Adding this, because this fluky test is currently affected on v1.4 branch as well |
…bs#13043) Co-authored-by: Carl Lin <carl@solana.com>
Problem
test_optimistic_confirmation_violation_without_toweris flaky with failure message:"Violation expected because of removed persisted tower!". Example of failure case:A's vote on
33is a descendant ofC's block 32, but the test doesn't recognize this.Summary of Changes
Check blockstore for descendants check
Context #10718 #12350