config, net, test: asmap feature refinements and functional tests#17812
config, net, test: asmap feature refinements and functional tests#17812fanquake merged 9 commits intobitcoin:masterfrom
Conversation
8fc5170 to
734d531
Compare
d60253f to
91258da
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
91258da to
eeb1a42
Compare
|
Shouldn't e4f5aa4b09a0f0c51def6b859609aee01b61d2df, b380e9a48e5c6cb7e1ed6558e7fbbde5feb0069b and eeb1a42341c9a5a9517a244506dd2a609962ee5c just be left as feedback/review on #16702? Especially if one of those commits is required for the CI to pass. |
|
Yes, those can be pulled into the PR if helpful. I have more important review questions on that PR that I'd like to concentrate on (the unit tests and actual bucketing) without adding further nit review at the moment. The idea here, as per our review discussion in that PR, is to handle other aspects (functional tests, config arg handling, user-facing interface) that can help it be merged without the author needing to bother with it. |
eeb1a42 to
a861441
Compare
a861441 to
06a2ea9
Compare
6f7bb4c to
7cf4926
Compare
|
+1 for allowing absolute |
7cf4926 to
b02e05a
Compare
b02e05a to
e44e884
Compare
|
Rebased and added #16702 (comment) and #16702 (comment) in the last 2 commits. |
|
Can you squash a bunch of these? cd6d6d138f4844d35537f07c6c106e42dc0d8581 and b5cf2db1a4cd20175f37fc039c2bc0e15ccef1e4 could be combined. I don't think we need separate commits just to remove full stops and then add spaces to logging. 8554077e5532c26b28be95249992d96b68feebd7 reorders includes, which generally we don't do by itself, maybe combine into e44e8842b4da2829bbdcd982c83bb5ffb665b472. |
|
Has anyone fuzzed the asmap file reader? I anticipate users accepting asmaps from third parties... |
|
Oh, nevermind, I just saw #18033 |
|
In the sentence …
… isn't the correct technical term "AS path" rather than "BGP route"? :) |
|
Thanks @practicalswift, taking note for a follow-up (asmap release notes), at this point I prefer to preserve the 3 ACKs. Mind acking? |
Summary: ``` This PR builds on PR #16702 to add functional tests / sanity checks and user-facing refinements for passing -asmap to configure ASN-based IP bucketing in addrman. As per our review discussion in that PR, the idea here is to handle aspects like functional tests and config arg handling that can help the PR be merged while enabling the author to focus on the bucketing itself. ``` Backport of core [[bitcoin/bitcoin#17812 | PR17812]]. Depends on D8198. Test Plan: ninja all check-all Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D8200
This PR builds on PR #16702 to add functional tests / sanity checks and user-facing refinements for passing
-asmapto configure ASN-based IP bucketing in addrman. As per our review discussion in that PR, the idea here is to handle aspects like functional tests and config arg handling that can help the PR be merged while enabling the author to focus on the bucketing itself.add feature functional tests to verify node behaviour and debug log output when launching
bitcoindwith no-asmapargbitcoind -asmap=RELATIVE_FILENAMEto the unit test data skeleton asmapbitcoind -asmapwith no filename specified using the default asmap filebitcoind -asmapwith no filename specified and a missing default asmap fileadd the ability to pass absolute path filenames to the
-asmapconfig arg in addition to datadir-relative path filenames as per p2p: supplying and using asmap to improve IP bucketing in addrman #16702 (comment), and add test coverageseparate the asmap file finding and parsing checks, which allows adding tests for the case of a found but unparseable or empty asmap
add test for an empty asmap
various asmap fixups
move the asmap init code earlier in the init process to provide immediate feedback when passing an
-asmapconfig arg. This speeds up thefeature_asmapfunctional test from 60 to 5 seconds! Credit to Wladimir J. van der Laan for the suggestion.