fix(sync): ignore stale invalid value responses#1556
Closed
aproskill81 wants to merge 1 commit into
Closed
Conversation
Contributor
|
Hi @aproskill81, Thank you for your interest in contributing to Malachite. This PR has been automatically closed because you are not assigned to issue #1555. We require contributors to be explicitly assigned to an issue before submitting a PR. To contribute properly:
Please see our CONTRIBUTING.md for more details. |
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.
Closes: #1555
Summary
Invalid/undecodable ValueSync responses are represented as
Input::ValueResponse(request_id, peer_id, None).Before this change,
on_invalid_value_responsepenalized the peer before checking whether the request ID was still pending in sync state. This meant a stale invalid response could reduce a peer score even after the corresponding request had already been pruned or cleared.This makes invalid responses consistent with the valid-response path, which already ignores unknown request IDs.
Changes
on_invalid_value_responsewhenrequest_idis no longer pending.Tests
cargo fmt --all --checkcargo nextest run -p arc-malachitebft-sync invalid_value_response_ignores_unknown_request_idcargo nextest run -p arc-malachitebft-sync