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

Small tx response verification optimisation #6911

Merged
merged 9 commits into from
Mar 3, 2024

Conversation

emhane
Copy link
Member

@emhane emhane commented Mar 1, 2024

Replaces Vec for HashSet in RequestTxHashes. This simplifies the look up of a hash from a PooledTransactions response in RequestHashes, which is done in verifying that hashes in the response were actually requested.

@emhane emhane added C-perf A change motivated by improving speed, memory usage or disk footprint A-networking Related to networking in general labels Mar 1, 2024
@emhane emhane requested review from mattsse and Rjected as code owners March 1, 2024 15:03
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

all of this looks reasonable,

though one bad side-effect of this is that we now request hashes in random order, which can result in more work during pool import because we might need to reorder sequences from the same account that we request out of nonce order, assuming they are announced in order

wdyt @Rjected

@emhane
Copy link
Member Author

emhane commented Mar 3, 2024

all of this looks reasonable,

though one bad side-effect of this is that we now request hashes in random order, which can result in more work during pool import because we might need to reorder sequences from the same account that we request out of nonce order, assuming they are announced in order

wdyt @Rjected

random order already happens when the announcement is validated when data is put into hash map to dedup

@emhane emhane requested a review from mattsse March 3, 2024 13:56
@emhane emhane changed the base branch from main to emhane/update-enr March 3, 2024 13:57
@emhane emhane changed the base branch from emhane/update-enr to main March 3, 2024 13:58
@emhane
Copy link
Member Author

emhane commented Mar 3, 2024

all of this looks reasonable,
though one bad side-effect of this is that we now request hashes in random order, which can result in more work during pool import because we might need to reorder sequences from the same account that we request out of nonce order, assuming they are announced in order
wdyt @Rjected

random order already happens when the announcement is validated when data is put into hash map to dedup

if you think this is a problem now (if I remember correct you wished for the HashMap in dedup in validation), reminder to open an issue since is out of scope @mattsse

@emhane emhane added this pull request to the merge queue Mar 3, 2024
Merged via the queue into main with commit d6bd0a6 Mar 3, 2024
29 checks passed
@emhane emhane deleted the emhane/optimise-tx-resp-verification branch March 3, 2024 17:46
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-perf A change motivated by improving speed, memory usage or disk footprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants