Don't verify a future proposal a second time when it is already scheduled - #576
Merged
Conversation
yacovm
force-pushed
the
doubleVerify
branch
2 times, most recently
from
September 3, 2026 20:50
34e48e4 to
aff33ce
Compare
Collaborator
very claudish word |
samliok
reviewed
Sep 3, 2026
| for from, messagesFromNode := range e.futureMessages { | ||
| if msgs, exists := messagesFromNode[round]; exists { | ||
| if msgs.proposal != nil { | ||
| if msgs.proposal != nil && !msgs.proposalBeingProcessed { |
Collaborator
There was a problem hiding this comment.
in your other pr we have something similar https://github.com/ava-labs/Simplex/pull/570/changes. where we have a pending rounds for blocks being processed. i'm wondering if we can simplify these two bugs into one solution?
also why can't we just delete the message from future messages when we send it to handleBlockMessage?
Collaborator
Author
There was a problem hiding this comment.
These two bugs are unrelated, but I did use this idea 👍 : take a look here.
yacovm
force-pushed
the
doubleVerify
branch
3 times, most recently
from
September 4, 2026 18:18
4c1184a to
e9e2e3f
Compare
samliok
approved these changes
Sep 8, 2026
yacovm
force-pushed
the
doubleVerify
branch
2 times, most recently
from
September 8, 2026 22:13
bd870a1 to
ff68902
Compare
Collaborator
Author
|
…uled When a verification task consumes a parked finalization, the commit calls startRound, which schedules the next round's proposal from within the task. The outer maybeLoadFutureMessages loop then re-iterates for the new round and dispatches the same proposal again, because the task that would remove it from the future messages map has not run yet. Skip proposals already marked as being processed, and clear that mark even when verification fails so a failed proposal can still be re-dispatched. Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a verification task consumes a parked finalization, the commit calls startRound, which schedules the next round's proposal from within the task. The outer maybeLoadFutureMessages loop then re-iterates for the new round and dispatches the same proposal again, because the task that would remove it from the future messages map has not run yet.
Skip proposals already marked as being processed, and clear that mark even when verification fails so a failed proposal can still be re-dispatched.