Bitcoin Core Github
44 subscribers
120K links
Download Telegram
🤔 fjahr reviewed a pull request: "p2p: Avoid prematurely clearing download state for other peers"
(https://github.com/bitcoin/bitcoin/pull/27608#pullrequestreview-1419469898)
Code review ACK 52e52071e01f4e98d87a47e1d5f3c5c3cc6dbaf4
💬 fjahr commented on pull request "p2p: Avoid prematurely clearing download state for other peers":
(https://github.com/bitcoin/bitcoin/pull/27608#discussion_r1189141220)
nit: Could have moved the lock outside the `if..else` and removed the duplicate line in the `else` below.
📝 glozow opened a pull request: "rpc: allow submitpackage to be called outside of regtest"
(https://github.com/bitcoin/bitcoin/pull/27609)
Suggested in https://github.com/bitcoin/bitcoin/pull/26933#issuecomment-1510851570

This RPC is safe (no DoS issues or big bugs AFAIK) but still experimental - interface may change, not all features (e.g. package RBF) are implemented, etc. If a miner wants to expose this to people, they can effectively use "package relay." Obviously it should be protected by some kind of rate limit; we don't cache rejections for stuff from RPC.
💬 jamesob commented on pull request "rpc: allow submitpackage to be called outside of regtest":
(https://github.com/bitcoin/bitcoin/pull/27609#issuecomment-1541020239)
Concept ACK
🤔 mzumsande reviewed a pull request: "p2p: Avoid prematurely clearing download state for other peers"
(https://github.com/bitcoin/bitcoin/pull/27608#pullrequestreview-1419557634)
Code Review ACK 52e52071e01f4e98d87a47e1d5f3c5c3cc6dbaf4
💬 mzumsande commented on pull request "p2p: Avoid prematurely clearing download state for other peers":
(https://github.com/bitcoin/bitcoin/pull/27608#discussion_r1189204222)
nit: requested **from** another peer
📝 ajtowns opened a pull request: "Improve performance of p2p inv to send queues"
(https://github.com/bitcoin/bitcoin/pull/27610)
Couple of performance improvements when draining the inventory-to-send queue:

* drop txs that have already been evicted from the mempool (or included in a block) immediately, rather than at the end of processing
* marginally increase outgoing trickle rate during spikes in tx volume
💬 ajtowns commented on pull request "net processing: avoid serving non-announced txs as a result of a MEMPOOL message":
(https://github.com/bitcoin/bitcoin/pull/27602#discussion_r1189250200)
Ah, I see what you mean. That makes sense.

Next point on those lines though: adding many things to `m_recently_announced_invs` can overflow the bloom filter, either causing false positives (leading to privacy bugs), or since it's a rolling bloom filter, causing overflow leading to false negatives (leading to functionality bugs where you can't get the txs from the MEMPOOL response). Wouldn't it be better to make the insertion conditional on `txinfo.m_time <= now - UNCONDITIONAL_RELAY_DELAY` ?
...
💬 theStack commented on issue "CPU DoS on mainnet in debug mode":
(https://github.com/bitcoin/bitcoin/issues/27586#issuecomment-1541097841)
For the reporters using [htop](https://htop.dev/) to analyze CPU usage (which is the case for at least @poiuty @gits7r, according to the posted screenshots): could you go to the display settings (reachable via key F2) and activate "tree view" and the global option "show custom thread names"? This would show the CPU usage per thread, which could be interesting for further investigation, e.g.:

![image](https://github.com/bitcoin/bitcoin/assets/91535/3b20748f-86db-4f4c-a185-496135d3b5ec)

(FWI
...
💬 ajtowns commented on issue "CPU DoS on mainnet in debug mode":
(https://github.com/bitcoin/bitcoin/issues/27586#issuecomment-1541197101)
I think #27610 should improve the non-debug cpu usage in b-msghand. Both commits should cleanly cherry-pick for on top of v24.x; and the first commit (the "CompareDepthAndScore" one) should cleanly cherry-pick for v23.x.
⚠️ apex-quest opened an issue: "BTC"
(https://github.com/bitcoin-core/gui/issues/727)
fanquake closed an issue: "BTC"
(https://github.com/bitcoin-core/gui/issues/727)
:lock: fanquake locked an issue: "BTC"
(https://github.com/bitcoin-core/gui/issues/727)
💬 ayeowch commented on issue "CPU DoS on mainnet in debug mode":
(https://github.com/bitcoin/bitcoin/issues/27586#issuecomment-1541373834)
> Using this command to identify those peers: `bitcoin-cli getpeerinfo | jq -r '.[] | if (.bytessent_per_msg.inv > 100000 and .bytesrecv_per_msg.inv == null) then .addr else empty end'`

Someone posted https://news.ycombinator.com/item?id=35824998 linking to a DoS script https://github.com/visualbasic6/drain/blob/c8373b55d83832f95fb0a77aca56436adeffb58d/drain-btc.py a day before this issue. It's possible someone may be using the script targeting public nodes.

Check your `bytessent_per_msg.
...
💬 ArmchairCryptologist commented on issue "CPU DoS on mainnet in debug mode":
(https://github.com/bitcoin/bitcoin/issues/27586#issuecomment-1541380556)
> It's possible someone may be using the script targeting public nodes.

FWIW, I was not seeing any ridiculous bytessent_per_msg.inv numbers on any of my nodes. In fact the highest counts on all of my public nodes is my private nodes, but not by much.

A notable change happened yesterday (May 9th) around 14:25 UTC where the CPU load on all the public nodes dropped drastically at the same time, and they all look normal at present. The high-fee BRC-20 token spam we were seeing also appear to h
...
📝 TheCharlatan opened a pull request: "refactor(follow-up): Use ChainType enum exhaustively"
(https://github.com/bitcoin/bitcoin/pull/27611)
This is a follow up of https://github.com/bitcoin/bitcoin/pull/27491, more concretely https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188847896, for not using default cases (as per the style guide), and https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188852707 and https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188851857 for avoiding dead code.
💬 TheCharlatan commented on pull request "refactor (tidy): Fixes after enable-debug configure":
(https://github.com/bitcoin/bitcoin/pull/27353#issuecomment-1541422030)
Updated 3e76aff9d4709f44d6439cd0cbc2fd6c90cae6ab -> 27d182cef72e086afc4592cdfc565b3fdb52d0b4 ([clangTidyDebug_2](https://github.com/TheCharlatan/bitcoin/commits/clangTidyDebug_2) -> [clangTidyDebug_3](https://github.com/TheCharlatan/bitcoin/commits/clangTidyDebug_3), [compare](https://github.com/TheCharlatan/bitcoin/compare/clangTidyDebug_2..clangTidyDebug_3)).

* Dropped the commit changing the CI.
💬 MarcoFalke commented on pull request "refactor(follow-up): Use ChainType enum exhaustively":
(https://github.com/bitcoin/bitcoin/pull/27611#issuecomment-1541423034)
Can remove `(follow-up)` from the title. Also, the docstring of the changed methods in the header is still wrong
💬 TheCharlatan commented on pull request "refactor(follow-up): Use ChainType enum exhaustively":
(https://github.com/bitcoin/bitcoin/pull/27611#issuecomment-1541445444)
Re https://github.com/bitcoin/bitcoin/pull/27611#issuecomment-1541423034
> Also, the docstring of the changed methods in the header is still wrong

Do you mean these https://github.com/TheCharlatan/bitcoin/commit/0e7abdcb589ac2d891abce0b1cd9babbe6d0d39e ?