Skip to content

Conversation

@brunoerg
Copy link
Contributor

@brunoerg brunoerg commented Apr 9, 2024

This PR improves and fixes i2p logs (joint work with vasild).

  • It replaces LogPrint to LogPrintLevel so we can log according to the severity.
  • Fix log when interruption happens during Accept. Before this PR, when an interruption happens, it just logs "Error accepting:", no reason is logged as it does for other situations. This PR changes it to log "Accept interrupted".
  • Log errors according to the severity. Stuff like creating SAM session, destroying SAM session, etc... are logged as 'debug'.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 9, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK marcofleon, vasild, achow101
Concept ACK jonatack
Stale ACK kevkevinpal, laanwj

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #30338 (RFC: Instanced logs by theuni)
  • #29641 (scripted-diff: Use LogInfo/LogDebug over LogPrintf/LogPrint by maflcko)

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.

Copy link
Contributor

@kevkevinpal kevkevinpal left a comment

Choose a reason for hiding this comment

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

lgtm ACK 64d3296

@brunoerg
Copy link
Contributor Author

Force-pushed addressing #29833 (comment). Thanks, @laanwj.

@laanwj
Copy link
Member

laanwj commented Apr 12, 2024

Thanks!
Code review ACK 9fa50338c115f0286637142fd887b212fddfb27d

@DrahtBot DrahtBot requested a review from kevkevinpal April 12, 2024 09:31
@brunoerg
Copy link
Contributor Author

CI failure is unrelated to these changes.

@brunoerg
Copy link
Contributor Author

Rebased to re-run CI.

@laanwj
Copy link
Member

laanwj commented Apr 27, 2024

Rebased to re-run CI.

Better to ask someone in the IRC channel to re-run the CI, as that won't invalidate ACKs 😄

re-ACK 469e4834bad295f6d9fbf8048a8db23aa758bac9

Copy link
Contributor

@vasild vasild left a comment

Choose a reason for hiding this comment

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

ACK 469e4834bad295f6d9fbf8048a8db23aa758bac9

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

Concept/approach ACK, this is the same or very similar to the changes in fc0a50e (#25203) and 43315a0 (#25203) from two years ago, in case you'd like to compare/check against them.

@DrahtBot DrahtBot requested a review from jonatack May 10, 2024 22:09
@DrahtBot DrahtBot requested a review from jonatack May 13, 2024 20:46
@DrahtBot DrahtBot requested a review from jonatack May 13, 2024 20:47
@DrahtBot DrahtBot requested review from jonatack May 13, 2024 20:48
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

(reposting using the "review changes" button to appease the bot, it sent me several "request review" notifications in the last ten minutes :)

ACK modulo comments above. If the third commit is re-changing lines that are already changed in the first commit, would suggest combining them.

@maflcko
Copy link
Member

maflcko commented May 23, 2024

(reposting using the "review changes" button to appease the bot, it sent me several "request review" notifications in the last ten minutes :)

Not sure why that would happen. The bot should not react on new review comments after someone else's A C K. (c.f. https://github.com/maflcko/DrahtBot/blob/main/webhook_features/src/features/summary_comment.rs#L308) Looking at other pull requests, this seems to be working correctly, so my guess is that this is another GitHub metatdata corruption bug, which are common?

@brunoerg
Copy link
Contributor Author

Force-pushed addressing #29833 (comment).

Before, interruption was printed as an error. Also,
it did not log the reason when an interruption happened,
e.g. "Error accepting:".

Co-authored-by: Vasil Dimov <[email protected]>
@brunoerg
Copy link
Contributor Author

Force-pushed addressing #29833 (comment)

Copy link
Contributor

@marcofleon marcofleon left a comment

Choose a reason for hiding this comment

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

ACK 7d3662f.

@DrahtBot DrahtBot requested review from laanwj, maflcko and vasild June 13, 2024 10:27
Copy link
Contributor

@vasild vasild left a comment

Choose a reason for hiding this comment

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

ACK 7d3662f

@DrahtBot DrahtBot requested a review from kevkevinpal June 21, 2024 08:13
@DrahtBot DrahtBot mentioned this pull request Jun 25, 2024
@achow101
Copy link
Member

ACK 7d3662f

@achow101 achow101 merged commit b27afb7 into bitcoin:master Jun 26, 2024
kwvg added a commit to kwvg/dash that referenced this pull request Apr 14, 2025
PastaPastaPasta added a commit to dashpay/dash that referenced this pull request Apr 22, 2025
, bitcoin#28078, bitcoin#27071, bitcoin#28077, bitcoin#28692, bitcoin#29813, bitcoin#30085, bitcoin#29833, partial bitcoin#24356 (networking backports: part 11)

5699158 merge bitcoin#29833: fix and improve logs (Kittywhiskers Van Gogh)
95a1853 merge bitcoin#30085: detect addnode cjdns peers in GetAddedNodeInfo() (Kittywhiskers Van Gogh)
9d959d7 merge bitcoin#29813: improve `-i2pacceptincoming` mention (Kittywhiskers Van Gogh)
5045fa3 merge bitcoin#28692: Delete i2p fuzz test (Kittywhiskers Van Gogh)
7b01e8b merge bitcoin#28077: also sleep after errors in Accept() & destroy the session if we get an unexpected error (Kittywhiskers Van Gogh)
0c42410 merge bitcoin#27071: Handle CJDNS from LookupSubNet() (Kittywhiskers Van Gogh)
821c11f merge bitcoin#28078: remove unneeded exports, use helpers over low-level code, use optional (Kittywhiskers Van Gogh)
d051929 refactor: replace external `::GetLocal()` usage (Kittywhiskers Van Gogh)
481175f merge bitcoin#27719: remove Tor link & generalize onion getnodeaddresses RPC (Kittywhiskers Van Gogh)
378ad01 merge bitcoin#25989: abort if i2p/cjdns are chosen via -onlynet but are unreachable (Kittywhiskers Van Gogh)
8b23bfb partial bitcoin#24356: replace CConnman::SocketEvents() with mockable Sock::WaitMany() (Kittywhiskers Van Gogh)
1a64e8d merge bitcoin#25286: remove duplicate categories from LogPrint output (Kittywhiskers Van Gogh)

Pull request description:

  ## Breaking Changes

  None expected.

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK 5699158
  PastaPastaPasta:
    utACK 5699158

Tree-SHA512: b1ffc310574de5ec40d18aa4a453ef328d8f935c42d43a204c14fa264f099a106ddea793a018f56dcf75d9548fb06d1580c6aa1d90f66afa95089435e0b9606d
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jun 20, 2025
Summary:
Co-authored-by: Vasil Dimov <[email protected]>

This is a backport of [[bitcoin/bitcoin#29833 | core#29833]]

Bypasses a one line change from [[bitcoin/bitcoin#25355 | core#25355]] that replaces a `LogPrintfCategory` by a `Log`. Removing that call to `LogPrintfCategory` allows to remove the macro after [[bitcoin/bitcoin#28318 | core#28318]].

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18268
@bitcoin bitcoin locked and limited conversation to collaborators Jun 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants