π¬ romanz commented on pull request "Replace libevent with our own HTTP and socket-handling implementation":
(https://github.com/bitcoin/bitcoin/pull/32061#issuecomment-2848493348)
tACK https://github.com/bitcoin/bitcoin/commit/7d301184016a3f59c2e363dff631263cdbe21da0
Tested with both [electrs](https://github.com/romanz/electrs) and [bindex](https://github.com/romanz/bindex-rs).
(https://github.com/bitcoin/bitcoin/pull/32061#issuecomment-2848493348)
tACK https://github.com/bitcoin/bitcoin/commit/7d301184016a3f59c2e363dff631263cdbe21da0
Tested with both [electrs](https://github.com/romanz/electrs) and [bindex](https://github.com/romanz/bindex-rs).
π rkrux opened a pull request: "doc: update CWallet::SignTransaction doc to mention SIGHASH_DEFAULT"
(https://github.com/bitcoin/bitcoin/pull/32411)
While `SIGHASH_DEFAULT` & `SIGHASH_ALL` are effectively the same, it's helpful to mention in the function doc exactly what's present in the code.
It can be seen in the function implementation that `SIGHASH_DEFAULT` is passed to the overloaded `SignTransaction` function.
Ref: https://github.com/bitcoin/bitcoin/blob/f490f5562d4b20857ef8d042c050763795fd43da/src/wallet/wallet.cpp#L2177-L2194
<!--
*** Please remove the following help text before submitting: ***
Pull requests without a ra
...
(https://github.com/bitcoin/bitcoin/pull/32411)
While `SIGHASH_DEFAULT` & `SIGHASH_ALL` are effectively the same, it's helpful to mention in the function doc exactly what's present in the code.
It can be seen in the function implementation that `SIGHASH_DEFAULT` is passed to the overloaded `SignTransaction` function.
Ref: https://github.com/bitcoin/bitcoin/blob/f490f5562d4b20857ef8d042c050763795fd43da/src/wallet/wallet.cpp#L2177-L2194
<!--
*** Please remove the following help text before submitting: ***
Pull requests without a ra
...
π¬ mrberlinorg commented on issue "Removing the check for nDataOut > 1 would allow multiple OP_RETURN outputs in a single transaction, which goes against the standard behavior of the Bitcoin protocol. This could introduce several issues:":
(https://github.com/bitcoin/bitcoin/issues/32402#issuecomment-2848517542)
The core issue with the recent OP_RETURN limit change isnβt the size itself, but that it allows an unlimited number of its outputs per transaction. the PR creator force-resolved my comment. Itβs shocking that *a random individual* can arbitrarily change such a base Bitcoin rule.

(https://github.com/bitcoin/bitcoin/issues/32402#issuecomment-2848517542)
The core issue with the recent OP_RETURN limit change isnβt the size itself, but that it allows an unlimited number of its outputs per transaction. the PR creator force-resolved my comment. Itβs shocking that *a random individual* can arbitrarily change such a base Bitcoin rule.

π rkrux opened a pull request: "Musig2 fields followups"
(https://github.com/bitcoin/bitcoin/pull/32412)
<!--
*** 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 improv
...
(https://github.com/bitcoin/bitcoin/pull/32412)
<!--
*** 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 improv
...
π¬ romanz commented on pull request "Replace libevent with our own HTTP and socket-handling implementation":
(https://github.com/bitcoin/bitcoin/pull/32061#discussion_r2072365927)
It seems to still return a `std::string`:
```
src/util/string.cpp: std::string LineReader::ReadLength(size_t len)
src/util/string.h: std::string ReadLength(size_t len);
```
(https://github.com/bitcoin/bitcoin/pull/32061#discussion_r2072365927)
It seems to still return a `std::string`:
```
src/util/string.cpp: std::string LineReader::ReadLength(size_t len)
src/util/string.h: std::string ReadLength(size_t len);
```
π¬ romanz commented on pull request "Replace libevent with our own HTTP and socket-handling implementation":
(https://github.com/bitcoin/bitcoin/pull/32061#discussion_r2072367360)
nit: `key` & `value` can also be a `string_view` (here and below)
(https://github.com/bitcoin/bitcoin/pull/32061#discussion_r2072367360)
nit: `key` & `value` can also be a `string_view` (here and below)
π rkrux opened a pull request: "test: test that descriptorprocesspsbt removes non witness utxos in PSBT"
(https://github.com/bitcoin/bitcoin/pull/32413)
`descriptorprocesspsbt` RPC uses a different flow internally from the `walletprocesspsbt` RPC, which was already tested in the tests.
This patch ensures that `descriptorprocesspsbt` RPC can correctly sign the PSBT while removing the non witness UTXOs in case of Segwit V1 only inputs.
This was identified in the review of #31622 PR.
Ref: https://github.com/bitcoin/bitcoin/pull/31622#discussion_r1979463960
<!--
*** Please remove the following help text before submitting: ***
Pull requ
...
(https://github.com/bitcoin/bitcoin/pull/32413)
`descriptorprocesspsbt` RPC uses a different flow internally from the `walletprocesspsbt` RPC, which was already tested in the tests.
This patch ensures that `descriptorprocesspsbt` RPC can correctly sign the PSBT while removing the non witness UTXOs in case of Segwit V1 only inputs.
This was identified in the review of #31622 PR.
Ref: https://github.com/bitcoin/bitcoin/pull/31622#discussion_r1979463960
<!--
*** Please remove the following help text before submitting: ***
Pull requ
...
π¬ rkrux commented on pull request "psbt: add non-default sighash types to PSBTs and unify sighash type match checking":
(https://github.com/bitcoin/bitcoin/pull/31622#discussion_r2072380490)
I attempted this^ in PR #32413.
(https://github.com/bitcoin/bitcoin/pull/31622#discussion_r2072380490)
I attempted this^ in PR #32413.
π¬ pinheadmz commented on issue "Removing the check for nDataOut > 1 would allow multiple OP_RETURN outputs in a single transaction, which goes against the standard behavior of the Bitcoin protocol. This could introduce several issues:":
(https://github.com/bitcoin/bitcoin/issues/32402#issuecomment-2848598024)
> Non-standard transactions: Multiple OP_RETURN outputs in a transaction are considered non-standard. Allowing them could lead to network inconsistencies, as some nodes might not be able to properly process or relay these transactions.
Bitcoin Core changes relay policy regularly, here's one: https://github.com/bitcoin/bitcoin/pull/30239 The policy change rolls out over time on the network and although that literally does "lead to network inconsistencies" that doesn't affect any user's usage of
...
(https://github.com/bitcoin/bitcoin/issues/32402#issuecomment-2848598024)
> Non-standard transactions: Multiple OP_RETURN outputs in a transaction are considered non-standard. Allowing them could lead to network inconsistencies, as some nodes might not be able to properly process or relay these transactions.
Bitcoin Core changes relay policy regularly, here's one: https://github.com/bitcoin/bitcoin/pull/30239 The policy change rolls out over time on the network and although that literally does "lead to network inconsistencies" that doesn't affect any user's usage of
...
β
pinheadmz closed an issue: "Removing the check for nDataOut > 1 would allow multiple OP_RETURN outputs in a single transaction, which goes against the standard behavior of the Bitcoin protocol. This could introduce several issues:"
(https://github.com/bitcoin/bitcoin/issues/32402)
(https://github.com/bitcoin/bitcoin/issues/32402)
π¬ hodlinator commented on pull request "util: explicitly close all AutoFiles that have been written":
(https://github.com/bitcoin/bitcoin/pull/29307#discussion_r2072389405)
In that case it would be better to call it `bool AutoFile::Close()` rather than `AutoFile::fclose`.
(https://github.com/bitcoin/bitcoin/pull/29307#discussion_r2072389405)
In that case it would be better to call it `bool AutoFile::Close()` rather than `AutoFile::fclose`.
π¬ rkrux commented on pull request "psbt: MuSig2 Fields":
(https://github.com/bitcoin/bitcoin/pull/31247#discussion_r2072389863)
I did this in #32412.
(https://github.com/bitcoin/bitcoin/pull/31247#discussion_r2072389863)
I did this in #32412.
π andrewtoth opened a pull request: "validation: periodically flush dbcache during reindex-chainstate"
(https://github.com/bitcoin/bitcoin/pull/32414)
After #30611 we periodically do a non-erasing flush of the dbcache to disk roughly every hour during IBD.
The intention was to also do this periodic flush during reindex-chainstate, so we would not risk losing progress during a system failure when reindexing with a high dbcache value.
It was discovered that reindex-chainstate does not perform a PERIODIC flush until it has already reached the tip. Since reindexing to tip usually happens within 24 hours, this behaviour was unnoticed with the p
...
(https://github.com/bitcoin/bitcoin/pull/32414)
After #30611 we periodically do a non-erasing flush of the dbcache to disk roughly every hour during IBD.
The intention was to also do this periodic flush during reindex-chainstate, so we would not risk losing progress during a system failure when reindexing with a high dbcache value.
It was discovered that reindex-chainstate does not perform a PERIODIC flush until it has already reached the tip. Since reindexing to tip usually happens within 24 hours, this behaviour was unnoticed with the p
...
π¬ andrewtoth commented on pull request "validation: periodically flush dbcache during reindex-chainstate":
(https://github.com/bitcoin/bitcoin/pull/32414#issuecomment-2848617247)
Thanks to @l0rinc for discovering this behaviour, and @mzumsande for the suggested fix.
(https://github.com/bitcoin/bitcoin/pull/32414#issuecomment-2848617247)
Thanks to @l0rinc for discovering this behaviour, and @mzumsande for the suggested fix.
π¬ l0rinc commented on pull request "util: explicitly close all AutoFiles that have been written":
(https://github.com/bitcoin/bitcoin/pull/29307#discussion_r2072395486)
Agree, it's what I wrote in the review as well:
> the current `fclose` returns a fake error code, but is actually a boolean - may make sense to rename it (e.g. `Close`, similarly to how we've wrapped `ftruncate` with `TruncateFile`) and migrate to returning a boolean to avoid the current confusion.
(https://github.com/bitcoin/bitcoin/pull/29307#discussion_r2072395486)
Agree, it's what I wrote in the review as well:
> the current `fclose` returns a fake error code, but is actually a boolean - may make sense to rename it (e.g. `Close`, similarly to how we've wrapped `ftruncate` with `TruncateFile`) and migrate to returning a boolean to avoid the current confusion.
π l0rinc's pull request is ready for review: "log: print reason when writing chainstate"
(https://github.com/bitcoin/bitcoin/pull/32404)
(https://github.com/bitcoin/bitcoin/pull/32404)
π¬ l0rinc commented on pull request "log: print reason when writing chainstate":
(https://github.com/bitcoin/bitcoin/pull/32404#issuecomment-2848685153)
The new logs can help visualize the flush times and reasons during IBD now - reindex-chainstate periodic flushes require https://github.com/bitcoin/bitcoin/pull/32414

(https://github.com/bitcoin/bitcoin/pull/32404#issuecomment-2848685153)
The new logs can help visualize the flush times and reasons during IBD now - reindex-chainstate periodic flushes require https://github.com/bitcoin/bitcoin/pull/32414

π€ l0rinc requested changes to a pull request: "validation: periodically flush dbcache during reindex-chainstate"
(https://github.com/bitcoin/bitcoin/pull/32414#pullrequestreview-2813262035)
I'm verifying is this fixes things or not, whether it slows down anything - or if it changes caching behavior in any other way.
Regardless, I think we should cover this with a test - do you think we could extend e.g. https://github.com/bitcoin/bitcoin/blob/master/test/functional/feature_reindex.py with an `assert_debug_log` checking the periodic write logs of https://github.com/bitcoin/bitcoin/pull/32404?
(https://github.com/bitcoin/bitcoin/pull/32414#pullrequestreview-2813262035)
I'm verifying is this fixes things or not, whether it slows down anything - or if it changes caching behavior in any other way.
Regardless, I think we should cover this with a test - do you think we could extend e.g. https://github.com/bitcoin/bitcoin/blob/master/test/functional/feature_reindex.py with an `assert_debug_log` checking the periodic write logs of https://github.com/bitcoin/bitcoin/pull/32404?
π¬ l0rinc commented on pull request "validation: periodically flush dbcache during reindex-chainstate":
(https://github.com/bitcoin/bitcoin/pull/32414#issuecomment-2848739902)
I can confirm that this fixes the periodic flushes for `-reindex-chainstate`:
<details>
<summary>Details</summary>
```
cat debug-7fc8d7f9c1f0fe3795b397327e38465ee6f76b83-1746277780.log | grep FlushStateToDisk
2025-05-03T14:14:56Z [coindb] FlushStateToDisk write: flush mode=PERIODIC, prune=0, cache_large=0, cache_critical=0, periodic=1
2025-05-03T15:16:31Z [coindb] FlushStateToDisk write: flush mode=PERIODIC, prune=0, cache_large=0, cache_critical=0, periodic=1
2025-05-03T16:16:31Z [co
...
(https://github.com/bitcoin/bitcoin/pull/32414#issuecomment-2848739902)
I can confirm that this fixes the periodic flushes for `-reindex-chainstate`:
<details>
<summary>Details</summary>
```
cat debug-7fc8d7f9c1f0fe3795b397327e38465ee6f76b83-1746277780.log | grep FlushStateToDisk
2025-05-03T14:14:56Z [coindb] FlushStateToDisk write: flush mode=PERIODIC, prune=0, cache_large=0, cache_critical=0, periodic=1
2025-05-03T15:16:31Z [coindb] FlushStateToDisk write: flush mode=PERIODIC, prune=0, cache_large=0, cache_critical=0, periodic=1
2025-05-03T16:16:31Z [co
...
π theStack opened a pull request: "scripted-diff: adapt script error constant names in feature_taproot.py"
(https://github.com/bitcoin/bitcoin/pull/32415)
While reviewing #31622 I noticed that the constant name `(SCRIPT_)ERR_SIG_HASHTYPE` is used for two different script verification error codes, namely one for legacy and one for Schnorr signatures:
https://github.com/bitcoin/bitcoin/blob/eba5f9c4b63fe46261fbb3e71b9a94832d105b23/src/script/script_error.cpp#L56-L57
https://github.com/bitcoin/bitcoin/blob/eba5f9c4b63fe46261fbb3e71b9a94832d105b23/test/functional/feature_taproot.py#L600
In order to resolve this confusion, this PR adapts all scr
...
(https://github.com/bitcoin/bitcoin/pull/32415)
While reviewing #31622 I noticed that the constant name `(SCRIPT_)ERR_SIG_HASHTYPE` is used for two different script verification error codes, namely one for legacy and one for Schnorr signatures:
https://github.com/bitcoin/bitcoin/blob/eba5f9c4b63fe46261fbb3e71b9a94832d105b23/src/script/script_error.cpp#L56-L57
https://github.com/bitcoin/bitcoin/blob/eba5f9c4b63fe46261fbb3e71b9a94832d105b23/test/functional/feature_taproot.py#L600
In order to resolve this confusion, this PR adapts all scr
...