1213 Commits

Author SHA1 Message Date
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
7e039d7e38
Merge #766: fix wallet name in settings during install
9a4b665fa1a471a7a6c7e0dea09065f9f01ec35d fix wallet name in settings during install (edouardparis)

Pull request description:

  DEFAULT_WALLET_NAME aka simple Liana was still used during creation of wallet settings during install
  this should have been noticed if I did test the wallet creation process in detail and if I removed the public exposition of the const variable. SHAME

ACKs for top commit:
  edouardparis:
    Self-ACK 9a4b665fa1a471a7a6c7e0dea09065f9f01ec35d

Tree-SHA512: 3afd98918a7ddcd10e702d0aed66a0645bea734fde61febe021f07c67f5b42a28018e1556e052f03e413db9c75686f121091a7ab871c7c3533d62b7202761625
2023-10-31 10:18:07 +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
Antoine Poinsot
49ce6e789b
Merge #762: Cargo: drop two keywords
5f0abbcc877fe0c31d11b21a2ce1ce7146dbbf38 Cargo: drop two keywords (Antoine Poinsot)

Pull request description:

  We had too many keywords to be able to publish on crates.io

ACKs for top commit:
  darosior:
    self-ACK 5f0abbcc877fe0c31d11b21a2ce1ce7146dbbf38 -- trivial

Tree-SHA512: daf57c3f036ff44c164fa80eb8a88afdb799a63d3a59e19423eacba579300bc76ec0a1168a9ae9260484b754b0695ae98da4b4ed7a0cf3eff885010d15fcec04
2023-10-30 18:42:39 +01:00
Antoine Poinsot
5f0abbcc87
Cargo: drop two keywords 2023-10-30 18:40:50 +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
4de9772a93
Merge #751: GUI: prune BIP32 derivations for other spending paths when signing with BitBox02
99bbb76228de0762521cf9152fa35e267fca95b2 gui: prune bip32 derivations when signing with BitBox02 (Antoine Poinsot)
b8d6be82a7c9da80333d7470f6079d95e87210b8 gui: update to latest Liana (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  edouardparis:
    ACK 99bbb76228de0762521cf9152fa35e267fca95b2

Tree-SHA512: 31476a0db1af0d3ce114c6709ec8e693bc9209475da532c541530ad6b96837a3eb4faf0e5061255c93c9adaab9b48503878966bf3a2aec4b7be34e729e2e1056
2023-10-30 15:05:29 +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
Antoine Poinsot
87555a8da5
Merge #750: descriptors: introduce a helper to prune BIP32 derivation paths
ea4c4462406f5a1860140ca92bb7fca34e1322e0 descriptor: add a helper which guesses which paths to prune from a PSBT (Antoine Poinsot)
d03e603abbd588d97da81cf0e51d28cbef82f94d descriptors: add a helper to prune BIP32 derivation paths (Antoine Poinsot)

Pull request description:

  Based on #749, this provides clients of the library with a way to prune all the BIP32 derivation paths in a PSBT for keys which are not part of the given spending path.

ACKs for top commit:
  edouardparis:
    utACK ea4c4462406f5a1860140ca92bb7fca34e1322e0

Tree-SHA512: f9f21e12e562a047693066e7b54c2601de01d79071ac40981406a04cf74bfc2da4111b5ea251e3a399a0df95ff6f873da7a7cbb112251100c81bfba171b0a21a
2023-10-30 13:58:52 +01:00
Antoine Poinsot
54969bba71
Merge #754: wallet: load name from settings
1cbbb8c0befe3c168fbbd34129a2f4f2a8c8726f wallet: load name from settings (edouardparis)

Pull request description:

  If an wallet settings already exists, the wallet name attached to the hardware wallet credentials must be use, instead of the new generated one.

  close #745

ACKs for top commit:
  darosior:
    ACK 1cbbb8c0befe3c168fbbd34129a2f4f2a8c8726f -- tested locally and discussed it with Edouard. I can't think of another place where we'd like to use the old wallet name.

Tree-SHA512: a06e64f4ada4fbadb6e132be740b480055113e733d658f4694cfcad15bb2901e6626af211ba5df95f4e08d9cb47080a96e97e29bf1c18e094dfbde6364408ce2
2023-10-30 13:48:25 +01:00
edouardparis
5bb96950b4 gui: add shell.nix to track dependencies 2023-10-30 13:42:34 +01:00
Antoine Poinsot
299b29bb6b
Merge #749: Revert PRs #722 and #742: roll back to including all BIP32 derivations in the PSBT input
17ca01322e7badd37fd4120e0aeec8d834d0d6df Revert "Merge #722: Only include BIP32 derivations for a single spending path when creating PSBTs" (Antoine Poinsot)
6f5b053ea5af4737885a25573c82d627c299236e Revert "Merge #742: commands: don't add derivation paths for keys from different path but same signer" (Antoine Poinsot)

Pull request description:

  #722 pruned the BIP32 derivation paths in PSBT inputs for other spending paths than the one this PSBT was created for. This was to make it possible to use them with the Bitbox (see #722 OP for more details).

  These were merged without testing at all whether it would break signing with a Ledger Nano. Turns out it did. Our bad. Thanks to Pythcoiner for finding this bug.

  A follow-up PR will add a helper to prune the derivation separately so that it can only be applied to some signers and not all of them.

ACKs for top commit:
  edouardparis:
    utACK 17ca01322e7badd37fd4120e0aeec8d834d0d6df

Tree-SHA512: 99764fc5c68bc66e8415d72bb9963822ea05f8447c1ec71b50db992f3bf456370e00ae59055c939df1817c0031cdfbbfddbcdae9c448790fdcd67df10589b43d
2023-10-30 13:26:32 +01:00
edouardparis
1cbbb8c0be wallet: load name from settings 2023-10-30 13:26:21 +01:00
Antoine Poinsot
e4c7a66790
Merge #744: lianad add msg if wrong arg
b824a6433c353e0c1d8c16a3db4bba5097874828 lianad add msg if wrong arg (pythcoiner)

Pull request description:

  address #708
  not sure about wording

ACKs for top commit:
  darosior:
    utACK b824a6433c353e0c1d8c16a3db4bba5097874828

Tree-SHA512: 3b7c6675cb914a3c404fa02b07f0cf0ea529f1df0ae7ffce13bfa45e660e889d5ec85b3065d2b0ddc2561f2b23eeb8d410ce4edc15aff4005194b31bb8606bc5
2023-10-30 10:53:03 +01:00
Antoine Poinsot
675aff9b3d
Merge #753: contrib: correct minimum libc version in Debian package
d8d01df6070bdd470b46de90dfcae4a85f704812 contrib: correct minimum libc version in Debian package (Antoine Poinsot)

Pull request description:

  It was 2.34, it should be 2.33.

ACKs for top commit:
  darosior:
    self ACK d8d01df6070bdd470b46de90dfcae4a85f704812 -- trivial

Tree-SHA512: 0ea2fd6b987636a632dd82e51252f2eb11b194caf6b26d97f897fde7b14fd5da6354a6c02a733d3feaf666363eecfaf4974b64af2deb32247ce360967e8b851a
2023-10-30 10:52:03 +01:00
Antoine Poinsot
2fd71465a8
Merge #752: bitcoind: don't crash on getblockheader failure
663fbd2c287791c608a056825ac103c1366b4c33 bitcoin: make get_block_stats fallible (Antoine Poinsot)
869779dd94b9f82d4c068c081c287df31ad78b1e bitcoin: make tip_time return an Option (Antoine Poinsot)

Pull request description:

  Fixes https://github.com/wizardsardine/liana/issues/728.

ACKs for top commit:
  darosior:
    ACK 663fbd2c287791c608a056825ac103c1366b4c33

Tree-SHA512: 072c4a4006e4f66eefd271ec2d65da991e0ddd2a09fa6a4329b5c4f08fc3bfd9dcb031710df47fd8bdfa02ccd615aaf55ae4411fbbf536705a22fcce918c408b
2023-10-30 10:50:45 +01:00
Antoine Poinsot
663fbd2c28
bitcoin: make get_block_stats fallible
The call to getblockheader may fail, for instance when bitcoind is
rolling forward its blocks after a crash. It's a pretty edgy case but
instead of crashing restart over and over again.
2023-10-30 10:13:38 +01:00
Antoine Poinsot
869779dd94
bitcoin: make tip_time return an Option
In preparation of making get_block_stats() fallible.
2023-10-30 10:13:37 +01:00
Antoine Poinsot
d8d01df607
contrib: correct minimum libc version in Debian package 2023-10-27 18:47:52 +02:00
Antoine Poinsot
ea4c446240
descriptor: add a helper which guesses which paths to prune from a PSBT
Edouard tells me it would help a lot as it would avoid having to keep
state in the GUI: otherwise it would need to know in a signing sessions
with a Bitbox whether it's signing a spend or recovery PSBT (and for
which recovery path).
2023-10-27 17:37:43 +02:00
Antoine Poinsot
d967dc1476
Merge #746: gui: Bump managed bitcoind version for new installations to 25.1
fbec5e9218b24190c8f0ae1e1a09baf808ac70fa gui: bump managed bitcoind version to 25.1 (jp1ac4)
1808f8f1de5efbb402161829c4bab25a985e733a gui: allow to bump managed bitcoind version (jp1ac4)

Pull request description:

  This PR bumps the managed bitcoind version for new Liana installations to 25.1.

  The GUI will look for the most recent managed bitcoind version available when starting bitcoind.

  Once a new managed bitcoind version is installed, all wallets using managed bitcoind will use this new version, even if a wallet on a particular network was installed with a previous bitcoind version.

  The approach taken here may change as part of #690.

ACKs for top commit:
  darosior:
    ACK fbec5e9218b24190c8f0ae1e1a09baf808ac70fa -- neat PR.

Tree-SHA512: e6067e00e6c55bc112b0d9b873788de7edd2d3157e58ea1bbcbf512d2f2d621629d32c36010e7602e08e2a17f053a8f5690caecab7f86119b6a7b381f7b11df1
2023-10-27 17:17:09 +02:00
Antoine Poinsot
d03e603abb
descriptors: add a helper to prune BIP32 derivation paths
This is to provide the GUI with a workaround to Bitbox only providing a
single signature per input. Most likely other signing devices will have
this behaviour too in the future. See
https://github.com/wizardsardine/liana/pull/706#issuecomment-1744705808
for details.
2023-10-27 16:50:45 +02:00
Antoine Poinsot
17ca01322e
Revert "Merge #722: Only include BIP32 derivations for a single spending path when creating PSBTs"
This reverts commit 71056982636b408485ab24dab6628a555a6e7924, reversing
changes made to 03c37bd378f4f6bf11d90b224ed1db74b3596eaf.

This reverts PR #722. It turns out the Ledger Bitcoin app needs the
BIP32 derivation for all the keys in the Script, not only for the
spending path used. Therefore always create PSBT with all the BIP32
derivations. We'll add a way to prune them for talking to the Bitbox in
a future commit.
2023-10-27 15:46:03 +02:00
Antoine Poinsot
6f5b053ea5
Revert "Merge #742: commands: don't add derivation paths for keys from different path but same signer"
This reverts commit ec0c2426aa5fa6cee2efabd3ee6f175b41c35f64, reversing
changes made to 26d750d09c84734f56c2dc18cb332a232e24fb6d.

This reverts the fixes to the pruning of BIP32 derivation paths when
creating a PSBT, in preparation of reverting the merge of this feature
altogether. This is because always creating PSBT with only the BIP32
derivations for a single path broke the Ledger support.
2023-10-27 15:43:52 +02: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
pythcoiner
b824a6433c lianad add msg if wrong arg
Co-authored-by: Antoine Poinsot <darosior@protonmail.com>
2023-10-25 10:22:08 +02: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
ec2e2e5edc
Merge #743: gui: coinbase transaction output scripts may not represent valid addresses
2f2975c2790e83c592cd0ff594d3e8ce8a7c75d9 coinbase transaction outputs may not have valid scripts (edouard)

Pull request description:

  close #738
  liana-gui v2 also tried to display addresses from transaction outputs to user when clicking on transaction detail.

ACKs for top commit:
  edouardparis:
    Self-ACK 2f2975c2790e83c592cd0ff594d3e8ce8a7c75d9

Tree-SHA512: 7f5fc374baec773fef848cd104b8acbd34ce19a04f9614d0c446a93ee8b6b976acd98d7494031651a614bef38c0913217865f2086bf19a018ce17f57ef362c57
2023-10-24 17:31:17 +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
Antoine Poinsot
42578609e2
Merge #739: signer: Fix a small borrowck-related fixme
e07637c1567dc85f6b21cbc7f07c7205b0c634f4 signer: Fix a small borrowck-related fixme (Steven Roose)

Pull request description:

ACKs for top commit:
  darosior:
    ACK e07637c1567dc85f6b21cbc7f07c7205b0c634f4

Tree-SHA512: ad6233d0791aa8edc005640954dd40835f141e6629b27e7e13313459cc23523da05a668972307c2ddd83d6930b598b9842bb26f5271f9198256c093ff4c34100
2023-10-24 17:08:24 +02:00
Antoine Poinsot
ec0c2426aa
Merge #742: commands: don't add derivation paths for keys from different path but same signer
2e1c54491e96fda79b3831dc0c079c59250fabe0 qa: test der paths in PSBT when desc has duplicate signer (Antoine Poinsot)
8d213d5e31dd47f0c179475e32f5eb86c3773770 qa: correct create_spend functional test (Antoine Poinsot)
cf33228b0d25e79ec8fa855aaac6ebfa5f10da12 qa: don't assume desc xpubs' der path length in finalizer (Antoine Poinsot)
24edaecbdcfc0b6b53ac3355ad22991a8b5de018 commands: don't add der paths for keys from diff path but same signer (Antoine Poinsot)

Pull request description:

  When creating a PSBT, we were checking whether the key was for this path by checking its origin. This check would return false positive for keys from other paths but same signer (which shares the same fingerprint).

  Instead, check the entire origin for each key to make sure it's actually the one used in the path we are interested about.

  Thanks to Edouard Paris for finding this bug.

ACKs for top commit:
  darosior:
    self-ACK 2e1c54491e96fda79b3831dc0c079c59250fabe0 - only made the test more robust since Edouard's ACK

Tree-SHA512: 3bbd0db9e1be59318f9e0af7b6ebf2d91d919e4946acb3dd02822cd6c0e2b9829a963ff1ecd9b0b0ab780bd46b4f0d120ab80b2f55ee84fbcf848231727b3cac
2023-10-24 17:05:29 +02:00
Antoine Poinsot
2e1c54491e
qa: test der paths in PSBT when desc has duplicate signer 2023-10-24 16:38:57 +02:00
Antoine Poinsot
8d213d5e31
qa: correct create_spend functional test
Both transactions may not spend the same coins. We need to compare the set of all der paths across inputs.
2023-10-24 16:38:57 +02:00
Antoine Poinsot
cf33228b0d
qa: don't assume desc xpubs' der path length in finalizer
It's always 2 for now, but we are going to break this invariant. Make this code more robust.
2023-10-24 16:14:41 +02:00
edouard
26d750d09c
Merge #741: Single "Add label" button
15851383a797b30eb0736fd06d0197485a1fda23 Single Add label button (edouard)

Pull request description:

  discussion in #732

ACKs for top commit:
  edouardparis:
    Self-ACK 15851383a797b30eb0736fd06d0197485a1fda23

Tree-SHA512: 50637d615e1352a9418ef6f8598835ee9e8c220413a1a43bbf8dd71b513ca51546737fd667f50ad2e69070790af68ece6cc56a062045b7a6dac690e0f761fc1b
2023-10-24 16:03:30 +02:00
Antoine Poinsot
24edaecbdc
commands: don't add der paths for keys from diff path but same signer
When creating a PSBT, we were checking whether the key was for this path
by checking its origin. This check would return false positive for keys
from other paths but same signer (which shares the same fingerprint).

Instead, check the entire origin for each key to make sure it's actually
the one used in the path we are interested about.

Thanks to Edouard Paris for finding this bug.
2023-10-24 15:44:48 +02:00
edouard
15851383a7 Single Add label button 2023-10-24 15:32:41 +02:00
edouard
7105698263
Merge #722: Only include BIP32 derivations for a single spending path when creating PSBTs
7f3b0b021858cfb2fe914f3ba6b30a39e3ae05ff qa: test a PSBT has only the BIP32 derivations for a single spending path (Antoine Poinsot)
b71bd693d6ea4c1c3567194fc82be43fb70c05bb qa: don't use a static dummy origin for descriptor xpubs (Antoine Poinsot)
a81d39c81a89cdf5e70b9888cbeb3abaf290a365 commands: do not include BIP32 derivations for other spending paths (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  edouardparis:
    ACK 7f3b0b021858cfb2fe914f3ba6b30a39e3ae05ff

Tree-SHA512: f0e132edf8d653c5575f843b1e85d995f155a2435a6e6257564dc945562df70ec2049c29d77f7580858d9e4a58290b0798f298f77c18255415c4cf26ccc07f33
2023-10-24 12:40:43 +02:00
Steven Roose
e07637c156
signer: Fix a small borrowck-related fixme 2023-10-23 22:45:38 +01:00
edouard
03c37bd378
Merge #736: Enhance labelling
b88781e62828cc6fc56e49f3ad1ebdeb39788573 remove font bold for labels (edouard)
8e806404c4e12f6d67cef320a4c5485723a0f993 change labels font weight for lists (edouard)
c170f7b25ba704beaa4e37a99302ccb25e0baa77 fix psbt labelling for single payment (edouard)
28aaca919aa7a1afc63a659780c6af063578a5ef gui: update liana:master (edouard)
0873cdb944e0bc4976b0f9dc6208fe68e322f330 disable confirm button if label len > 100 (edouard)
1aae2a52da94b6a3791a7a5b058e9e6a23483089 Add From: txid label for coin selection view (edouard)
07fbc0c1b3f3b55ebd7e684e2cf15032703c54db Attach outpoint and txid labels for single payment transaction (edouard)
bdac902307c25ee02093f369aca9258edacc4a4e Change coin change labelling (edouard)

Pull request description:

  tackle most issues of #732, may need another round of external tries

ACKs for top commit:
  edouardparis:
    Self-ACK b88781e62828cc6fc56e49f3ad1ebdeb39788573

Tree-SHA512: 51ee18d8a064afb6eb96926783f13fd7dc703e3464ff5af5d6f40e15ce86e16d8afd8b5f0ca82030976664101fd340f69a8c7102e88fd2c46d5755a4b0219286
2023-10-23 18:53:51 +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