Bitcoin Core Github
44 subscribers
121K links
Download Telegram
🚀 achow101 merged a pull request: "wallet, test: best block locator matches scan state follow-ups"
(https://github.com/bitcoin/bitcoin/pull/32580)
📝 hodlinator opened a pull request: "qa: Avoid knock-on exception in assert_start_raises_init_error"
(https://github.com/bitcoin/bitcoin/pull/32929)
Raising a new exception from within a Python `except`-block causes the interpreter to generate extra error output which is unnecessary in this case.

Found while testing #32835 using the suggested method (https://github.com/bitcoin/bitcoin/pull/32835#issue-3188748624) which triggered expected timeouts, but with the extra error noise.

<details><summary>Example output before & after this PR</summary>

Before:
```
2025-07-08T20:05:48.407001Z TestFramework (ERROR): Assertion failed
Traceba
...
💬 mzumsande commented on pull request "index: fix wrong assert of current_tip == m_best_block_index":
(https://github.com/bitcoin/bitcoin/pull/32878#issuecomment-3054182296)
General question - should we remove the assert, or would it maybe be better to keep it, but commit the best block index before calling `Rewind()` in `Sync()`?
💬 pablomartin4btc commented on pull request "rpc, test: Fix JSON parsing errors in unloadwallet and getdescriptoractivity RPCs":
(https://github.com/bitcoin/bitcoin/pull/32845#discussion_r2196069916)
Thanks for the follow-up. The current fix is wrong. Looking at the original `getdescriptoractivity` [implementation](https://github.com/bitcoin/bitcoin/pull/30708) PR samples and tests, also checking the logic in the RPC, the second array, descriptors, has to be provided. Now, the first one, blockhashes, could be empty and activities may be returned in result if there are any in the mempool (3rd parameter `include_mempool` is true by default, but if the user sets it to false, the RPC is still us
...
💬 pablomartin4btc commented on pull request "rpc, test: Fix JSON parsing errors in unloadwallet and getdescriptoractivity RPCs":
(https://github.com/bitcoin/bitcoin/pull/32845#discussion_r2196177876)
> just want to prevent .get_array() from throwing

Yes, plus we need to validate both arrays... we could make blockhashes not optional but we can't do the same with descriptors (`scan_objects_arg_desc`) as it's used in different places.
💬 achow101 commented on pull request "validation: Add eligible ancestors of reconsidered block to setBlockIndexCandidates":
(https://github.com/bitcoin/bitcoin/pull/30479#issuecomment-3054466669)
ACK 8cc3ac6c2328873e57c31f237d194c5f22b6748a
💬 ryanofsky commented on pull request "rpc: Handle -named argument parsing where '=' character is used":
(https://github.com/bitcoin/bitcoin/pull/32821#discussion_r2196208483)
In commit "rpc: Handle -named argument parsing where Base64 encoding is used" (bc2241ab3d01a38f19588cb85134e5330b77e3f4)

Thanks for the updates!

Looking at more closely at this solution, some things don't make sense to me. This code from lines 513-515 is checking to see if a command line argument that parses as NAME=VALUE has a NAME that is listed in the table above as a known string parameter. But if it is instead of adding the parameter to `params` and passing the argument by name, it is
...
achow101 closed an issue: "Assertion `setBlockIndexCandidates.count(pindex)' failed"
(https://github.com/bitcoin/bitcoin/issues/16444)
🚀 achow101 merged a pull request: "validation: Add eligible ancestors of reconsidered block to setBlockIndexCandidates"
(https://github.com/bitcoin/bitcoin/pull/30479)
💬 pstratem commented on pull request "Cache m_cached_finished_ibd where SetTip is called.":
(https://github.com/bitcoin/bitcoin/pull/32885#issuecomment-3055626490)
> Concept ACK, but I'm not convinced this implementation is safe as-is. If we want to maintain the current behaviour, it's not sufficient to update only when the tip changes. We also need to re-check when importing/reindexing completes, and schedule an update timer if max_tip_age is the final cause of not exiting IBD.

This made me revisit the function and consider what we're trying to achieve.

The function is only interesting when it can latch to the IBD finished state.

That's only poss
...
💬 achow101 commented on issue "guix: Windows build is non-deterministic across build architectures":
(https://github.com/bitcoin/bitcoin/issues/32923#issuecomment-3055693691)
#32597 being the cause of this non-determinism doesn't make any sense to me.

The function with the non-determinsm is `WalletModel::prepareTransaction` which is a GUI only function that was not modified by #32597. That PR didn't change anything remotely near that, so it being the root cause makes no sense.

addr2line indicates that the problematic line corresponds to https://github.com/bitcoin/bitcoin/blob/a40e9536588c366886de4f4b9d67b8665a509929/src/prevector.h#L174 After unwrapping all of the
...
📝 achow101 opened a pull request: "Resolve guix non-determinism with emplace_back instead of push_back"
(https://github.com/bitcoin/bitcoin/pull/32930)
For some reason, building x86_64-w64-mingw32 on x86_64 and aarch64 results in a single instruction difference which can be traced down to prevector.h:174. The ultimate caller of this is the copy constructor for a prevector that ends up being called by std::vector::push_back in walletmodel.cpp:183. By replacing the push_back with an emplace_back, somehow this non-determinism goes away.

Closes #32923
💬 maflcko commented on pull request "Resolve guix non-determinism with emplace_back instead of push_back":
(https://github.com/bitcoin/bitcoin/pull/32930#issuecomment-3055855671)
lgtm ACK 3add4b365c90c0943f18dd26d4a18c1e2ee5860e

Haven't tested a guix build, but the changes lgtm
💬 achow101 commented on pull request "Resolve guix non-determinism with emplace_back instead of push_back":
(https://github.com/bitcoin/bitcoin/pull/32930#issuecomment-3055856542)
x86_64 guix build:

```
$ find guix-build-3add4b365c90/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
5d3ec518a66bcff88ae4032a352119945ecae1cad0337bdadc84315dd9405a2c guix-build-3add4b365c90/output/dist-archive/bitcoin-3add4b365c90.tar.gz
9a317eb639f20191d13df01c11cd71d6da0f2593c9b6048f882ef40e0a080cc1 guix-build-3add4b365c90/output/x86_64-w64-mingw32/SHA256SUMS.part
083fb802296373e8d0faa4fdda4ce072f0f95f9443e9ba0682cb5da6dc55d7b6 guix-build-3add4b365c90/output/x86
...
💬 maflcko commented on issue "guix: Windows build is non-deterministic across build architectures":
(https://github.com/bitcoin/bitcoin/issues/32923#issuecomment-3055873569)
> The function with the non-determinsm is `WalletModel::prepareTransaction` which is a GUI only function that was not modified by [#32597](https://github.com/bitcoin/bitcoin/pull/32597). That PR didn't change anything remotely near that, so it being the root cause makes no sense.

My guess would be that one of the O2 passes (or the linker) is confused by the `std::map` changes in the header. (`wallet.h` is included in that gui module)
💬 dstadulis commented on issue "guix: Windows build is non-deterministic across build architectures":
(https://github.com/bitcoin/bitcoin/issues/32923#issuecomment-3055875782)
Nice catch!

tldr: seems there should be no *logical* difference between the two -- but CMIIW:

## Assessing the differences

Two changes exist between the two segments of machine code:

1. Registry Extension prefix of the `cmpq` instruction
2. The encoding of the operands are switched, in x86 assembly syntax convention.

Let's try to decode the logical effect of the changes!

A consequential, control-flow op code `cmpq` which sets "[condition codes](https://www.cs.cmu.edu/afs/cs/academic/class/
...
⚠️ achow101 opened an issue: "guix: Zip file non-determinism when building in WSL"
(https://github.com/bitcoin/bitcoin/issues/32931)
In debugging #32923, I found that while it is possible to do a guix build in WSL on a aarch64 machine, the resulting zip files did not match the build on x86_64. The binaries within the zip files matched, and it appears the non-determinism comes from zip including the file permissions. This is presumably because the WSL build occurs on a NTFS drive which handles file permissions differently from other unix file systems.

Diffoscope output:
```diff
--- x86_64-zipinfo 2025-07-09 23:52:39.650231781
...