-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Description
I maintain a wallet that uses bitcoin-cli
for signing transactions, and its test system uses regtest to create a bunch of UTXOs for the signing tests to sign. These tests use a git-committed wallet.dat
that is copied into the newly-created datadir
before launching bitcoind
.
For years, up until bc886fc (part of #24699), this was stable and worked well. Occasionally I would need to recreate all the transactions when this project changed mining (#24732) or coin selection (#24584) but I could handle that.
What I can't handle is having the generated transactions be different each time I run the exact same sequence of bitcoin-cli
commands starting from the same wallet.dat
. Starting with bc886fc, that's what happens.
Is this a supported use model, or is it unreasonable to expect this to be stable?
Summarizing:
- v0.20.0 -- stable
- v0.21.0 -- stable
- v22.0 -- stable
- v23.0 -- stable
- 2723560 (which is bc886fc^) -- stable
- bc886fc -- unstable
- v24.0rc2 -- unstable
- Current master (f37bd15) -- unstable
Expected behavior
The generated transactions should be identical given an identical series of bitcoin-cli
calls.
Actual behavior
The generated transactions choose different input coins from the regtest blockchain every time I run.
To reproduce
In my Glacier wallet fork, run t/online_regtest_wallet.py recreate-all-tests
; git commit the result. Run the same command again -- git status
should show no changes.
When it's unstable, dozens of files change.
System information
Running on Whonix 16. Building inside the git repo as such:
(cd depends && make -j4 NO_QT=1) && ./autogen.sh && ./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu && make -j4