ef5291d7e8ebfd4ab14a91197ef5d0bf275586f9 tests: add a note to README.md about running tests in parallel (pythcoiner)
Pull request description:
ACKs for top commit:
edouardparis:
ACK ef5291d7e8ebfd4ab14a91197ef5d0bf275586f9
Tree-SHA512: 23430e65e05c4b54a7a9eae2110a4e17c14952bcd727284805201deedd5eeee36b2a9ebc1a612624e8a2cff3e6943d31515008c65a0b5d4fbb3a34734a3b57dd
We previously used unconfirmed change as a best-guess way of
identifying those coins from self, but now we have the
`is_from_self` field we can use it directly and be sure we only
select coins that are fully under our control.
It was using the passed height for all other calculation, except for the
invalidation itself where it was using the wider-scope-initial-tip! This
is probably a mistake due to moving it to its own, inner, function.
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
Here, the min RBF feerate is 1 more than that of the transaction
to be replaced.
The feerate of the transaction to be replaced may vary slightly
depending on the signature size and is calculated during the test.
As such, the min feerate should be set according to this
calculated value.
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.
8be0d9856b29eb30593ae7614fe74430ffd206d4 commands: add minimum feerate to TooLowFeerate error message (Aaron Carlucci)
Pull request description:
This PR adds the minimum feerate value into the `TooLowFeerate` error message for additional context. Addresses the second bullet point in #853.
ACKs for top commit:
jp1ac4:
ACK 8be0d9856b29eb30593ae7614fe74430ffd206d4. Thanks!
Tree-SHA512: 3a0e9c69ddb40433faf1e58c16dfee0212641b34478eddeda99388ebf82e2fb466633ab8f79c9bb0bb784f4a46807aa0a5abd65b9d92506144b84addb01dfdd8
f2791744d8ad3068d12a39bb07f3745012785a5f spend: set locktime for anti-fee sniping (jp1ac4)
Pull request description:
This is to resolve#44.
In the first commit, I combine the destinations and change parameters in `spend::create_spend` in order to avoid "too many arguments" error when adding a new parameter. I think these two parameters combine naturally so that `destinations` includes both recipients and change address.
The second commit sets locktime following the same approach as Bitcoin Core:
- locktime is set to current tip height, but randomly (about 10% of cases) value is set up to 100 blocks earlier
- if tip is more than 8 hours old, locktime is set to 0
For randomness, I'm currently using the current time's milliseconds in order not to add another dependency, which I think is good enough for this use case.
For consistency, I decided to use "locktime" everywhere instead of "lock time" or "lock-time".
ACKs for top commit:
darosior:
ACK f2791744d8ad3068d12a39bb07f3745012785a5f
Tree-SHA512: 69a57cf664e24b32a835c35eaf9016961b2d0f396891a826582044e6302b2ca04dcf5bf2617b5e18dcbfa25cc254a6e8025262718984095677c829ce051a66cc
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.
cc1de1d6d6710f1426a957806661e7f3461a7cb5 poller: unspend coins before spending new (jp1ac4)
1e7653e08a3778446ff677bb147df68b734a31fd tests: add function to wait while condition holds (jp1ac4)
Pull request description:
This change ensures that the spend txid of a coin is updated directly to another value in case a conflicting spend is detected.
The previous order caused the spend txid to first be cleared, which would misleadingly make the coin appear as confirmed
rather than spending.
I've added a new utils function for the functional tests 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.
ACKs for top commit:
darosior:
ACK cc1de1d6d6710f1426a957806661e7f3461a7cb5
Tree-SHA512: e3f00804a63b0e94bc1b2cbee03cac63dd6e2555ca6d301589b356b2baf8e0cf27362e1dda44018d1d8282e300b187079fcf61f5d2754263b9e8b08cd34be06e
This change ensures that the spend txid of a coin is updated
directly to another value in case a conflicting spend is
detected.
The previous order caused the spend txid to first be cleared,
which would misleadingly make the coin appear as confirmed
rather than spending.
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.