💬 fanquake commented on pull request "trace: Workaround GCC bug compiling with old systemtap":
(https://github.com/bitcoin/bitcoin/pull/33310#issuecomment-3284792505)
Backported to 30.x in #33356.
  (https://github.com/bitcoin/bitcoin/pull/33310#issuecomment-3284792505)
Backported to 30.x in #33356.
💬 fanquake commented on pull request "trace: Workaround GCC bug compiling with old systemtap":
(https://github.com/bitcoin/bitcoin/pull/33310#issuecomment-3284796811)
Backported to 29.x in #33344.
  (https://github.com/bitcoin/bitcoin/pull/33310#issuecomment-3284796811)
Backported to 29.x in #33344.
📝 fanquake opened a pull request: "depends: systemtap 5.3"
(https://github.com/bitcoin/bitcoin/pull/33373)
The diff in the copied header is:
```diff
< #if __STDC_VERSION__ >= 199901L
---
> #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
```
From
https://sourceware.org/git/?p=systemtap.git;a=commit;h=b8345d8e07b725a943a97b19aa4866e74baadd98.
  (https://github.com/bitcoin/bitcoin/pull/33373)
The diff in the copied header is:
```diff
< #if __STDC_VERSION__ >= 199901L
---
> #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
```
From
https://sourceware.org/git/?p=systemtap.git;a=commit;h=b8345d8e07b725a943a97b19aa4866e74baadd98.
📝 Sjors opened a pull request: "mining: add applySolution() to interface"
(https://github.com/bitcoin/bitcoin/pull/33374)
Unlike the submitblock RPC which takes a fully serialized block, when a block solution is received via IPC the client only provides the nonce, coinbase and a few other fields. It may not have all the information it needs to reconstruct the block. This makes debugging difficult when the block is invalid.
This commit adds `applySolution()` which returns the reconstructed block and can be used by the client for debugging. It's assigned `@11` in the `.cap` file, and will not break existing client
...
  (https://github.com/bitcoin/bitcoin/pull/33374)
Unlike the submitblock RPC which takes a fully serialized block, when a block solution is received via IPC the client only provides the nonce, coinbase and a few other fields. It may not have all the information it needs to reconstruct the block. This makes debugging difficult when the block is invalid.
This commit adds `applySolution()` which returns the reconstructed block and can be used by the client for debugging. It's assigned `@11` in the `.cap` file, and will not break existing client
...
💬 Sjors commented on pull request "mining: log failed blocks in submitSolution()":
(https://github.com/bitcoin/bitcoin/pull/33372#issuecomment-3284967478)
I opened #33374 as an alternative or complimentary approach.
  (https://github.com/bitcoin/bitcoin/pull/33372#issuecomment-3284967478)
I opened #33374 as an alternative or complimentary approach.
💬 fanquake commented on pull request "depends: systemtap 5.3":
(https://github.com/bitcoin/bitcoin/pull/33373#issuecomment-3285067079)
Guix Build:
```bash
860c39a3db7eb7e8aaf8165cd6834d2fd87afc69b82b20203a013c7ad7e7b057 guix-build-28efd724b478/output/aarch64-linux-gnu/SHA256SUMS.part
841aea1c04fd996bc437ae0d7a59f4e7feb52a21c0d810489aa87654c38d7b55 guix-build-28efd724b478/output/aarch64-linux-gnu/bitcoin-28efd724b478-aarch64-linux-gnu-debug.tar.gz
1b5fee5de6da1981518dd6c04542e0194a810abe9911ee4844f9c8c546279b6a guix-build-28efd724b478/output/aarch64-linux-gnu/bitcoin-28efd724b478-aarch64-linux-gnu.tar.gz
43d8427e5b93fb90
...
  (https://github.com/bitcoin/bitcoin/pull/33373#issuecomment-3285067079)
Guix Build:
```bash
860c39a3db7eb7e8aaf8165cd6834d2fd87afc69b82b20203a013c7ad7e7b057 guix-build-28efd724b478/output/aarch64-linux-gnu/SHA256SUMS.part
841aea1c04fd996bc437ae0d7a59f4e7feb52a21c0d810489aa87654c38d7b55 guix-build-28efd724b478/output/aarch64-linux-gnu/bitcoin-28efd724b478-aarch64-linux-gnu-debug.tar.gz
1b5fee5de6da1981518dd6c04542e0194a810abe9911ee4844f9c8c546279b6a guix-build-28efd724b478/output/aarch64-linux-gnu/bitcoin-28efd724b478-aarch64-linux-gnu.tar.gz
43d8427e5b93fb90
...
💬 willcl-ark commented on pull request "coins: warn on oversized `-dbcache`":
(https://github.com/bitcoin/bitcoin/pull/33333#issuecomment-3285116096)
> You mean that the uxto size is less than 48 GiB therefore the warning isn't relevant?
What I mean is, we are warning when system ram is below <various_sizes> with the %-based scheme. Why should <1.5GB free emit a warning on some systems, and < 16GB free emit a warning on others? I get that it's a best-effort algorithm approach, but just not convinced that it makes the most sense.
For example, did you consider just warning if it would leave <1.5GB free on all systems, and if so why choose
...
  (https://github.com/bitcoin/bitcoin/pull/33333#issuecomment-3285116096)
> You mean that the uxto size is less than 48 GiB therefore the warning isn't relevant?
What I mean is, we are warning when system ram is below <various_sizes> with the %-based scheme. Why should <1.5GB free emit a warning on some systems, and < 16GB free emit a warning on others? I get that it's a best-effort algorithm approach, but just not convinced that it makes the most sense.
For example, did you consider just warning if it would leave <1.5GB free on all systems, and if so why choose
...
💬 ajtowns commented on pull request "RFC: blocks: add `-reobfuscate-blocks` arg to xor existing blk/rev on startup":
(https://github.com/bitcoin/bitcoin/pull/33324#discussion_r2344113580)
Loading a large file entirely into memory when it's not necessary is just bad practice. What if we changed to .blk files of 1GB each? What if we're running on a node that's memory constrained and configured dbcache down to 4MB?
If we're worried about speed, then doing it in parallel helps on my system since obfuscation ends up CPU bound when single-threaded -- with the current code, it takes 238s (4min); with 8 threads it's 65s; with 16 threads it's 47s. Using 16MB chunks (BLOCKFILE_CHUNK_SIZ
...
  (https://github.com/bitcoin/bitcoin/pull/33324#discussion_r2344113580)
Loading a large file entirely into memory when it's not necessary is just bad practice. What if we changed to .blk files of 1GB each? What if we're running on a node that's memory constrained and configured dbcache down to 4MB?
If we're worried about speed, then doing it in parallel helps on my system since obfuscation ends up CPU bound when single-threaded -- with the current code, it takes 238s (4min); with 8 threads it's 65s; with 16 threads it's 47s. Using 16MB chunks (BLOCKFILE_CHUNK_SIZ
...
💬 vasild commented on pull request "p2p: Advance pindexLastCommonBlock early after connecting blocks":
(https://github.com/bitcoin/bitcoin/pull/32180#discussion_r2344157017)
Looks like, according to `git range-diff b7ff6a611a...3bdff9a154`, this and the suggestion above were reverted in the latest push? If that was not intentional, then maybe amend this change in the latest commit:
```diff
--- i/test/functional/p2p_ibd_stalling.py
+++ w/test/functional/p2p_ibd_stalling.py
@@ -63,29 +63,30 @@ class P2PIBDStallingTest(BitcoinTestFramework):
blocks.append(create_block(tip, create_coinbase(height), block_time))
blocks[-1].solve()
     
...
  (https://github.com/bitcoin/bitcoin/pull/32180#discussion_r2344157017)
Looks like, according to `git range-diff b7ff6a611a...3bdff9a154`, this and the suggestion above were reverted in the latest push? If that was not intentional, then maybe amend this change in the latest commit:
```diff
--- i/test/functional/p2p_ibd_stalling.py
+++ w/test/functional/p2p_ibd_stalling.py
@@ -63,29 +63,30 @@ class P2PIBDStallingTest(BitcoinTestFramework):
blocks.append(create_block(tip, create_coinbase(height), block_time))
blocks[-1].solve()
...
⚠️ Raimo33 opened an issue: "bench: unrealistic ConnectBlock benchmarks"
(https://github.com/bitcoin/bitcoin/issues/33375)
The current `ConnectBlock` benchmarks in `bench/connectblock.cpp` do not reflect realistic mainnet workloads due to three key issues:
#### 1. Unrealistic block composition
Every benchmarked block is constructed with a highly artificial transaction pattern:
```c
/*
* - Each transaction has the same number of inputs and outputs
* - All Taproot inputs use simple key path spends (no script path spends)
* - All signatures use SIGHASH_ALL (default sighash)
* - Each transaction spends all output
...
  (https://github.com/bitcoin/bitcoin/issues/33375)
The current `ConnectBlock` benchmarks in `bench/connectblock.cpp` do not reflect realistic mainnet workloads due to three key issues:
#### 1. Unrealistic block composition
Every benchmarked block is constructed with a highly artificial transaction pattern:
```c
/*
* - Each transaction has the same number of inputs and outputs
* - All Taproot inputs use simple key path spends (no script path spends)
* - All signatures use SIGHASH_ALL (default sighash)
* - Each transaction spends all output
...
💬 vasild commented on pull request "p2p: Advance pindexLastCommonBlock early after connecting blocks":
(https://github.com/bitcoin/bitcoin/pull/32180#issuecomment-3285189452)
ACK 3bdff9a154733f8f9f379448f5595a2e90474bc6 but see https://github.com/bitcoin/bitcoin/pull/32180#discussion_r2344157017, non-blocking IMO, would be nice to address
  (https://github.com/bitcoin/bitcoin/pull/32180#issuecomment-3285189452)
ACK 3bdff9a154733f8f9f379448f5595a2e90474bc6 but see https://github.com/bitcoin/bitcoin/pull/32180#discussion_r2344157017, non-blocking IMO, would be nice to address
🤔 stickies-v reviewed a pull request: "coins: warn on oversized `-dbcache`"
(https://github.com/bitcoin/bitcoin/pull/33333#pullrequestreview-3216090598)
Concept ACK
  (https://github.com/bitcoin/bitcoin/pull/33333#pullrequestreview-3216090598)
Concept ACK
💬 stickies-v commented on pull request "coins: warn on oversized `-dbcache`":
(https://github.com/bitcoin/bitcoin/pull/33333#discussion_r2343838851)
nit: using `std::numeric_limits<size_t>::max()` would avoid using a macro, and has my preference
  (https://github.com/bitcoin/bitcoin/pull/33333#discussion_r2343838851)
nit: using `std::numeric_limits<size_t>::max()` would avoid using a macro, and has my preference
💬 stickies-v commented on pull request "coins: warn on oversized `-dbcache`":
(https://github.com/bitcoin/bitcoin/pull/33333#discussion_r2344204033)
To make this more visible than just the log line, you can use `node::warnings` to expose it through RPC (e.g. `getnetworkinfo["warnings"]` and GUI:
<details>
<summary>git diff on 080a21cb12</summary>
```diff
diff --git a/src/init.cpp b/src/init.cpp
index caf1515804..782cb7f6c4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -56,6 +56,7 @@
#include <node/mempool_persist.h>
#include <node/mempool_persist_args.h>
#include <node/miner.h>
+#include <node/warnings.h>
#include <nod
...
  (https://github.com/bitcoin/bitcoin/pull/33333#discussion_r2344204033)
To make this more visible than just the log line, you can use `node::warnings` to expose it through RPC (e.g. `getnetworkinfo["warnings"]` and GUI:
<details>
<summary>git diff on 080a21cb12</summary>
```diff
diff --git a/src/init.cpp b/src/init.cpp
index caf1515804..782cb7f6c4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -56,6 +56,7 @@
#include <node/mempool_persist.h>
#include <node/mempool_persist_args.h>
#include <node/miner.h>
+#include <node/warnings.h>
#include <nod
...
💬 vasild commented on pull request "log: Mitigate disk filling attacks by rate limiting LogPrintf, LogInfo, LogWarning, LogError":
(https://github.com/bitcoin/bitcoin/pull/32604#discussion_r2344214394)
What can be removed? The `noexcept` or the entire destructor?
  (https://github.com/bitcoin/bitcoin/pull/32604#discussion_r2344214394)
What can be removed? The `noexcept` or the entire destructor?
📝 Raimo33 opened a pull request: "[WIP] cache: remove redundant find() call"
(https://github.com/bitcoin/bitcoin/pull/33376)
## Summary
This PR halves the number of implicit calls to `::find()` by using an optimistic approach: insert preemptively, remove O(1) if already spent.
## Motivation
Currently, the `::find()` calls that originate from `CCoinsViewCache::BatchWrite()` account for ~2.9% of total IBD time as shown by this flamegraph from issue #32832

## Benchmarks
Benchmarks can't currently measure this
...
  (https://github.com/bitcoin/bitcoin/pull/33376)
## Summary
This PR halves the number of implicit calls to `::find()` by using an optimistic approach: insert preemptively, remove O(1) if already spent.
## Motivation
Currently, the `::find()` calls that originate from `CCoinsViewCache::BatchWrite()` account for ~2.9% of total IBD time as shown by this flamegraph from issue #32832

## Benchmarks
Benchmarks can't currently measure this
...
📝 justinjsd opened a pull request: "new gen"
(https://github.com/bitcoin/bitcoin/pull/33377)
<!--
*** Please remove the following help text before submitting: ***
Pull requests without a rationale and clear improvement may be closed
immediately.
GUI-related pull requests should be opened against
https://github.com/bitcoin-core/gui
first. See CONTRIBUTING.md
-->
<!--
Please provide clear motivation for your patch and explain how it improves
Bitcoin Core user experience or Bitcoin Core developer experience
significantly:
* Any test improvements or new tests that improve coverage are a
...
  (https://github.com/bitcoin/bitcoin/pull/33377)
<!--
*** Please remove the following help text before submitting: ***
Pull requests without a rationale and clear improvement may be closed
immediately.
GUI-related pull requests should be opened against
https://github.com/bitcoin-core/gui
first. See CONTRIBUTING.md
-->
<!--
Please provide clear motivation for your patch and explain how it improves
Bitcoin Core user experience or Bitcoin Core developer experience
significantly:
* Any test improvements or new tests that improve coverage are a
...
✅ fanquake closed a pull request: "new gen"
(https://github.com/bitcoin/bitcoin/pull/33377)
  (https://github.com/bitcoin/bitcoin/pull/33377)
💬 instagibbs commented on pull request "txgraph: randomize order of same-feerate distinct-cluster transactions":
(https://github.com/bitcoin/bitcoin/pull/33335#discussion_r2344302600)
I didn't really mean to dive into the exact numbers, but yeah, for "rare collisions".
  (https://github.com/bitcoin/bitcoin/pull/33335#discussion_r2344302600)
I didn't really mean to dive into the exact numbers, but yeah, for "rare collisions".
✅ fanquake closed an issue: "Zero output not cleared"
(https://github.com/bitcoin/bitcoin/issues/33265)
  (https://github.com/bitcoin/bitcoin/issues/33265)