-
Notifications
You must be signed in to change notification settings - Fork 38.2k
fuzz: speed up addrman #30688
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
fuzz: speed up addrman #30688
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/30688. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
Are you referring to |
Yes, the name is a little bit confusing since it's the maximum number of addresses permitted in an ADDR message. So we use it for sending and receiving. if (vAddr.size() > MAX_ADDR_TO_SEND)
{
Misbehaving(*peer, strprintf("%s message size = %u", msg_type, vAddr.size()));
return;
} |
e89f45c to
232bf91
Compare
232bf91 to
a8ce65c
Compare
|
Force-pushed addressing #30688 (comment) |
Eunovo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review ACK
|
Tested ACK Ran On master On this PR Which shows a more than 2x increase in the NB I use |
There is no need to iterate 10'000 times and call `Add` 10'000 times at once (we only add 1000 addresses at once in practice). These values were introduced in 214d905.
a8ce65c to
de85ebe
Compare
|
Force-pushed increasing the number of iterations from 100 to 1000 (the original value is 10'000). With this value, I could see faster execs (115 exec/s) and same coverage. |
|
Just provided the fuzz inputs for testing: brunoerg/qa-assets#1 |
|
I retested this PR @de85ebe against master using the qa-assets https://github.com/bitcoin-core/qa-assets from and brunoerg/qa-assets#1 This PR vs Master on https://github.com/bitcoin-core/qa-assets Master Master I ran the fuzz tests for several hours, while this PR is always faster, there is still a clear drop in coverage, even on the qa-assets provided in brunoerg/qa-assets#1 |
|
@Eunovo I'm not seeing that reduction in coverage when I run the target. What sanitizers are you using? Also, what does the coverage say if you do |
|
I just moved it to draft since I'm doing more experiments yet. |
|
Are you still working on this? |
|
Closing for now. Focusing on other things. |
There is no need to iterate 10'000 times and
call
Add10'000 times at once (we only add1000 addresses at once in practice). These values
were introduced in 214d905.
I see an avg of 40 exec/s on master for this target and 115 exec/s on this branch.