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

netsync: Use an APBF for recently rejected txns. #2590

Merged
merged 1 commit into from Feb 13, 2021

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Feb 10, 2021

This modifies the net sync manager to track the recently rejected transactions using a much more efficient APBF instead of map which needs store the entirety of the key for the items added to it.

It also significantly increases the number of tracked rejected transactions thereby further lowering bandwidth usage in high rejection scenarios while simultaneously increasing robustness against malicious peers.

More concretely, tracking the new higher number with the current map would take around 4.47 MiB per profiling while the new APBF only takes around 568 KiB, a reduction of around 88%, while exhibiting roughly the same computational performance.

@davecgh davecgh added this to the 1.7.0 milestone Feb 10, 2021
internal/netsync/manager.go Outdated Show resolved Hide resolved
@davecgh davecgh force-pushed the netsync_recently_rejected_txns_abpf branch from 0b9be86 to 248d46b Compare February 13, 2021 00:21
internal/netsync/manager.go Outdated Show resolved Hide resolved
@davecgh davecgh force-pushed the netsync_recently_rejected_txns_abpf branch from 248d46b to f383032 Compare February 13, 2021 04:06
This modifies the net sync manager to track the recently rejected
transactions using a much more efficient APBF instead of map which needs
store the entirety of the key for the items added to it.

It also significantly increases the number of tracked rejected
transactions thereby further lowering bandwidth usage in high rejection
scenarios while simultaneously increasing robustness against malicious
peers.

More concretely, tracking the new higher number with the current map
would take around 4.47 MiB per profiling while the new APBF only takes
around 568 KiB, a reduction of around 88%, while exhibiting roughly the
same computational performance.
@davecgh davecgh force-pushed the netsync_recently_rejected_txns_abpf branch from f383032 to 48bf365 Compare February 13, 2021 07:43
@davecgh davecgh merged commit 48bf365 into decred:master Feb 13, 2021
@davecgh davecgh deleted the netsync_recently_rejected_txns_abpf branch February 13, 2021 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants