1382 Commits

Author SHA1 Message Date
edouardparis
ffbbaa8285
Merge #850: Gui show transaction detail while signing
7d97f466ef174f5c9a7f57f757f737cf66ff5d81 ui: add processing hw notification to components (edouardparis)
1ea292f058475e2a1139328f33133397f9fe7bde gui: merge psbt signatures instead of override full psbt (edouardparis)
a539cfe157bff1b765520514d6ed854a2603ec42 Add ui component toast from iced repo examples (edouardparis)
71bc585ed350cf22c6aef8a34596c984777f02a6 encapsulate psbt actions in enum (edouardparis)
e55269def7d4becd267505321eef37b9553a6393 Make psbt action components handle the whole view (edouardparis)

Pull request description:

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

ACKs for top commit:
  edouardparis:
    Self-ACK 7d97f466ef174f5c9a7f57f757f737cf66ff5d81

Tree-SHA512: 497e1edafa2755e39498b5cfb0e90c978a5575fcdc544ee478af3468f39097133de6595db739fdc2ec004d3a8a0b3be715c389a44c745d8ba4802aa44612e20a
2024-01-15 18:07:07 +01:00
edouardparis
3076d2d322
Merge #908: gui(daemon): fix rbfpsbt params for external daemon
5c06eef586ebd540f14f3ded4d3639dcbcfb0209 gui(daemon): fix rbfpsbt params for external daemon (jp1ac4)

Pull request description:

  The `is_cancel` parameter gives an "invalid parameter" error when converted to string.

  The `feerate_vb` parameter should only be passed if it has a value as otherwise it gives an "invalid parameter" error.

ACKs for top commit:
  edouardparis:
    utACK 5c06eef586ebd540f14f3ded4d3639dcbcfb0209

Tree-SHA512: 73d192186ffac19c560cf7dd0aef8ae5c276bc6ff09852d7b1bc59aa23fe9f980c11e53654fc20fdc41ab2fee9f4433a91591c869ba0aebade8f2febce2121b5
2024-01-15 14:41:57 +01:00
edouardparis
7d97f466ef ui: add processing hw notification to components 2024-01-15 11:58:51 +01:00
Antoine Poinsot
501dce4372
Merge #905: spend: warn when overpaying fee
5a15c744e796c9ebe4f6c1eb3010b824189f7855 commands: return warnings from spend creation (jp1ac4)
da474ad6ce1a7553bdc16a586565ef509d74f8ee spend: add warning when adding change to fee (jp1ac4)
8d84f0de863c8fea97d7402651482b908b6d5b87 spend: return max possible change from coin selection (jp1ac4)
e4d8330f34cf82e43bd7d1dc54e56ebf4cfe0baf spend: use debug log level in coin selection (jp1ac4)

Pull request description:

  This is a first step towards #811. The GUI will be updated in a follow-up PR.

  It adds a warning if there is any change/excess available that has been added to the fee, building on the assumption from https://github.com/bitcoindevkit/coin-select/pull/14 that the decision whether to include change depends on whether the excess is over a threshold. The function `select_coins_for_spend()` now returns this threshold so that the caller can check if the possible change amount is above it.

  I've used an `enum` for the different warnings, but could use strings directly.

  If the approach looks fine, I'll add some tests.

ACKs for top commit:
  darosior:
    ACK 5a15c744e796c9ebe4f6c1eb3010b824189f7855

Tree-SHA512: 12716b1e299d3154c520667c66aeb7a176a770f4a1d53125a8334d7c5a7e7bb2ce1dcb795ad5998bffc1303d9cb34c651cf8d3ef3dee8210572d75069012bddd
2024-01-13 13:18:48 +01:00
Antoine Poinsot
47f60bf2d5
Merge #912: #858: Change text when downloading Bitcoin to include version number
b4f505c4312c3ef4c54dde82a940e923c2b3ca1d Change text when downloading Bitcoin to include version number (Aaron Carlucci)

Pull request description:

  Simple text change to add bitcoind version number to download wording as per #858. First issue exploration.

ACKs for top commit:
  pythcoiner:
    ACK b4f505c4312c3ef4c54dde82a940e923c2b3ca1d
  jp1ac4:
    ACK b4f505c431.

Tree-SHA512: 768941de9f308681b903235bc3f9dc6273bd1eac3cdc0b800e7ad1182c3468f37eb9e1169e4ccc79a4e465668d215b419d2e433754914a3a12447575dd693558
2024-01-13 11:50:45 +01:00
Aaron Carlucci
b4f505c431 Change text when downloading Bitcoin to include version number
Minor formatting fix

Text change to specify 'Bitcoin Core' during installation download
2024-01-12 18:54:50 +01:00
edouardparis
1ea292f058 gui: merge psbt signatures instead of override full psbt
While signing in parallele, only new signatures should
be appended without race condition.
2024-01-12 15:56:46 +01:00
edouardparis
a539cfe157 Add ui component toast from iced repo examples 2024-01-12 15:56:46 +01:00
edouardparis
71bc585ed3 encapsulate psbt actions in enum 2024-01-12 15:56:46 +01:00
edouardparis
e55269def7 Make psbt action components handle the whole view 2024-01-12 15:56:46 +01:00
jp1ac4
5a15c744e7
commands: return warnings from spend creation 2024-01-11 20:06:00 +00:00
jp1ac4
da474ad6ce
spend: add warning when adding change to fee 2024-01-11 20:05:59 +00:00
jp1ac4
8d84f0de86
spend: return max possible change from coin selection 2024-01-11 20:05:59 +00:00
jp1ac4
e4d8330f34
spend: use debug log level in coin selection
This function is now called many times from the GUI via
`create_spend` and we expect this log message to be generated
multiple times.
2024-01-11 20:04:55 +00:00
Antoine Poinsot
d8a5e1d780
Merge #906: Bump MSRV, upgrade dependencies and clippification
0e99136404fcbbdee09eef4b116f17222cb2dee0 Clippification (Antoine Poinsot)
4949632fe6510151df9281b55a049169842ee5ef bitcoin: remove unused import (Antoine Poinsot)
ce026a62e6bf064cea249f391e4ab870f1cbcb61 Update rust-bitcoin and rust-miniscript (Antoine Poinsot)
2bce4c525d51b8ecbc923a43632ef8a724426453 Cargo: bump jsonrpc version to 0.17 (Antoine Poinsot)
65c9e389bb89197c2e9066b82789cec63b18d2d1 Cargo: bump rusqlite to 0.30 (Antoine Poinsot)
84e8a2ae8630789f5b8cc3796e0f1e4ff87614f2 Cargo.lock: update minor dependencies after MSRV bump (Antoine Poinsot)
92328fb8f6e34a383e876a79fad3fee4110c09a5 Bump MSRV for lianad to 1.63 (Antoine Poinsot)

Pull request description:

  New years' cleanup!

  Our MSRV was becoming too restrictive to keep being able to benefit from the latest releases of our dependencies. Strike a better balance between not requiring a recklessly new compiler and still being able to get upstream bug fixes.

  From this update most of our dependencies to their latest point releases. Then upgrade rusqlite, jsonrpc and rust-[bitcoin, miniscript] to their latest major version. Note their is a ton of updates. I've done a minimal due diligence to check what was updated, to what version, what changed, but i can't realistically audit all the code changes this is effectively pulling. I think we need to look into `cargo-crev`.

  Take the opportunity to apply some clippy cleanups, and bump the version we're using in CI.

  See commit messages for details.

ACKs for top commit:
  darosior:
    reACK 0e99136404fcbbdee09eef4b116f17222cb2dee0 -- re-applying jp1ac4's ACK after addressing review

Tree-SHA512: f7940a90065fdf2e9c2013a882955f8f8febe537f8268224a321ae2df2e380c5a34c8c99891b25aa3ee14efe9c5eaaa7ee3ffa6ea163a749cec044db351dd408
2024-01-11 10:48:27 +01:00
Antoine Poinsot
0e99136404
Clippification
Bump clippy in CI to latest stable.
2024-01-11 10:45:41 +01:00
Antoine Poinsot
4949632fe6
bitcoin: remove unused import 2024-01-11 10:45:40 +01:00
Antoine Poinsot
ce026a62e6
Update rust-bitcoin and rust-miniscript
The most notable change is rust-bitcoin's change in the serialization of
transaction with no input. It now accounts for the segwit marker even
for those. The base tx weight in coin selection had to be adapted to
handle this.

See https://gnusha.org/bitcoin-rust/2024-01-04.log for details.
2024-01-11 10:45:36 +01:00
jp1ac4
5c06eef586
gui(daemon): fix rbfpsbt params for external daemon 2024-01-08 15:40:24 +00:00
Antoine Poinsot
15b1f0c789
Merge #901: bitcoind: error when trying to rescan past prune height
a3731fa0045c1319d2d0973e1246bd62744ede42 bitcoind: error when trying to rescan past prune height (Antoine Poinsot)

Pull request description:

  Fixes #693.

ACKs for top commit:
  darosior:
    ACK a3731fa0045c1319d2d0973e1246bd62744ede42 -- tested locally, we now need to display the error in the GUI though (#900)

Tree-SHA512: 5c4fd4e2bc6b66f25ab46aa57b240b24b5b630fab250ce11dc8ae22de266a0384a6e65190eee41d2c5beab8aca43ab80b16685396baa16614a8fa988765d77b2
2024-01-04 18:30:49 +01:00
Antoine Poinsot
2bce4c525d
Cargo: bump jsonrpc version to 0.17
It now finally accepts an option as argument.
2024-01-04 14:32:58 +01:00
Antoine Poinsot
65c9e389bb
Cargo: bump rusqlite to 0.30
This gives us bundled SQLite 3.44.0. Notably this patches CVE-2022-35737
but it shouldn't affect us.
2024-01-04 14:32:58 +01:00
Antoine Poinsot
84e8a2ae86
Cargo.lock: update minor dependencies after MSRV bump
Took care of keeping dirs pinned to avoid the dirs license shitshow. See
e169da7af9 (r111303146)
for more.
2024-01-04 14:32:57 +01:00
Antoine Poinsot
92328fb8f6
Bump MSRV for lianad to 1.63
1.63 is the latest version supported by Debian. It's also now almost a
year and a half old (August 2023). We start getting way behind on our
dependency updates, and sometimes even missing some security updates
(nothing which affects us but still..).

Asking to support a less than 2.5yo compiler shouldn't be that much to
ask, but hey. 1.63 is now a better balance between support for upstream
updates and support for a not recklessly new compiler.
2024-01-04 14:32:57 +01:00
Antoine Poinsot
051957ede7
Merge #898: gui: support user/password for RPC authentication
838550b917d96a6a6d11f5d0103c53706acd9a8c gui: change radio border color (jp1ac4)
38198cc79f29fd13b52f963ce8fe7da2567b3bb4 installer: support user/password RPC authentication (jp1ac4)
3ccdafbda235730ec95d6f2992808beb2eb51aa9 gui: support user/password RPC authentication (jp1ac4)

Pull request description:

  This adds support to the GUI for user and password RPC authentication as part of #356.

  The first commit adds the user/password option to the settings page, and only updates the installer as required for it to compile. It also changes how the managed bitcoind gets the cookie location when starting so that it doesn't rely on the config file.

  The second commit adds the user/password option to the installer when using a self-managed node.

  Updating the managed node to use user/password can be done in a follow-up PR.

ACKs for top commit:
  darosior:
    ACK 838550b917d96a6a6d11f5d0103c53706acd9a8c

Tree-SHA512: 412e167351807bc319d33a0f7ddb34f522f4b146c95f78877936ff476ce2a8d5ef68d359608ad7d3f1ddf4ca9b6a94e035d594ffc464c0fd5940c252d3c4de39
2024-01-03 14:54:17 +01:00
Antoine Poinsot
a3731fa004
bitcoind: error when trying to rescan past prune height 2024-01-03 11:30:29 +01:00
edouardparis
95fd0023da
Merge #899: gui(settings): load updated bitcoind settings after saving
bd9d9f2168fcc2cac965f40a561e550752ff33e6 gui(settings): load updated bitcoind settings after saving (jp1ac4)

Pull request description:

  Currently, the Bitcoin Core settings page doesn't show the updated values after saving changes and needs to be reloaded in order to refresh. This change makes the Bitcoin Core settings page reload after changes are saved so that they are shown immediately.

ACKs for top commit:
  edouardparis:
    ACK bd9d9f2168fcc2cac965f40a561e550752ff33e6

Tree-SHA512: f0547a8a52a4cafdf0d464301ef3574f502c262a2238d5100edd960701cb155b5d71db495a740fa074181254ebba2a3d90ddfad7e1897eaab0f6143bb0ccc457
2024-01-03 10:57:12 +01:00
jp1ac4
838550b917
gui: change radio border color 2023-12-28 17:22:40 +00:00
jp1ac4
38198cc79f
installer: support user/password RPC authentication
If using a self-managed node, this adds the option to authenticate
with the RPC server using user and password.
2023-12-28 17:22:40 +00:00
jp1ac4
3ccdafbda2
gui: support user/password RPC authentication
This change updates the GUI to support the latest lianad config
file with the user/password option for bitcoind RPC authentication.

The settings have been updated to set either cookie file path
or user and password.

The installer still only supports the cookie file and has only
been updated with the changes required to compile.

When starting, the internal bitcoind now looks for the cookie file
in the usual location rather than relying on the config file.
2023-12-28 17:22:39 +00:00
Antoine Poinsot
b8f8d1b944
Merge #894: gui: truncate config file before writing
a4b982d972b9a5d823b48ae1f1b979481e6785b6 gui: truncate config file before writing (jp1ac4)

Pull request description:

  This is required in case the updated config file has a shorter length than the existing file.

  For example, if changing cookie path from absolute path to relative path, the updated config file will have invalid content without this change.

ACKs for top commit:
  darosior:
    Makes sense but i'm missing context surrounding this code. Github utACK a4b982d972b9a5d823b48ae1f1b979481e6785b6. Will let Edouard confirm it's OK.

Tree-SHA512: 0fb89e190ba934661ceeec2401390faa9b3cad6858d0a3a9fdd48bb6b7a20bcd57277422ee6b8b09a59c67f0750072481755341f7b9e9f618154b04e62cb4bf2
2023-12-28 16:46:31 +01:00
jp1ac4
bd9d9f2168
gui(settings): load updated bitcoind settings after saving 2023-12-27 23:11:15 +00:00
jp1ac4
a4b982d972
gui: truncate config file before writing
This is required in case the updated config file has a shorter
length than the existing file.
2023-12-21 18:40:08 +00:00
Antoine Poinsot
386b4cb3dd
Merge #893: config: redact RPC credentials in Config Debug impl.
5c3763526d4d2056e3b3dbf679e4c3244d1f4bf3 config: redact RPC credentials in Config Debug impl. (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  jp1ac4:
    ACK 5c3763526d.

Tree-SHA512: 59d54913f25e5745a14ceac9012b5f285c06c3533709563c5dedeb0f0e3a548d7929f90ce698de004ae708deeb33f80061a233c64731fc9f7649d87df2119571
2023-12-21 15:21:40 +01:00
Antoine Poinsot
5c3763526d
config: redact RPC credentials in Config Debug impl. 2023-12-21 14:27:36 +01:00
Antoine Poinsot
21e064c50e
Merge #890: config: add user:password option for RPC authentication
552a49edb2dbccda5204f80188212fc6b59e029e config: add user:password option for RPC authentication (jp1ac4)

Pull request description:

  As a first step towards #356, this adds the option to specify a user and password in Liana's config file for bitcoind RPC authentication.

  The GUI installer & settings will need to be updated in a follow-up PR to add this option.

ACKs for top commit:
  darosior:
    ACK 552a49edb2dbccda5204f80188212fc6b59e029e

Tree-SHA512: 2a1b5214935a313d36b85c310b28c8e1946375d80af53514ed44987b26383a3824a28f1e70c079ed933c53707a7fb672e3a48dc77f7e585acca217b04d376f77
2023-12-21 14:22:58 +01:00
jp1ac4
552a49edb2
config: add user:password option for RPC authentication 2023-12-20 15:56:06 +00:00
Antoine Poinsot
5b93e1f76c
Merge #892: Drop watchonly wallet migration for old Windows datadir
6d2833fc1857daf140f7efc8d0b81c662076edd4 Drop watchonly wallet migration for old Windows datadir (Antoine Poinsot)

Pull request description:

  It was introduced as a temporary hack in v2 (released in August 2023) for migrating datadirs created on Windows using Liana v1 (May 2023).

  Presumably Windows users wouldn't have used the beta versions which preceded v1 release with any real funds. This removal would go in v5, released around end of January / early February. Presumably any Windows user who created a mainnet datadir within the 3 months period where the bug was present would have opened its Liana at least once in the following 6 months after the migration was released.

  In the unlikely case a user on Windows created a mainnet wallet on the very first release of Liana, funded it, didn't touch it for more than 6 months and tried to open it later using the latest version of Liana available they are instructed to first run Liana v4 (so the migration is performed automatically at startup) before running the latest version of Liana.

  Nits on the wording welcome!

ACKs for top commit:
  jp1ac4:
    ACK 6d2833fc18.

Tree-SHA512: cd9369e3305dde4bcc572d004f4b5f430df79ef174507f473c9b76552155dcda17be46689b1602de1dfdb87680456e3e9a3b4115b352319e9b43005c2c9f8594
2023-12-20 15:30:32 +01:00
Antoine Poinsot
6d2833fc18
Drop watchonly wallet migration for old Windows datadir
It was introduced in v2 (released in August 2023) for migrating datadir created using Liana v1 (May 2023).
2023-12-20 11:21:51 +01:00
Antoine Poinsot
53fa0816a9
Merge #882: gui: use descriptor helper function to get unsigned tx max size
e373ad45d4ee33ae36636030a0c97ea9302d3514 gui: use helper for unsigned tx max size (jp1ac4)

Pull request description:

  This is to resolve #880 using the new helper function from #881 to get the max possible size of the unsigned transaction.

  The following screenshot is taken using both new and old implementations together and shows the new estimated feerate changes from 0 to 1 sat/vbyte:
  ![image](https://github.com/wizardsardine/liana/assets/121959000/855fe261-418f-4ebb-a426-15f1ce7007f6)

ACKs for top commit:
  darosior:
    ACK e373ad4

Tree-SHA512: b8d3aee84eaae8614db7dc4749fd86aa3df61bfa720bba0a978076f7a2c6e37a29ad8c8448e8bff16017438672ce1e681e2a916e2350c29c1fbac4aba5315d87
2023-12-20 10:09:24 +01:00
jp1ac4
e373ad45d4
gui: use helper for unsigned tx max size 2023-12-15 18:00:34 +00:00
Antoine Poinsot
dee069e723
Merge #881: descriptors: add unsigned tx max size helper
927c252d2e1f4755241a5f83666c034f7f8c43c3 spend: use helper for unsigned tx max size (jp1ac4)
af416f6502924946da8d2e9a070fde2f5d731776 commands: use helper for unsigned tx max size (jp1ac4)
e9264bdf0d8ed2b1532a9cde231a0e86ff657690 descriptors: add helper for unsigned tx max size (jp1ac4)
0f8571b90127fc68ac1304892ca95fee8e16d024 descriptors: use witness scale factor from lib (jp1ac4)

Pull request description:

  This is a first step towards resolving #880.

  It adds a helper function to `LianaDescriptor` that calculates the max size of an unsigned transaction after satisfaction,  assuming all transaction inputs are from that descriptor.

  Separately, I use this new helper function in spend and commands modules (I can drop/squash these commits as required).

ACKs for top commit:
  darosior:
    ACK 927c252d2e1f4755241a5f83666c034f7f8c43c3

Tree-SHA512: 5be12484de9c74bb493066390b71544ac28b481256d7b5214234bfe7558422dffc29ddc666b69e3260d4cca765ddf2ae7e21b0dd8c5f73425f0e7a52cf533db0
2023-12-15 18:40:31 +01:00
Antoine Poinsot
48feee16f5
Merge #886: README: latest version is 4.0
f620dcbff59e1b10de5bbfc2186b3eed57dddc58 README: latest version is 4.0 (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  darosior:
    self-ACK f620dcbff59e1b10de5bbfc2186b3eed57dddc58

Tree-SHA512: 2c315467ad9b94117e08c15e09e04a115fefed8b3dd61c966a7acc77b05658d3e911eee451be507623bf550172f2462c8a843b31becae7478fb57820a75020e0
2023-12-15 13:35:16 +01:00
Antoine Poinsot
f620dcbff5
README: latest version is 4.0 2023-12-15 13:29:48 +01:00
edouardparis
67dd3af9ba
Merge #876: gui: make the trash button prettier
2b5fe01cf04d9686b63915c284cb27cabf4d4b5a gui: make the trash button prettier (Antoine Poinsot)

Pull request description:

  After feedback from Kevin.
  ![image](https://github.com/wizardsardine/liana/assets/22457751/f814613d-143a-4d33-9459-ec2e2c988100)

ACKs for top commit:
  edouardparis:
    ACK 2b5fe01cf04d9686b63915c284cb27cabf4d4b5a

Tree-SHA512: f4f1a03bf8d9a2b5f19a196f8831925a99a3fdc9b981b41f14c0905d953144dc58b6cafaf2a17bef394d8e777b863f0e5a36e7b96f0d9205675d25f252ea4ff7
2023-12-15 09:59:21 +01:00
jp1ac4
927c252d2e
spend: use helper for unsigned tx max size 2023-12-14 14:49:30 +00:00
jp1ac4
af416f6502
commands: use helper for unsigned tx max size 2023-12-14 14:49:29 +00:00
jp1ac4
e9264bdf0d
descriptors: add helper for unsigned tx max size 2023-12-14 14:49:29 +00:00
jp1ac4
0f8571b901
descriptors: use witness scale factor from lib 2023-12-14 14:18:34 +00:00
edouardparis
683a500dd0
Merge #879: fix bitbox unsupported status when no wallet yet
1fa414be75cc99b4d95d6a7f3048cbfe62bdeb9b fix bitbox unsupported status when no wallet yet (edouardparis)

Pull request description:

  During the install process, no wallet yet is created and bitbox should not be marked as unsupported if
  its fingerprint is not in any descriptor.

ACKs for top commit:
  edouardparis:
    Self-ACK 1fa414be75cc99b4d95d6a7f3048cbfe62bdeb9b

Tree-SHA512: 6f6287bf4e001253c369b282ae9ef3eec7163fdd45b09022e77e61c2e08ddf656c60414239a69fd466448132bc837655fbe68b9cebc6d74fa5524f0d8b4adc7c
2023-12-14 14:11:15 +01:00