Bitcoin Core Github
44 subscribers
120K links
Download Telegram
💬 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
...
💬 Sjors commented on issue "guix: Windows build is non-deterministic across build architectures":
(https://github.com/bitcoin/bitcoin/issues/32923#issuecomment-3055925920)
The most recent change in `prevector.h`, and the only one that hasn't been shipped in a release yet, was a40e9536588c366886de4f4b9d67b8665a509929. But that just removed the reverse iterator, which this doesn't use afaik.

You could try initiazing `std::vector<CRecipient> vecSend;` with the size of `recipients`, which might result in different code paths. Though even if that restored determinism it wouldn't fix the underlying issue.
💬 achow101 commented on issue "guix: Windows build is non-deterministic across build architectures":
(https://github.com/bitcoin/bitcoin/issues/32923#issuecomment-3055948842)
#32930 seems like it results in a different enough code path to workaround this issue.

Ultimately, this seems like an upstream compiler bug.
💬 Sjors commented on pull request "Resolve guix non-determinism with emplace_back instead of push_back":
(https://github.com/bitcoin/bitcoin/pull/32930#issuecomment-3055983620)
Concept ACK

I'll spin up a new aarch64 guix machine to test if this _actually_ makes determinism go away. Even if it doesn't the change itself is fine since it removes a line, but you'd have to change the commit message.

3add4b365c90c0943f18dd26d4a18c1e2ee5860e builds and passes the tests locally for me on Apple Silicon macOS 15.5. Not sure what's up with CI.
💬 maflcko commented on pull request "rpc, test: Fix JSON parsing errors in unloadwallet and getdescriptoractivity RPCs":
(https://github.com/bitcoin/bitcoin/pull/32845#discussion_r2196815142)
I think the function from a functionality perspective is fine, but symbols in the signature could be renamed for clarity.