7cce13656266d90431133ccb4de5ccf086f4aa82 qa: test proc stderr isn't None before closing it (Antoine Poinsot)
ba553e9ddb104af454d9eff9969c0e37a1f3061a qa: adapt bitcoind config to support 28.0 (Antoine Poinsot)
Pull request description:
ACKs for top commit:
darosior:
ACK 7cce13656266d90431133ccb4de5ccf086f4aa82
Tree-SHA512: ff0a9addd6063cd31b8e7f76cbf2b7ed1f5e85c2d7192ed5e73bba1c81a3bb4e8740ff7c5242d054115e28e484c87f85cafcbbc4dcc4ecf24ff415a028e1b0b5
It turns out that setting both to PIPE would result in stderr not being
read for some reason. So follow
https://docs.python.org/3/library/subprocess.html and set stdout to PIPE
and stderr to STDOUT.
Tested with a process (electrs) which logs on stderr.
We introduce Taproot support in the test framework through a global
toggle. A few modifications are made to some tests to adapt them under
Taproot (notably the hardcoded fees / amounts).
This is based on my introduction of a quick and dirty support for
TapMiniscript in my python-bip380 library:
https://github.com/darosior/python-bip380/pull/23. In addition to this i
didn't want to implement a signer in the Python test suite so here we
introduce a simple Rust program based on our "hot signer" which will
sign a PSBT with an xpriv provided through its stdin and output the
signed PSBT on its stdout. Eventually it would be nicer to have a Python
signer instead of having to call a program.
The whole test suite should pass under both Taproot and P2WSH. Only a
single test is skipped for now under Taproot since it needs a finalizer
in the test suite.
I also caught a bug in the RBF tests which i fixed in place.
This adds a new utils function that is a slight generalisation
of `wait_for` with an additional condition that must always be
met while waiting.
`wait_for` now calls this new function with the condition being
one that is always true.
This reverts commit ec0c2426aa5fa6cee2efabd3ee6f175b41c35f64, reversing
changes made to 26d750d09c84734f56c2dc18cb332a232e24fb6d.
This reverts the fixes to the pruning of BIP32 derivation paths when
creating a PSBT, in preparation of reverting the merge of this feature
altogether. This is because always creating PSBT with only the BIP32
derivations for a single path broke the Ledger support.
At startup it sometimes appear we may be hanging when setting up
bitcoind. Add more loading to give more information about what's taking
long to setup (for instance, loading the watchonly wallet).
The outpoints argument could eventually be made optional in order to
introduce some automated coin selection. So it makes more sense for it
to be after a required parameter, the destinations.
In config, expect to be given a multipath descriptor that contains a
derivation path for both receive and change addresses, but only for
those.
Instead of 'xpub/*', start using 'xpub/0/*' and 'xpub/1/*'.
When creating the watchonly wallet on bitcoind import both the receive
and change descriptors.
When polling, check for coins on both descriptors.
This replaces our existing implementation of PSBTs with a more
straightforward one, adapted from the Bitcoin Core functional tests
framework. This fixes a few flakes that occured because the previous
implementation could produce invalid PSBTs.
The Bitcoin Core implementation is pretty low level and was adapted to
treat mappings as such (the value in the PSBTMap can itself be a
mapping, like for partial signatures or BIP32 derivation paths).
The rest of the diff is adapting the users of PSBT to use the new
implementation and the clearly superior interface (yay!).
Since the Spend transaction command requires some parameters, this
implements the parameter-getting logic on the JSONRPC side as well.
This allows us to implement an end-to-end functional test of the
transaction flow using an external way to broadcast it. From the input
coins creation, to the Spend transaction broadcast.