-
Notifications
You must be signed in to change notification settings - Fork 38.8k
log: improve addrman logging #22839
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
log: improve addrman logging #22839
Conversation
|
Concept ACK |
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 632e648fd8a4d7b71be45139a51c75ffff305a1b
theStack
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 632e648fd8a4d7b71be45139a51c75ffff305a1b
|
Concept ACK |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
|
ACK 632e648fd8a4d7b71be45139a51c75ffff305a1b |
632e648 to
2ac363a
Compare
|
Rebased and addressed feedback by @naumenkogs . |
theStack
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.
re-ACK 2ac363a1f731b06d3f3c8b2fd7a02d0f846bb39b
vasild
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.
ACK 2ac363a1f731b06d3f3c8b2fd7a02d0f846bb39b
Some non-blocker comments below.
|
utACK 2ac363a1f731b06d3f3c8b2fd7a02d0f846bb39b |
|
ACK 2ac363a1f731b06d3f3c8b2fd7a02d0f846bb39b, but it'd be great to apply what vasild suggested. |
|
Given this change is quite small, and re-ACKing is easy, I'd suggest addressing the outstanding review comments before we merge this. Rather than having a followup to change the same lines again. Also @naumenkogs I edited your ACK to remove the @ mention, otherwise it would have ended up in the merge message. |
|
Makes sense of course, I'll push an update this evening. |
8706b5d to
2ceab68
Compare
|
I addressed @vasild's suggestions, thanks for the review! |
vasild
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.
ACK 2ceab68079601072a8ab6f084e4b3123025d0463
|
ACK 2ceab68079601072a8ab6f084e4b3123025d0463 |
1 similar comment
|
ACK 2ceab68079601072a8ab6f084e4b3123025d0463 |
2ceab68 to
12350e1
Compare
|
Latest push: I added the bucket position everywhere where only the bucket was logged before and changed to a consistent notation |
12350e1 to
e1d1788
Compare
vasild
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.
ACK e1d1788027e1339b0013fc8787e0251862d85117
Thanks!
jnewbery
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.
ACK e1d1788027e1339b0013fc8787e0251862d85117
One non-essential suggestion inline.
e1d1788 to
b65a25a
Compare
vasild
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.
ACK b65a25a
|
ACK b65a25a |
b65a25a log: improve addrman logging (Martin Zumsande) Pull request description: The addrman helper functions `GetNewBucket()` and `GetTriedBucket()` 1) log into the wrong category (`BCLog::NET` instead of `BCLog::ADDRMAN`) 2) log too unspecifically - especially `GetTriedBucket()` gets called from many different places (e.g. `Check_()`, `Serialize()`), it seems sufficient to me logging these when moving an address from new to tried. Running a node with `-checkaddrman=1`and net logging currently results in a lot of repetitive log entries. This PR moves these log entries to `Add_()` and `Good_()` and also adds logging for `Select_()` (allowing statistics about New/Tried success probabilities), `GetAddr_()`, `ClearNew()` and `MakeTried()`. ACKs for top commit: jnewbery: ACK b65a25a vasild: ACK b65a25a Tree-SHA512: 90ab0f64eb44b7388a198efccb613577b74989fea73194bda7de8bfbd50bdb19127cb12f5ec645c7859afdb89290614a79e255f3af0a63a58d4f21aa8fe7b696
Summary:
```
The addrman helper functions GetNewBucket() and GetTriedBucket()
log into the wrong category (BCLog::NET instead of BCLog::ADDRMAN)
log too unspecifically - especially GetTriedBucket() gets called from many different places (e.g. Check_(), Serialize()), it seems sufficient to me logging these when moving an address from new to tried. Running a node with -checkaddrman=1and net logging currently results in a lot of repetitive log entries.
This PR moves these log entries to Add_() and Good_() and also adds logging for Select_() (allowing statistics about New/Tried success probabilities), GetAddr_(), ClearNew() and MakeTried().
```
Backport of [[bitcoin/bitcoin#22839 | core#22839]].
Depends on D12338.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D12339
The addrman helper functions
GetNewBucket()andGetTriedBucket()BCLog::NETinstead ofBCLog::ADDRMAN)GetTriedBucket()gets called from many different places (e.g.Check_(),Serialize()), it seems sufficient to me logging these when moving an address from new to tried. Running a node with-checkaddrman=1and net logging currently results in a lot of repetitive log entries.This PR moves these log entries to
Add_()andGood_()and also adds logging forSelect_()(allowing statistics about New/Tried success probabilities),GetAddr_(),ClearNew()andMakeTried().