398 Commits

Author SHA1 Message Date
Antoine Poinsot
f4d22a987e
Merge #816: commands: add rbfpsbt command
0ab00cd6580ddc1964f4f328a90ab9c5f3f87efa gui: keep conflicting PSBTs as Pending until confirmation (jp1ac4)
5391bfe04ccbe2103460cd195fe4ea3309507118 commands: add `rbfpsbt` command (jp1ac4)
d5f31674045155b6a9be7e08e4beab4c2187b573 commands: add `create_spend_internal` function (jp1ac4)
714fd5e142ffdf95d5ca96cd5a1d6edbc68239bb bitcoin: add `mempool_spenders` to Bitcoin interface (jp1ac4)
68b2503b12cececb1e3259d2d88a34e5191ec232 func tests: move function to utils (jp1ac4)
fdab722effa79c6063e5b40748409ac4048aa1b6 func tests: run black (jp1ac4)

Pull request description:

  This PR relates to #43 and #236.

  It adds a `rbfpsbt` command that generates a PSBT to replace an existing transaction using RBF. This replacement can either preserve non-change outputs and simply bump fees or remove non-change outputs and effectively cancel the transaction. The inputs and change output may need to be updated in accordance with the higher fee.

  I've also added a `getmempoolentry` call to the bitcoin interface that is used for checking information about descendant transactions.

  To facilitate development, I've made some temporary changes in the GUI so that replacement PSBTs can be signed and broadcast, but these changes might not be part of this PR in the end.

ACKs for top commit:
  darosior:
    ACK 0ab00cd6580ddc1964f4f328a90ab9c5f3f87efa

Tree-SHA512: a172ad895fac13be294451f2ffeccb91af521d58a3bc6d08e09688996f9a3e07a3e230091982ef5e92472d44db77b34f93b81d1111d2c570d9c5dd85b7c21f0f
2023-12-06 20:25:57 +01:00
jp1ac4
0ab00cd658
gui: keep conflicting PSBTs as Pending until confirmation 2023-12-06 17:35:06 +00:00
Antoine Poinsot
bcfab48c39
Merge #828: gui: installer: clearer placeholder in xpub edit field
3077062c84f598350248e6725e5781b9bc209ce9 gui: installer: clearer placeholder in xpub edit field (Antoine Poinsot)

Pull request description:

  I'm not sure what rustfmt is doing here.

  Fixes #451.

ACKs for top commit:
  pythcoiner:
    utACK 3077062c84
  edouardparis:
    utACK 3077062c84f598350248e6725e5781b9bc209ce9

Tree-SHA512: 79637d3c147c19ff5b7a4758da62089e51990d611e992591b2368f2e3135c06c547804d75c0bf3e5394843e29d582edb71487039a23fdae507cc6c6eae28ec36
2023-12-04 11:49:54 +01:00
edouardparis
40ade751e0 Fix transactions Labelled methods
Better to use the input previous output
field instead of relying of possible missing
coin.
2023-11-28 13:08:35 +01:00
edouardparis
b4729c3728 Split inputs and outputs view
Inputs does not need to be displayed
for external incoming transactions
2023-11-28 13:07:35 +01:00
edouardparis
946e499b5a Handle missing coin inputs in tx and psbt
As coins deposited by an unconfirmed
transactions can be removed from
the database, GUI should not rely
on them to calculate fees.
The fees must be passed as Option.

If a input coin is missing for a psbt,
we use the witness_utxo amount
and settle the total fee to None
if both are absents.
2023-11-27 17:48:35 +01:00
Antoine Poinsot
3077062c84
gui: installer: clearer placeholder in xpub edit field
I'm not sure what rustfmt is doing here.

Fixes #451.
2023-11-20 19:16:57 +01:00
edouardparis
e9a217b3d8 Add verify address modal to receive panel
bump async-hwi v0.0.13
2023-11-20 15:30:37 +01:00
edouardparis
fa992aa564 gui: move receive panel to its own file 2023-11-20 15:10:25 +01:00
Antoine Poinsot
639cac7bf3
Merge #563: gui: Add automated coin selection for spend
9e2407eb8a75bc59c16659bf4aa80f8adef0e3d2 gui: auto-select coins for spend (jp1ac4)

Pull request description:

  This adds automated coin selection from #560 to the GUI.

  The new "Auto-select" button uses automated coin selection to select coins for a spend, which the user can then modify as required.

  The button can only be clicked once the recipients and feerate have been validated, and it does not appear when creating a self-send.

  I haven't added any validation on the amount before making the button clickable, but it may be hard to anticipate all coin selection errors once fees are taken into consideration.

ACKs for top commit:
  darosior:
    light ACK 9e2407eb8a75bc59c16659bf4aa80f8adef0e3d2

Tree-SHA512: 6ce3389d849470b3beb6ac8df75d2c3b7b6c04ee881dd0e9116c4d87f54376a8ed6666cbfd0ff0152a3eb839c8f7f17a175fe078ef030f03451430b84ab40cb6
2023-11-17 14:24:06 +01:00
jp1ac4
9e2407eb8a
gui: auto-select coins for spend 2023-11-15 20:01:30 +00:00
Antoine Poinsot
88d00ae1a3
gui: display headers sync progress too in loader
Maybe we should just get rid of the filtering since there is no stability guarantees wrt logging. On the other hand we'd probably need to increase the update frequency if we do that. In the meantime at least display also the blockheaders so the sync doesn't appear to be stuck for 5 minutes at startup.
2023-11-10 12:52:39 +01:00
Antoine Poinsot
73f168bd09
gui: view: fix the display of PSBT missing signatures
The analysis was wrongly displayed. For instance it could display a
fingerprint as having both signed and not signed yet.

Clean up the code and fix the analysis.
2023-11-02 13:10:20 +01:00
jp1ac4
bdd16c73bc
installer: start new bitcoind download if not finished
In case user clicks on Previous before bitcoind download has
finished, this will clear the incomplete download from
`InternalBitcoindStep` so that a new download will start if the
user returns to this step.
2023-11-01 18:07:32 +00:00
Antoine Poinsot
cf9404558f
Merge #773: gui: don't read bitcoind's stdout to avoid a deadlock
d0065898f70fbe14be7d269a686110e3bbbe7af8 loader: don't read bitcoind's stdout to avoid a deadlock (edouardparis)

Pull request description:

  "Forward port" of #770.

  It was possible to get into a state where we were waiting for lianad to start, which was waiting on a response from bitcoind which in turn was waiting on the GUI to make room in its piped stdout buffer. Deadlock.

  Instead of getting its logs from stdout, read its debug.log file.

ACKs for top commit:
  edouardparis:
    ACK d0065898f70fbe14be7d269a686110e3bbbe7af8

Tree-SHA512: 0c66190ba87b56b883d15463ad24e152e43b33bf235ba8fb2cab6978c6eace1fdf3b6280377548a92248b18b0fa05bd4ad698cb65beac92bb5f11bc8a4662052
2023-11-01 16:28:35 +01:00
edouardparis
d0065898f7
loader: don't read bitcoind's stdout to avoid a deadlock
It was possible to get into a state where we were waiting for lianad to
start, which was waiting on a response from bitcoind which in turn was
waiting on the GUI to make room in its piped stdout buffer. Deadlock.

Instead of getting its logs from stdout, read its debug.log file.

Co-Authored-By: Antoine Poinsot <darosior@protonmail.com>
2023-11-01 15:53:53 +01:00
edouardparis
a14f3afa2a installer: do not reload last step on next message
If a user clicked very fast a lot on the Next button
to trigger multiple Next messages, then the last
step of the install reloads multiple time.
This commit introduce a check that ignore next message
if the step is the last one.
2023-11-01 15:29:54 +01:00
edouardparis
c861368802
Merge #769: fix single payment output label
d56a9a8a40671ad0ab0f4d8ccb8c6fa861d40429 fix single payment output label (edouardparis)

Pull request description:

  When a transaction has only one payment,
  then its txid label is attached to the payment label. While modifying the label of an output it did not change the whole transaction label, which is a bug.

  backport of the fix for 3.x in #768

ACKs for top commit:
  edouardparis:
    Self-ACK d56a9a8a40671ad0ab0f4d8ccb8c6fa861d40429

Tree-SHA512: 0c2bca6f2a5527c37653c3644907926f6dacd01f826a2538a78c898fda407e49dceb40614ef8389ae7663228da1c1121decf4be21dc8e0f9a44fd788b3c76972
2023-10-31 15:47:33 +01:00
edouardparis
f6b89ce699
Merge #765: fix gui: update labels if user signed an unsaved tx
789f952433d7ccc0f09924359bd87b83b0bdcf55 fix gui: update labels if user signed an unsaved tx (edouardparis)

Pull request description:

  It is a fix from #760

ACKs for top commit:
  edouardparis:
    Self-ACK 789f952433d7ccc0f09924359bd87b83b0bdcf55

Tree-SHA512: 3424577ba6d3215a3b7503a0861997ace0dbac0a82b0e43af5bc5fb5262450ab5074eaa54ce6a01021237b85dfb163d4eb436916d17f52b9dfd1a07cf7be269c
2023-10-31 15:46:46 +01:00
edouardparis
d56a9a8a40 fix single payment output label
When a transaction has only one payment,
then its txid label is attached to the payment label.
While modifying the label of an output it did not change the
whole transaction label, which is a bug.
2023-10-31 15:11:43 +01:00
edouardparis
9a4b665fa1 fix wallet name in settings during install 2023-10-30 19:03:24 +01:00
edouardparis
789f952433 fix gui: update labels if user signed an unsaved tx 2023-10-30 18:57:54 +01:00
edouardparis
976894e4c5
Merge #755: gui: add shell.nix to track dependencies
5bb96950b4d99a92e61e48a077b4236d9e3619c7 gui: add shell.nix to track dependencies (edouardparis)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK 5bb96950b4d99a92e61e48a077b4236d9e3619c7

Tree-SHA512: b40b0f82631e45308f0690ea08ae2a0ab602dd7f9a108ba08ab6432797c92802c249d79ddf36247b560c51f336b715bf448185c864583e0e7cecbfdb7c6d7c3d
2023-10-30 15:35:41 +01:00
Antoine Poinsot
99bbb76228
gui: prune bip32 derivations when signing with BitBox02
It can otherwise lead to the BitBox02 not signing for the correct public
key. See
https://github.com/wizardsardine/liana/pull/706#issuecomment-1744705808
for details.
2023-10-30 14:01:37 +01:00
Antoine Poinsot
b8d6be82a7
gui: update to latest Liana 2023-10-30 14:01:36 +01:00
edouardparis
5bb96950b4 gui: add shell.nix to track dependencies 2023-10-30 13:42:34 +01:00
edouardparis
1cbbb8c0be wallet: load name from settings 2023-10-30 13:26:21 +01:00
jp1ac4
fbec5e9218
gui: bump managed bitcoind version to 25.1 2023-10-26 11:32:25 +01:00
jp1ac4
1808f8f1de
gui: allow to bump managed bitcoind version
This makes it possible to bump the managed bitcoind version used
when installing a new Liana wallet.

The GUI will look for the most recent managed bitcoind version
available when starting bitcoind so that existing wallets
with a previous managed bitcoind version will not be affected.
2023-10-26 11:32:24 +01:00
edouard
1a59d03858
Merge #706: Add bitbox support
4be74ad496692d371adffcc1b3c868ef6a01cb52 refac hw module and add bitbox support (edouard)

Pull request description:

  - Add bitbox02 as possible signer to liana-gui
  - Introduce global_settings.json in datadir to keep the bitbox noise config.

ACKs for top commit:
  edouardparis:
    Self-ACK 4be74ad496692d371adffcc1b3c868ef6a01cb52

Tree-SHA512: e0615e1903baa7faecc25db717f49ed71c23a6afcec607c41ac2045cfb2cfa9a9aa3d3452cc952aeaf72a735d670c56dbf19b239c8d665466a2ecb09fbe222c5
2023-10-24 17:46:37 +02:00
edouard
4be74ad496 refac hw module and add bitbox support 2023-10-24 17:23:57 +02:00
edouard
2f2975c279 coinbase transaction outputs may not have valid scripts 2023-10-24 17:09:33 +02:00
edouard
15851383a7 Single Add label button 2023-10-24 15:32:41 +02:00
edouard
b88781e628 remove font bold for labels 2023-10-23 18:28:53 +02:00
edouard
8e806404c4 change labels font weight for lists 2023-10-23 18:21:10 +02:00
edouard
c170f7b25b fix psbt labelling for single payment 2023-10-23 16:45:09 +02:00
edouard
28aaca919a gui: update liana:master 2023-10-23 16:17:57 +02:00
edouard
0873cdb944 disable confirm button if label len > 100 2023-10-23 16:17:57 +02:00
edouard
1aae2a52da Add From: txid label for coin selection view 2023-10-23 16:17:57 +02:00
edouard
07fbc0c1b3 Attach outpoint and txid labels for single payment transaction 2023-10-23 16:17:57 +02:00
edouard
bdac902307 Change coin change labelling 2023-10-23 16:17:57 +02:00
edouard
70dea710ae installer: forbid keys with same master fg in same path 2023-10-20 11:48:18 +02:00
edouard
757b53ebab cargo update -p liana 2023-10-18 17:37:12 +02:00
edouard
aeff735ac3 fix unconfirmed payments layouts with labels 2023-10-18 17:37:12 +02:00
edouard
dbb91464c8 fix update labels for pending_txs 2023-10-18 17:37:12 +02:00
edouard
9edcdd9a4e Add labels to change outputs according to main label 2023-10-18 17:37:12 +02:00
edouard
2354ac9175 cargo clippy --fix --lib -p liana_gui 2023-10-18 17:37:12 +02:00
edouard
9db4541952 Add labels support to gui 2023-10-18 17:37:12 +02:00
jp1ac4
846431ed53
gui: display (estimated) feerate
For transactions that have been broadcast, the feerate is calculated
using the transaction's actual size. For PSBTs, the feerate is
calculated using the max satisfaction size for all inputs, whether
they have been signed or not.
2023-10-12 16:16:55 +01:00
edouard
19491d1d00
Merge #720: gui: Trim text inputs
9895b493f1d79ae8fc5a1591ef455ccda2d81ccd gui: trim text input strings (jp1ac4)
d3f2931375ff95c201a60164bf1015f18c6e87ce gui: remove unused file (jp1ac4)

Pull request description:

  This is to resolve #323.

  Following suggestions in #323, I've added a new `TrimmedString` struct that takes a string and applies `trim()`. This type is then used as `form::Value<TrimmedString>` to ensure text inputs are trimmed.

  I'm creating this PR as draft to check if this is the right approach before applying the change to other inputs.

  I've also removed a view file that seems to have been created accidentally.

ACKs for top commit:
  edouardparis:
    ACK 9895b493f1d79ae8fc5a1591ef455ccda2d81ccd

Tree-SHA512: 76c7f28ed2d0b6b6b76658a9368b918b0b211e2fabd72ac5d19c13adcbb2d3645b78680a8849f235ee58620fbe8df440ef8354f2d50d39601879bb7727465335
2023-10-06 10:22:53 +02:00