Commit Graph
33 Commits
Author SHA1 Message Date
edouard 7338e6f988 Add labels to lianad 2023-08-28 13:14:21 +02:00
Antoine Poinsot fd717123be commands: don't create spends with immature coins 2023-07-20 13:42:34 +02:00
Antoine Poinsot e28010915f lianad: update rust-miniscript (and rust-bitcoin) dependencies
Rust-bitcoin, that we use through rust-miniscript, has seen plenty of
breaking changes in the latest version. I've tried to keep the necessary
changes here minimal, still it had to be a single commit to keep it
hygienic. But i'll try to summarize the main things here. Tobin also
wrote a guide about the release at
https://rust-bitcoin.org/blog/release-0.30.0/.

The most verbose change in this commit is probably due to the `Address`
type overhaul. It's overengineered if you ask me but hey here we are. I
tried to keep network validation in commands, and otherwise passing
around unchecked addresses (to avoid having to pass around a global
state between our various components).

Another non-obvious change was changes in hash types upstream and the
removal of `ToHex`, forcing us to get the hex representation of a txid
through its `Display` implementation. It is however displayed backward
in this case ("little-endian" if you will), and we need a regular hex
encoding for some queries to the database. We needed to make sure we
didn't implement any silent bug here.

The rest (Script type changes, PSBT serialization updates, ..) is
probably self-explanatory.
2023-07-13 09:56:09 +02:00
Antoine Poinsot c6c312a011 commands: allow to create send-to-self transactions with 'createspend' 2023-05-04 16:15:09 +02:00
Antoine Poinsot d68d0e1134 commands: adapt 'createrecovery' to multiple recovery paths 2023-04-04 11:53:22 +02:00
Antoine Poinsot 6e1c41238f commands: have a detailed error for the insane fee sanity check 2023-02-17 09:54:43 +01:00
Antoine Poinsot ed6ff9c67b commands: check addresses' network when creating transactions 2022-12-20 18:04:54 +01:00
Antoine Poinsot d3b89add9a daemon: apply clippy 1.66.0 fixes 2022-12-16 11:01:23 +01:00
Antoine Poinsot a78f46fa2f [refactoring] jsonrpc: sort command names alphabetically 2022-12-09 12:27:48 +01:00
Antoine Poinsot c09ae3f87b commands, jsonrpc: add a new 'createrecovery' command
This is a new command dedicated to the recovery usecase. For now it's
dead simple: sweep all coins that are available through the recovery
path to a given address.
2022-12-09 12:27:47 +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
edouard 774f969594 Add listtransaction command 2022-11-22 19:31:02 +01:00
edouard 3cd709697b Add listconfirmed command 2022-11-22 19:31:02 +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 96b634b69c bitcoind: make the rescan starting interface failible
This makes us more robust to races, where we'd crash previously
2022-11-14 09:47:43 +01:00
Antoine Poinsot 7866ff46cf commands: add a new 'startrescan' command 2022-11-14 09:20:27 +01:00
Antoine Poinsot 3b2c9109dd Clippy fixes
Clippy just broke under our feets by enabling more checks and making CI
fail...
2022-11-05 11:51:45 +01:00
Antoine Poinsot eff39ee35a rpc: a new 'broadcastspend' command 2022-10-18 19:54:03 +02:00
Antoine Poinsot 37ee93a1e6 commands: a new command for broadcasting a Spend transaction 2022-10-18 19:48:37 +02:00
Antoine Poinsot e75637d362 jsonrpc: fixup two typos in error messages 2022-10-18 19:43:52 +02:00
Antoine Poinsot 8b4866158b daemon: clippification
That's a minimal API break because of some error variants that were
Box'd.
2022-10-13 14:24:24 +02:00
Antoine Poinsot c73e8a42dd commands: add a new 'delspendtx' command 2022-10-01 14:05:27 +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 9d0c68dae3 commands: add a 'list_coins' command. 2022-08-18 12:01:27 +02:00
Antoine Poinsot fe5de96312 Shorten the paths to the dummy datadirs in the unit tests
It failed CI on MacOS because of overflowing SUN_PATH_LEN.
2022-08-17 19:40:00 +02:00
Antoine Poinsot 069bca546a jsonrpc: don't use a Mutex to share the DaemonControl between threads 2022-08-17 19:39:59 +02:00
Antoine Poinsot e6fcdd5b09 jsonrpc: don't umask in unit tests
It can interfere with the creation of dummy directories in other threads and cause spurious errors
2022-08-17 19:39:59 +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 726209cc0a jsonrpc: add a 'stop' command
This also implements a simple JSONRPC server sanity check

And introduces a new tmp_dir() test utility, that i didn't have the courage to split from this commit
2022-08-17 19:39:57 +02:00
Antoine Poinsot 0d55d6c455 jsonrpc: a simple JSONRPC2 server 2022-08-17 19:39:54 +02:00