68 Commits

Author SHA1 Message Date
Antoine Poinsot
a076a83cba
Reset the daemon and GUI versions post 0.4 branch-off 2023-04-13 08:54:18 +02:00
Antoine Poinsot
baf68e8224
lianad: bump version 2023-04-10 11:23:55 +02:00
Antoine Poinsot
aa415570b8
Merge #393: Backward compat functional test
6cc4efd303bb5e5cc5a1d50a4925428429f93ab9 ci: run the backward compat functional test (Antoine Poinsot)
96ff447fc98d50f72142abe1f1619bade768c8ec tests: add a datadir migration functional test (Antoine Poinsot)

Pull request description:

  Based off #392.

  This introduces a backward-compatibility functional test. For now it really is targeted at testing the DB migration from 0.3 to the upcoming 0.4, but the concept is also useful more generally to automatically test backward compatibility between our releases.

ACKs for top commit:
  darosior:
    self-ACK 6cc4efd

Tree-SHA512: cb52a5de2de73d1e5b0bce51bbc7f586b63e1b67fdd95026be09134ab764d047ab33f0965f28700a2fef13108e9637937860edac03c49a7392f0cd71c3d03657
2023-04-06 14:02:17 +02:00
Antoine Poinsot
e8186eeaa9
tests: fix a race in the reorg exclusion test 2023-04-05 19:17:06 +02:00
Antoine Poinsot
96ff447fc9
tests: add a datadir migration functional test
This is currently to test database migrations at the functional level, but
is also more generally useful to test backward compatibility.
2023-04-05 17:30:01 +02:00
Antoine Poinsot
f262ca2d1c
tests: reduce the number of workers for the executor
We don't use the executor much anyways.
2023-04-05 12:41:04 +02:00
Antoine Poinsot
104c6e1a09
commands: add an 'updated_at' field to listspendtxs entries 2023-04-05 12:41:03 +02:00
Antoine Poinsot
7211b96ca9
tests: extend the recovery functional tests for multipath descriptors 2023-04-04 11:53:24 +02:00
Antoine Poinsot
b20cdd0cd8
tests: introduce a lianad_multipath fixture as well as a trivial test 2023-04-04 11:53:24 +02:00
Antoine Poinsot
0d75f0a2c7
tests: handle multiple recovery paths in MultiSigner 2023-04-04 11:53:23 +02:00
Antoine Poinsot
3aa9980635
tests: simplify the MultiSigner 2023-04-04 11:53:23 +02:00
Antoine Poinsot
75ea367235
tests: make most of the body of the multisig test a general helper
We'll exercise the same commands for the multipath test, except for the
recovery. DRY.
2023-04-04 11:53:22 +02:00
Antoine Poinsot
d68d0e1134
commands: adapt 'createrecovery' to multiple recovery paths 2023-04-04 11:53:22 +02:00
Antoine Poinsot
48deb3b7f0
tests: update pytest to work with Python >= 3.10 2023-03-28 13:07:24 +02:00
Antoine Poinsot
b8cd0d0e27
Bump version to 0.3 2023-02-27 14:46:28 +01:00
Antoine Poinsot
af058d59e3
bitcoind: detect deposits from (mature) coinbase transactions 2023-02-04 13:21:20 +01:00
Antoine Poinsot
d0de88bc01
daemon: release 0.2 2023-02-03 16:10:20 +01:00
Antoine Poinsot
3a573b695e
qa: test we discard RBF'd deposits 2023-02-03 13:22:05 +01:00
Antoine Poinsot
f1532f8afc
bitcoin: track expired unconfirmed deposits, remove them from DB 2023-02-03 13:17:26 +01:00
Antoine Poinsot
13214c887f
qa: test we discard RBF'd deposits when replacement is confirmed 2023-02-02 17:32:08 +01:00
Antoine Poinsot
1cd61c9236
descriptors: require that an origin be set for the keys.
It would be possible for users to create a descriptor with xpubs without
an origin set. In fact, not many are used to origins and it's a very
likely mistake. Signers need this information in order to be able to
sign. So they could potentially create a wallet and potentially never be
able to sign for one or multiple keys.

Fix this by requiring an origin for all keys in the descriptor.
2023-02-01 13:54:18 +01:00
Antoine Poinsot
9290596823
qa: test using lianad with a multisig descriptor 2023-01-24 19:38:35 +01:00
Antoine Poinsot
3c82173f46
qa: abstract the signer from the Lianad class
That's prep work to introduce a multisig
2023-01-24 19:38:34 +01:00
edouard
103c1950ba Remove change_index from listspendtxs response
Multiple change indexes may be present in a spend
draft transaction and can be detected instead
in the response psbt with the bip32_derivation
outputs fields.
2022-12-20 14:00:16 +01:00
Antoine Poinsot
ad1f0e20b1
Merge #182: Recovery command to sweep "expired" coins
ba994ff8ff01d04fd31ed77cf7f66e0862e68e17 commands: do not underestimate the size of created transactions (Antoine Poinsot)
46a94d6c8eb144484a4b0df2ddbd48b32d4d096f qa: test recovery 'sweep' transaction creation (Antoine Poinsot)
3b5cbd5122fa53d0247e82dd7fc703b5d0a4bae3 qa: introduce a sign_and_broadcast utility (Antoine Poinsot)
d362885b85107b616447899d5eaaa5ba1b55c170 qa: record the recovery xpub too (Antoine Poinsot)
a69fb625ea3b8dfbfa1bf384e001f167fd04ff86 qa: use a CSV of 10 for recovery (Antoine Poinsot)
a78f46fa2fc5337c51d1eaa6ac6bbee04cfdf437 [refactoring] jsonrpc: sort command names alphabetically (Antoine Poinsot)
c09ae3f87bc8bb2391d88d1a718b35d4a6c568fa commands, jsonrpc: add a new 'createrecovery' command (Antoine Poinsot)
3d5d0134b4b5bc06910a89d23def36de5b548c30 commands: fix the capacity of input vectors in create_spend (Antoine Poinsot)
f2312593da8b27c6c6a69c7b0463959369c5acb6 commands: check for dust outputs in the PSBT sanity checks (Antoine Poinsot)
9f23161a53ad32d03d4ec464c48a819862dbf3e5 commands: correct the max feerate value (Antoine Poinsot)
54410cd9c435e1e6228b985d78e55b357c2368b8 database: allow to query coins by their spending status (Antoine Poinsot)

Pull request description:

  A new command that provides a simple way for a user to sweep all the coins whose timelocked recovery path is available.

  The first part of #180. Note this also contains a number of drive-by fixes that i noticed while coding this up.

ACKs for top commit:
  darosior:
    self-ACK ba994ff8ff01d04fd31ed77cf7f66e0862e68e17 -- tested by Edouard on the GUI

Tree-SHA512: 002cb8602370fe3bec0692fe7bbe9e7af494b43756d3092da99b37e4ce2837bcdfcfb3afe7043900eb41c70de12e2129e19363b9efe41cee91c7f1f7c2824fb0
2022-12-13 18:17:14 +01:00
Antoine Poinsot
b74a6ffc16
qa: unflake test_rescan_edge_cases
We weren't waiting for lianad to be back to the same height as bitcoind.
Necessarily it could happen that sorted_coins() would return an empty
list.

Fixes #142 (did 50 successful runs of the test)
2022-12-13 16:59:57 +01:00
Antoine Poinsot
46a94d6c8e
qa: test recovery 'sweep' transaction creation 2022-12-13 15:34:25 +01:00
Antoine Poinsot
3b5cbd5122
qa: introduce a sign_and_broadcast utility 2022-12-09 12:27:50 +01:00
Antoine Poinsot
d362885b85
qa: record the recovery xpub too 2022-12-09 12:27:49 +01:00
Antoine Poinsot
a69fb625ea
qa: use a CSV of 10 for recovery 2022-12-09 12:27:49 +01:00
Antoine Poinsot
07e5ea3fd2
commands: fill non_witness_utxo field in PSBT inputs for createspend
We are still in segwit v0, so signers need it!!
2022-12-09 10:49:49 +01:00
Antoine Poinsot
dc61a1c3bd
commands: remove discrepancy between blockheight and block_height 2022-12-07 11:42:17 +01:00
Antoine Poinsot
62067f0030
qa: remove needless import in fixtures 2022-12-05 10:04:03 +01:00
Antoine Poinsot
5721ab0fde
qa: test spent coins are always marked as such 2022-11-23 11:51:28 +01:00
Antoine Poinsot
c39cb07360 qa: functional test for transaction listing commands 2022-11-22 19:31:02 +01:00
Antoine Poinsot
f5ff0fad36
daemon: 'revaultd' name usage leftovers 2022-11-18 18:33:07 +01:00
Antoine Poinsot
968a7d17a0
daemon: rename Minisafe to Liana 2022-11-17 17:10:22 +01:00
Antoine Poinsot
4bd65213e2
commands: swap the outpoints and destinations arguments to createspend
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.
2022-11-17 15:15:22 +01:00
Antoine Poinsot
94d8ea6d60
qa: test "next derivation index" update from onchain usage 2022-11-16 15:46:26 +01:00
Antoine Poinsot
55cf21fa2a
qa: unflake the getinfo RPC functional test 2022-11-14 09:48:09 +01:00
Antoine Poinsot
8a22f5e8c9
qa: functional tests for block chain rescans 2022-11-14 09:20:28 +01:00
Antoine Poinsot
117171f24f
commands: use a separate key chain for change addresses 2022-10-24 15:00:17 +02:00
Antoine Poinsot
1320ee30ba
daemon: use multipath descriptors
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.
2022-10-24 15:00:14 +02:00
Antoine Poinsot
d4db804e4b
qa: add a missing 'wait_for' in spend creation test 2022-10-24 15:00:14 +02:00
Antoine Poinsot
846d924792
qa: upgrade python-bip380 to latest master
For multipath descriptors support
2022-10-24 15:00:11 +02:00
Antoine Poinsot
f3e93df80c
qa: add missing sighash type to dummy signatures in test_update_spend 2022-10-20 16:37:47 +02:00
Antoine Poinsot
b89401e583
qa: remove an unused variable in test_update_spend
The new PSBT implementation brought it to light.
2022-10-19 12:07:22 +02:00
Antoine Poinsot
af9f0aeaed
qa: replace our PSBT implementation with a tweaked version of Bitcoin Core's
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!).
2022-10-19 12:07:22 +02:00
Antoine Poinsot
eff39ee35a
rpc: a new 'broadcastspend' command 2022-10-18 19:54:03 +02:00
Antoine Poinsot
a9b0e5e559
qa: functional tests for block chain reorganization 2022-10-18 19:15:55 +02:00