37 Commits

Author SHA1 Message Date
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
Antoine Poinsot
e88bbbe65b
poller: block chain reorganization handling 2022-10-18 19:15:54 +02:00
Antoine Poinsot
99ab0d7add
commands: add a 'spend_info' field to the 'listcoins' entries 2022-10-17 11:47:42 +02:00
Antoine Poinsot
57add1d86b
commands: return the DB's block height in 'getinfo'
It makes more sense than to return the Bitcoin backend's. And it's helpful to wait for sync in functional tests.
2022-10-17 11:47:41 +02:00
Antoine Poinsot
c73e8a42dd
commands: add a new 'delspendtx' command 2022-10-01 14:05:27 +02:00
Antoine Poinsot
d5bd10add8
commands: add a change_index field to listspendtxs entries 2022-10-01 13:40:49 +02:00
Antoine Poinsot
c6e004806a
commands: add a 'list_spend' command (and 'listspendtxs' RPC) 2022-10-01 13:33:08 +02:00
Antoine Poinsot
3dfc7261db
jsonrpc: a new 'updatespend' RPC 2022-09-15 11:41:34 +02:00
Antoine Poinsot
7d015bcf43
jsonrpc: add a 'createspend' RPC command
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.
2022-09-15 11:41:33 +02:00
Antoine Poinsot
7468a7fcfb
qa: add PSBT and transaction serialization to the test framework
Copied it from revaultd.
2022-09-15 11:41:32 +02:00
Antoine Poinsot
09f59c417b
qa: fix the UDS class' forwarding method calls as JSONRPC calls
We weren't passing arguments if they were a list!
2022-09-15 11:41:32 +02:00
Antoine Poinsot
0fd57db8a8
Use the descriptor newtype instead of the raw miniscript Descriptor type 2022-08-18 12:02:27 +02:00
Antoine Poinsot
9d0c68dae3
commands: add a 'list_coins' command. 2022-08-18 12:01:27 +02:00
Antoine Poinsot
eeac67dc0a
qa: shut down the daemon via the JSONRPC interface at teardown 2022-08-17 19:39:58 +02:00
Antoine Poinsot
e510c0a30d
config: separate the Bitcoin and bitcoind-specifc settings 2022-08-17 19:39:56 +02:00
Antoine Poinsot
93098be7dc
tests: implement the connection to the daemon's RPC server
And add some basic sanity check of the existing commands.
2022-08-17 19:39:54 +02:00
Antoine Poinsot
a067daf16b
tests: use a ranged descriptor 2022-08-17 19:39:51 +02:00
Antoine Poinsot
5228ee370b
tests: remove mistakenly committed file 2022-08-17 19:39:50 +02:00
Antoine Poinsot
7c3289fda9
tests: add a functional test framework, adapted from revaultd 2022-07-25 16:31:35 +02:00