Skip to content
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: track actually requested transactions #5483

Merged
merged 1 commit into from
Nov 18, 2023
Merged

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Nov 18, 2023

this fixes an issue where the tracked requested_hashes weren't set properly.

this previously collected the hashes from the response instead.
this could result in unbounded mem growth

@mattsse mattsse added C-bug An unexpected or incorrect behavior A-networking Related to networking in general labels Nov 18, 2023
@@ -857,7 +856,7 @@ where
// known that this transaction is bad. (e.g. consensus
// rules)
if err.is_bad_transaction() && !this.network.is_syncing() {
trace!(target: "net::tx", ?err, "Bad transaction import");
trace!(target: "net::tx", ?err, "bad pool transaction import");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we output tx hash here as well? it would help us inspect them in case we have false positives

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already part of the error:

#[error("[{hash}]: {kind}")]

Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mattsse mattsse added this pull request to the merge queue Nov 18, 2023
Merged via the queue into main with commit f29e04d Nov 18, 2023
25 checks passed
@mattsse mattsse deleted the matt/fix-tx-req-cleanup branch November 18, 2023 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-networking Related to networking in general C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants