2194 Commits

Author SHA1 Message Date
edouardparis
36f47df60c
Merge #1508: [GUI] Improve coin selection logic when creating spend
e8d2fe2717583c071fc878b6d3f1fdb42c120bed send max from all owned coins only (Michael Mallan)
021c8e2a43239c39fffac26dc2f8a04eda3efda0 gui(spend): improve insufficient funds handling (Michael Mallan)
1b33e74a7a8b1d185a3aaea84a3ec6520ee05976 refactor: add `coin_is_owned` method (Michael Mallan)

Pull request description:

  This is to resolve #1326. In case of insufficient funds when creating a spend, the selected coins will be updated to correspond to the missing amount. Previously, no changes were made to selected coins.

  Furthermore, if a user selects the max option for a recipient, only owned coins (confirmed or unconfirmed from self) will be considered rather than all coins, since unconfirmed coins that are not from self should only be used if the user has selected them manually.

ACKs for top commit:
  edouardparis:
    utACK e8d2fe2717583c071fc878b6d3f1fdb42c120bed

Tree-SHA512: 57869e04d486bb1debab323453183536f3d0ef65522a26aeb2be205262da52881f45a47035a8d0ad62c2e28366e4f23b44df70d41dd8cb017aad29dda651e5ed
2025-02-06 16:24:38 +01:00
Michael Mallan
e8d2fe2717
send max from all owned coins only
Coin selection considers only those unconfirmed coins from self,
and the same should apply when the user chooses the MAX option
without explicitly selecting coins.

Unconfirmed coins that are not from self should only be included
if the user has selected them explicitly.
2025-02-06 14:08:10 +00:00
Michael Mallan
021c8e2a43
gui(spend): improve insufficient funds handling
The coins selected should correspond to the missing amount.
2025-02-06 14:08:08 +00:00
Michael Mallan
1b33e74a7a
refactor: add coin_is_owned method 2025-02-06 14:08:02 +00:00
edouardparis
3a4df7aeec
Merge #1550: liana-gui: Iced v13
178f8182840435b419600e91e9212756f450ff2e fix subscriptions: channel size and ContentLength error (edouardparis)
8c800a275c12b63752a1ca966aa3847fea9bbc5f fix warning banner colors (edouardparis)
cfa737196908aaf199c3ccc0fa217d33407dbd40 fix hw buttons: use secondary button (edouardparis)
4fbef503e6520fbef40d509fc80433398d0f279b fix launcher: wallet button (edouardparis)
c76109e09cc1e88a3c26c76ad90df02f024c0dfa fix sandbox for liana-gui tests (edouardparis)
bf8c2eaf4ff60d56530c173ec0c83db99b06ab20 fix main (edouardparis)
a4adab5cd1c99fb0a29526112ca8c541bd040655 fix subscriptions (edouardparis)
ad297d1ef8da0e7c165fc17d940c419b785f0c1d iced v0.13 (edouardparis)

Pull request description:

  - [x] update `liana-ui`
  - [x] update `liana-gui`

ACKs for top commit:
  jp1ac4:
    tACK 178f8182840435b419600e91e9212756f450ff2e.

Tree-SHA512: 056635f9b596add207f66f735c3ead435552c6f82ecd19793329717db86b592dead6aae92f12be4b9b62ff6b1938d3e310fda90f792debe682185bc79c03443a
2025-02-04 11:31:18 +01:00
edouardparis
178f818284 fix subscriptions: channel size and ContentLength error 2025-02-04 10:41:12 +01:00
edouardparis
8c800a275c fix warning banner colors 2025-02-03 16:24:19 +01:00
edouardparis
cfa7371969 fix hw buttons: use secondary button 2025-02-03 16:24:19 +01:00
edouardparis
4fbef503e6 fix launcher: wallet button 2025-02-03 16:24:19 +01:00
edouardparis
c76109e09c fix sandbox for liana-gui tests 2025-02-03 16:24:19 +01:00
edouardparis
bf8c2eaf4f fix main 2025-02-03 16:24:19 +01:00
edouardparis
a4adab5cd1 fix subscriptions 2025-02-03 16:24:19 +01:00
edouardparis
ad297d1ef8 iced v0.13 2025-02-03 15:47:38 +01:00
edouardparis
b7a51c8141
Merge #1398: ci: use bitcoind version 28.1
c17e945fd4bd5b784754e4b8a7c38c5060e37831 ci: use bitcoind version 28.1 (Michael Mallan)
7ad3e3f0d6ff9fe01441d71b6caaed0eb9113e78 ci: use electrs v0.10.6 (Michael Mallan)

Pull request description:

  This resolves #1397.

ACKs for top commit:
  edouardparis:
    ACK c17e945fd4bd5b784754e4b8a7c38c5060e37831

Tree-SHA512: b1a9765a8111c5a1b6a54a77972cfda882212c7281310523f8f4a7feb9dc601ef2383b3ffb46027188281d398af99b7ce5d4cdc143e0358ea8977ab8d2496c20
2025-02-03 15:01:43 +01:00
Michael Mallan
c17e945fd4
ci: use bitcoind version 28.1 2025-02-03 09:27:32 +00:00
Michael Mallan
7ad3e3f0d6
ci: use electrs v0.10.6 2025-01-31 12:19:40 +00:00
edouardparis
1d9ff9d8fe
Merge #1559: bump bdk_coin_select to 0.4
1859a2d5f0fe67b22a850d0f7daac43b06bce163 bump bdk_coin_select to 0.4 (Michael Mallan)

Pull request description:

  Weights are now stored in the crate as `u64` instead of `u32` and so we can keep our weights and vsizes as `u64`.

  The tests have been updated to reflect that coin selection now calculates feerates using a transaction's size in rounded-up vbytes, which fixes #1132.

ACKs for top commit:
  edouardparis:
    ACK 1859a2d5f0fe67b22a850d0f7daac43b06bce163

Tree-SHA512: 703edd66db85fff0bef34eee282493c371ad7f3ff512f4c0b7c39ee7fc8b2878647c19b81ab31f9d04cbd7d8770455dfcf8929587aa3e98025ce9ccd31027350
2025-01-30 17:22:20 +01:00
Michael Mallan
1859a2d5f0
bump bdk_coin_select to 0.4
Weights are now stored as `u64` instead of `u32`.

The tests have been updated to reflect that coin selection now
calculates feerates using a transaction's size in rounded-up
vbytes.
2025-01-30 15:45:15 +00:00
edouardparis
b98cff0579
Merge #1558: Allow RBF without saved PSBT
4d05c1f0ffb9cb9a7dd070342a7d19b9227ab8a2 commands: allow rbf for spending txs without saved psbt (Michael Mallan)
4ce5ca4d80cde79de60d545a7b992907cc5450e4 qa: check psbt must be saved in db to use rbf (Michael Mallan)

Pull request description:

  This is to fix #854 when using a local node. If we don't have the PSBT saved in our DB, we query the wallet transaction instead.

  The Liana Connect backend will also need to be updated in a similar way.

ACKs for top commit:
  edouardparis:
    ACK 4d05c1f0ffb9cb9a7dd070342a7d19b9227ab8a2

Tree-SHA512: 2b5425ac2391e7f044c404f7ff449292807b360e14f33b6f2afbcd0c22bb399c371f950e0d43c0ab30e3a4ba76d83d257686de8e862e5dbee909577ed69d7dcd
2025-01-30 15:13:20 +01:00
Michael Mallan
4d05c1f0ff
commands: allow rbf for spending txs without saved psbt 2025-01-29 15:54:39 +00:00
Michael Mallan
4ce5ca4d80
qa: check psbt must be saved in db to use rbf 2025-01-29 15:45:20 +00:00
edouardparis
71959b47ee
Merge #1557: move the unlocking of bitbox to a method
3ced1dbea9283d814b06b6e60a74f573e94847f7 move the unlocking of bb to a method (edouardparis)

Pull request description:

  This is preparatory work for #1550

ACKs for top commit:
  edouardparis:
    Self-ACK 3ced1dbea9283d814b06b6e60a74f573e94847f7

Tree-SHA512: 1ff5aef26ed13446750a5f1c339d47b35a15227df98bb57321f81520294f35fd23fd226f3ccf515a56f07b8ec5b4f1d9c0fcb854f743d862389ab4605afcd3df
2025-01-28 14:13:12 +01:00
edouardparis
3ced1dbea9 move the unlocking of bb to a method 2025-01-28 13:10:52 +01:00
edouardparis
3c8e412384
Merge #1555: upgrade bitcoin dependency to 0.32 and related
c5f5284f57e37e578cc3001a7da1790c724437a3 upgrade bitcoin to 0.32 and related (Michael Mallan)

Pull request description:

  This is to upgrade bitcoin to 0.32 and related dependencies accordingly.

  Note that the bdk_electrum crate has not been upgraded to the most recent version available as the Electrum syncing there takes much longer due to the fetching and validation of Merkle proofs. There are ongoing changes in relation to that (https://github.com/bitcoindevkit/bdk/issues/1699) and so we can further upgrade this dependency once those changes have been completed.

  Non-BDK changes to the liana and lianad crates are taken from commit 20ee8b1e7b77cbf65942bc4f083afea95f2d1506 in draft PR https://github.com/wizardsardine/liana/pull/1228, which this replaces.

  (Once this PR has been tested and approved, we can release a new version of the async_hwi crate and point to that.)

ACKs for top commit:
  edouardparis:
    ACK c5f5284f57e37e578cc3001a7da1790c724437a3

Tree-SHA512: 3cb1a2060ecc4c6b9631df0eadf5692ad35495b9303edbb80a437aca60ae062a7227f20ddeb5eb722cf57dd80bfa752372a14d26b8f306844237bfdb5f41e51a
2025-01-27 18:04:19 +01:00
edouardparis
eae89211d1
Merge #1554: chore: fix some comments
f12c65cdd26f9b611b524b4f30c69bb4ad956c22 chore: fix some comments (damuzhi0810)

Pull request description:

  fix some comments

ACKs for top commit:
  jp1ac4:
    ACK f12c65cdd26f9b611b524b4f30c69bb4ad956c22.

Tree-SHA512: 540abcc6d1faddb9f9b81f8dc5c7918daa4bb4bf7179276c768d49c18109283f45eb62734892ad9c40460bc07daa2001967bcbecb0de77335f308d627195930c
2025-01-27 15:52:57 +01:00
Michael Mallan
c5f5284f57
upgrade bitcoin to 0.32 and related
This upgrades bitcoin to 0.32 and related dependencies accordingly.

Note that the bdk_electrum crate has not been upgraded to the most
recent version available as the Electrum syncing there takes much
longer due to the fetching and validation of Merkle proofs. There
are ongoing BDK changes in relation to that and so we can further
upgrade this dependency once those changes have been completed.

Non-BDK changes to the liana and lianad crates are taken from
darosior's commit 20ee8b1e7b77cbf65942bc4f083afea95f2d1506 in
draft PR https://github.com/wizardsardine/liana/pull/1228.
2025-01-27 14:36:29 +00:00
edouardparis
15994b85b5
Merge #1556: ci: reduce number of tasks
5edbcb9033dc1e5dbf20b43cd0db736aa0222612 ci: reduce number of tasks (Michael Mallan)

Pull request description:

  This will reduce some of the overhead of setting up each task.

ACKs for top commit:
  edouardparis:
    ACK 5edbcb9033dc1e5dbf20b43cd0db736aa0222612

Tree-SHA512: 7360be30fda9bbb567813acbba858bc231d13ede2facc0db8a33cc2e9a21b4542f63a504babc94c19243fd364c2adbe72f4cbce1883ae7cf60c157a5a481909d
2025-01-27 14:49:33 +01:00
Michael Mallan
5edbcb9033
ci: reduce number of tasks
This will reduce some of the overhead of setting up each task.
2025-01-27 11:34:03 +00:00
damuzhi0810
f12c65cdd2 chore: fix some comments
Signed-off-by: damuzhi0810 <rust@before.tech>
2025-01-23 22:05:18 +08:00
edouardparis
440efa7b61
Merge #1271: tests: add a note to README.md about running tests in parallel
ef5291d7e8ebfd4ab14a91197ef5d0bf275586f9 tests: add a note to README.md about running tests in parallel (pythcoiner)

Pull request description:

ACKs for top commit:
  edouardparis:
    ACK ef5291d7e8ebfd4ab14a91197ef5d0bf275586f9

Tree-SHA512: 23430e65e05c4b54a7a9eae2110a4e17c14952bcd727284805201deedd5eeee36b2a9ebc1a612624e8a2cff3e6943d31515008c65a0b5d4fbb3a34734a3b57dd
2025-01-23 12:34:33 +01:00
edouardparis
99db113389
Merge #1553: skip policy compilation when parsing descriptor
a95cfad6d249cffecc25da3d9b31b81946bd297a skip policy compilation when parsing descriptor (Michael Mallan)

Pull request description:

  This allows to create a new `LianaPolicy` without checking that it compiles into miniscript. This compilation check is used as a sanity check on the policy in addition to other Liana-specific checks, but this compiled policy is not otherwise used.

  When parsing an existing descriptor, we will assume that the policy can be compiled. Otherwise, the method `LianaPolicy::from_multipath_descriptor` ends up calling `LianaPolicy::into_multipath_descriptor_fallible`.

  A `LianaPolicy` is created from a descriptor each time we call `LianaDescriptor::from_str`, which is done often, e.g. when updating derivation indices in the DB. Removing the compilation check won't affect the `LianaDescriptor` that we end up with when parsing a string as we already use the `Descriptor` obtained from parsing the string rather than that obtained by compilation of the policy.

  This change is particularly important with the upcoming upgrade to miniscript 12.0, which has been found to increase Liana policy compilation times significantly.

  An additional option would be to reduce the number of times we call `LianaDescriptor::from_str`, e.g. by passing the descriptor as a parameter rather than reading from DB, but this current change should address the main performance issues.

ACKs for top commit:
  pythcoiner:
    utACK a95cfad6
  edouardparis:
    ACK a95cfad6d249cffecc25da3d9b31b81946bd297a

Tree-SHA512: 690d7b6a14387222c08537940556a2bbae46f4b46905411810b494a6debc3958a3963e9003bbe0fecf2c5530c15bcc3737874d59994ab599a5d5db59a5bf332a
2025-01-23 11:39:58 +01:00
Michael Mallan
a95cfad6d2
skip policy compilation when parsing descriptor
This allows to create a new `LianaPolicy` without checking that
it compiles into miniscript. This compilation check is used as
a sanity check on the policy in addition to other Liana-specific
checks, but this compiled policy is not otherwise used.

When parsing an existing descriptor, we will assume that the
policy can be compiled. Otherwise, the method `LianaPolicy::from_multipath_descriptor`
ends up calling `LianaPolicy::into_multipath_descriptor_fallible`.

A `LianaPolicy` is created from a descriptor each time we
call `LianaDescriptor::from_str`, which is done often, e.g.
when updating derivation indices in the DB. The sanity check
of the descriptor previously performed during compilation of
the policy will now be done explicitly as part of the
`LianaDescriptor::from_str` method.

Removing the compilation check won't affect the `LianaDescriptor`
that we end up with when parsing a string as we already use the
`Descriptor` obtained from parsing the string rather than that
obtained by compilation of the policy.

This change is particularly important with the upcoming upgrade
to miniscript 12.0, which has been found to increase Liana policy
compilation times significantly.

An additional option would be to reduce the number of times we
call `LianaDescriptor::from_str`, e.g. by passing the descriptor
as a parameter rather than reading from DB, but this current
change should address the main performance issues.
2025-01-22 16:49:43 +00:00
edouardparis
c16237d354
Merge #1548: fix release and sign scripts
edd13360ede0114555688cc109298587ea530f35 fix release and sign scripts (edouardparis)

Pull request description:

  * Use LIANA_PREFIX var everywhere
  * Remove capital letter from macos binaries.
  * Add macos to .zip title

ACKs for top commit:
  edouardparis:
    Self-ACK edd13360ede0114555688cc109298587ea530f35

Tree-SHA512: 9bc6941cf0a0f563b5caec7c924394e6e54a310e0e854409520e01e93d52a3bad8dc5d882b730d4e00f9663fb11a46c7d98965b27244ce61afcdd52d58b12b28
2025-01-20 10:51:23 +01:00
edouardparis
edd13360ed fix release and sign scripts
Use LIANA_PREFIX var everywhere, remove capital letter from macos
binaries.
2025-01-17 12:13:41 +01:00
edouardparis
6aed1cb450
Merge #1543: release: remove windows zip
d4f9f38ca0609e87156c7abf31bb80c4b088a4a5 release: remove windows zip (edouardparis)

Pull request description:

  The zip was containing only the readme file and the unsigned .exe. It is not really useful for a windows user.

ACKs for top commit:
  edouardparis:
    Self-ACK d4f9f38ca0609e87156c7abf31bb80c4b088a4a5

Tree-SHA512: 894e2dea205695cc7bd399efb12bbdf9f9b1760b2013b58a8fd83166b31ae60a8aafeac53f50ba61a7baa2cf63eb443621ac2c268d4c56c8fe5294cd5b5935bf
2025-01-15 12:51:05 +01:00
edouardparis
d4f9f38ca0 release: remove windows zip
The zip was containing only the readme file and the unsigned .exe.
It is not really useful for a windows user.
2025-01-15 12:06:32 +01:00
edouardparis
ba01c78b4b
Merge #1537: export: list transaction in chronological order
19b7414e7be5d8fd0b89963edc8254616d14ae85 export: list transaction in chronological order (pythcoiner)

Pull request description:

  closes #1536

ACKs for top commit:
  edouardparis:
    ACK 19b7414e7be5d8fd0b89963edc8254616d14ae85

Tree-SHA512: c9442a65b770cf408c79d5fd4d68d025ccb92a7a322f4402e23620aec96f458eb2c30856d47d11fbaa6b03631c1638a655abfc26eedfc1fac60249055f0be27b
2025-01-14 12:20:33 +01:00
pythcoiner
19b7414e7b
export: list transaction in chronological order 2025-01-13 12:51:05 +01:00
edouardparis
f46efa2a33
Merge #1530: Fix update of rescan state upon completion
130d004e79a1440e3d810ef35082f9671dc1ad81 refactor: do not include cache in message (Michael Mallan)
665c527dd08d027dbf95b22e58d44b1cb29212db fix: set rescan processing to false upon completion (Michael Mallan)
65e002dc528f3951d39e353b87bc531885a943a6 refactor: treat as dyn state to easily add others (Michael Mallan)

Pull request description:

  This is to fix #1528.

  It updates the `processing` field of the rescan settings each time the cache is updated.

ACKs for top commit:
  edouardparis:
    ACK 130d004e79a1440e3d810ef35082f9671dc1ad81

Tree-SHA512: 7edd744510edf799ab7f00cceee31e60ce316f3cd0c8377d7693064b4cf0c9ac12520f0c55a3c3305866c3cb98684378640ab2944c0dc76969cac9209ce3bce9
2025-01-13 10:12:51 +01:00
Michael Mallan
130d004e79
refactor: do not include cache in message
We already have access to the cache in the `update` arguments.
2025-01-10 17:43:41 +00:00
Michael Mallan
665c527dd0
fix: set rescan processing to false upon completion
Otherwise, the button gets stuck on "Starting rescan...".
2025-01-10 17:29:23 +00:00
Michael Mallan
65e002dc52
refactor: treat as dyn state to easily add others
Otherwise, all elements are expected to be `Home`.
2025-01-10 17:14:20 +00:00
edouardparis
dbfbad7f5a
Merge #1521: fix script: remove paths from checksums file
bd3eaa1cd6034b4ffb5075e6611c09abf61da28e fix script: remove paths from checksums file (edouardparis)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK bd3eaa1cd6034b4ffb5075e6611c09abf61da28e

Tree-SHA512: 4cd2325975f91d44e89ac0e0c66e7b7feca83d2c94172f31c26bf98f1835978789f62e803a3c2833d5fc6171f70668a4de64281ff10ee0605385000a249dd21c
2025-01-07 17:41:31 +01:00
edouardparis
63fcb47dbd
Merge #1522: fix fetching of coins txids before migration
c5b1f73660888fed788c76d13645a1ed2f3b95fa fix fetching of coins txids before migration (edouardparis)

Pull request description:

  While directly migrating from v7 to v9, the daemon get a problem and panic because it was using the db_coins query with v9 coins columns.

ACKs for top commit:
  jp1ac4:
    utACK c5b1f73660888fed788c76d13645a1ed2f3b95fa.

Tree-SHA512: eb450ce68c6f968e3546ce77b2ababd45e196403e20a11d22f70b45bf7d30e89a2a64c23a3cc4a85466bd58d376a0340262c98c3213b2b37ff1ce5a4382c9722
2025-01-07 17:10:38 +01:00
edouardparis
c5b1f73660 fix fetching of coins txids before migration 2025-01-07 16:10:14 +01:00
edouardparis
bd3eaa1cd6 fix script: remove paths from checksums file 2025-01-07 14:33:09 +01:00
edouardparis
451ba88445
Merge #1518: Prepare v9 release
39616bea421182f10a4a9f6aa2701f665817e5d3 Add liana and version to shasums txt file (edouardparis)
d0fefc37f4a1f51674336694601d17a33b74e7c1 Prepare v9 release (edouardparis)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK 39616bea421182f10a4a9f6aa2701f665817e5d3

Tree-SHA512: 8e04468d6dfab973f556ad374bfa06ee3912a80ee491528bf2f44b34e79b31ce57a65303547dba039639e54f32ac275292fc468f6a9c379e4878d5e32c676e18
2025-01-07 11:40:16 +01:00
edouardparis
39616bea42 Add liana and version to shasums txt file 2025-01-07 11:22:24 +01:00
edouardparis
d0fefc37f4 Prepare v9 release 2025-01-07 11:22:24 +01:00
edouardparis
77142b510d
Merge #1513: fix reload of selected psbt after update
ebc52cc7330c049369f720813b19264042e08fbb fix reload of selected psbt after update (edouardparis)

Pull request description:

  close #1505

ACKs for top commit:
  edouardparis:
    Self-ACK ebc52cc7330c049369f720813b19264042e08fbb

Tree-SHA512: d43ec3cfff581f6a0993e12769f2da867a738d25fdb4fb1d12e3265bb8118dfee586b23c6a12469220f83948f7a7bba8d60cad8a0df07100e8835b0a1563b01b
2025-01-06 17:41:01 +01:00