1411 Commits

Author SHA1 Message Date
pythcoiner
cd0e69ab23 add -v/--version and -h/--help args 2024-03-19 19:31:14 +01:00
edouardparis
a34070dce1
Merge #938: gui: use descriptor method to detect psbt change outputs
366e9b7d49eb7261df4801534224cb737a49149f gui: use descriptor method to detect psbt change outputs (edouardparis)

Pull request description:

  This commit also fix handling of create_spend result while updating liana:master

  close #841

ACKs for top commit:
  edouardparis:
    Self-ACK 366e9b7d49eb7261df4801534224cb737a49149f

Tree-SHA512: 5316e610ec6fe1c09447329c031a52710fa7802c0135cc2e386d9926d5f189f1b381596b1f5b081beb2904341d4d7468fa1b4148e9fc49644670e5d8335ca015
2024-01-26 17:12:05 +01:00
edouardparis
366e9b7d49 gui: use descriptor method to detect psbt change outputs
This commit also fix handling of create_spend result while
updating liana:master

close #841
2024-01-25 17:01:43 +01:00
edouardparis
5a56fdb108
Merge #933: Fix error message when importing desc for wrong network
24f67d2a85b12730c669c4c7e311a534f75cc0ad Fix error message when importing desc for wrong network (edouardparis)

Pull request description:

  close #781

ACKs for top commit:
  edouardparis:
    Self-ACK 24f67d2a85b12730c669c4c7e311a534f75cc0ad

Tree-SHA512: a2e82e20144e2eebf08897e6c64f8426a30dba1d062553238e28a4b5d9abc12c981917a1f6c5a57d99fdf714c62cbc1de7fba061fcad92aee444d4e642ffcc10
2024-01-24 14:15:09 +01:00
edouardparis
24f67d2a85 Fix error message when importing desc for wrong network
close #781
2024-01-24 13:48:05 +01:00
Antoine Poinsot
3aa9550a89
Merge #922: descriptors: add a method to get a PSBT's change outputs
39299263954b4d29f6bdcb177e9b2377d1ea92ed descriptors: add a method to get a PSBT's change outputs (Antoine Poinsot)
c6b554da93bdc90b0c2a6cb70d962fcaaf718aff descriptors: unit test we do take into account derivation steps before wildcard and multipath (Antoine Poinsot)

Pull request description:

  Fixes #857.

ACKs for top commit:
  darosior:
    ACK 39299263954b4d29f6bdcb177e9b2377d1ea92ed -- re-applying Edouard's ACK. Only change is the addition of an `index()` method on the `ChangeOutput` enum.

Tree-SHA512: fceaa4e492684be08d45ab09d74345d5825b73d930f5caa4162862e5ff94f32cd5e9ab23b0730bc7ef44569c8e10cfed0f343b4843590a2163122d3402fc3734
2024-01-24 11:28:51 +01:00
Antoine Poinsot
3929926395
descriptors: add a method to get a PSBT's change outputs 2024-01-24 11:26:00 +01:00
edouardparis
2f50c55f79
Merge #936: fix panic for managed bitcoind on network change
a7b84860793a2094b9cbfe13f380f852622ab2d5 fix panic for managed bitcoind on network change (edouardparis)

Pull request description:

  close #934

ACKs for top commit:
  jp1ac4:
    ACK a7b8486079.

Tree-SHA512: 436a71a4a62f6c06fa97be85b4a1d49e9ab1abfb0ff95dab63f5ff0ab6531fe0bcc6f84045b287660f434da01ea57fcbc2c345147d5d7970cfdbfb31e4e46200
2024-01-24 10:35:24 +01:00
Antoine Poinsot
79141e2042
Merge #927: commands: include missing amount in spend response
13398982534d56a5723dfa86723c5917483c8653 commands: include missing amount in response (jp1ac4)

Pull request description:

  This PR follows a discussion around https://github.com/wizardsardine/liana/pull/873#issuecomment-1886715468.

  The GUI uses the `InsufficientFunds` error to get the missing amount when the user is creating a new spend, but it is not straightforward to extract this information in a general way from the RPC error (see https://github.com/wizardsardine/liana/issues/822#issuecomment-1836482355) and instead the spend module's `create_spend` is currently used (see https://github.com/wizardsardine/liana/pull/863).

  With this PR, the missing amount will be included in the `createspend` response rather than as an error.

  These changes are based on suggestions from @darosior and @edouardparis.

  In a follow-up PR, the GUI should revert to using the `createspend` command to calculate the amount left to select.

ACKs for top commit:
  darosior:
    re-ACK 1339898

Tree-SHA512: bf702d6b355339e96e719c1d95824e7941ac4fbaece4ec4cccd00b56ea4683ce7fb0cefc43faa5731b57e7935ef99da3a2c73b84aaeb9fa5f67703c799be2196
2024-01-23 17:33:48 +01:00
edouardparis
a7b8486079 fix panic for managed bitcoind on network change
close #934

Co-authored-by: jp1ac4 <121959000+jp1ac4@users.noreply.github.com>
2024-01-23 17:24:28 +01:00
edouardparis
e671e508ef
Merge #932: Reset bitcoind default settings on network change
8146269296bd1a6a638c726be7b2b5c53d9ff730 Reset bitcoind default settings on network change (edouardparis)

Pull request description:

  close #812

ACKs for top commit:
  edouardparis:
    Self-ACK 8146269296bd1a6a638c726be7b2b5c53d9ff730

Tree-SHA512: 359ea05c663b76615fcae2ecde8e1c63a0345db92e498d4d57b373eab04d6fcb40a46382314caf8edc58c25aae84956e41ee6bfc465a74f91b4f15aaa40d07ed
2024-01-23 16:44:32 +01:00
jp1ac4
1339898253
commands: include missing amount in response
The GUI uses the InsufficientFunds error to get the missing
amount when the user is creating a new spend.

It is not straightforward to extract this information in a
general way from the RPC error. Instead, this missing amount
will be included in the command response.

These changes are based on suggestions from darosior
and edouardparis.
2024-01-23 15:01:34 +00:00
edouardparis
8146269296 Reset bitcoind default settings on network change
close #812
2024-01-23 15:38:28 +01:00
edouardparis
0e295acc82
Merge #931: gui: async-hwi 0.0.14
9814b6efc47036d12ff0bc7ba1124d3377cdef3b gui: async-hwi 0.0.14 (edouardparis)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK 9814b6efc47036d12ff0bc7ba1124d3377cdef3b

Tree-SHA512: 18aca4444feba59df918668bd17e2c55d6ba4ab4eeb297a48a0e72d7dca10a571dc2b13d2dcd9b956ea7210d0077005355523b25dce51181e20c4b20e75bab97
2024-01-23 11:58:09 +01:00
edouardparis
9814b6efc4 gui: async-hwi 0.0.14 2024-01-23 11:50:43 +01:00
Antoine Poinsot
e9b5a7ad22
Merge #920: Wallet creation time
79177945ada4803af409f963dd6185d436aa6e21 add timestamp field to getinfo (pythcoiner)

Pull request description:

  (partially) address #805
  - [x] daemon
  - [x] tests
  - [x] doc

ACKs for top commit:
  darosior:
    ACK 79177945ada4803af409f963dd6185d436aa6e21

Tree-SHA512: ee72761174a09871092fe13313e18180530c1a9c4ef5ddf63cb196760a67bc4bac3c9af134d4be5e464f1ac0e16fed726693340499d192eb9a4d68471bbc2ced
2024-01-23 10:26:06 +01:00
edouardparis
ec7ac880e7
Merge #823: gui: bump rust version
3196a8025ea9686cf76f407043b3ef2f85e0b4fa gui: bump liana:master and async-hwi:master (edouardparis)
99bc44d2b17264e87d80ccada51a4568efbcba3e gui: remove base64 dep (edouardparis)
c9bb7b00de7ce6310b3e6596e8a8df12c1941b72 ci gui: rust version 1.74 for linter, 1.65 for tests (edouardparis)
1526d157687000472b5adb67a2eb796fb7eea109 fix clippy errors for rust 1.74 (edouardparis)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK 3196a8025ea9686cf76f407043b3ef2f85e0b4fa

Tree-SHA512: 21bf7e968d0b593788fac4c1a1f577763f541986c9dddc0c99ccef031277d059a77d5d74a7a183b7a42b8c015837e03264c3fb8f9f196d170aca3f85d527f49f
2024-01-22 16:19:14 +01:00
edouardparis
3196a8025e gui: bump liana:master and async-hwi:master 2024-01-22 15:49:56 +01:00
edouardparis
99bc44d2b1 gui: remove base64 dep 2024-01-22 12:20:22 +01:00
edouardparis
c9bb7b00de ci gui: rust version 1.74 for linter, 1.65 for tests 2024-01-22 12:20:22 +01:00
edouardparis
1526d15768 fix clippy errors for rust 1.74 2024-01-22 12:20:13 +01:00
pythcoiner
79177945ad add timestamp field to getinfo 2024-01-19 13:06:32 +01:00
edouardparis
7ca6cc8dfa
Merge #847: Add coldcard
07eba96ebf1c4a9c520c4686602fc3a56cf262c7 fix clippy error (edouardparis)
0f7a89db6423532f17b0a5337327ec656f7edd15 gui: use async-hwi:master (edouardparis)
386b1c9ec5d3fa690b1fdaf232f85793e7e12ed2 Add coldcard device to supported hws (edouardparis)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK 07eba96ebf1c4a9c520c4686602fc3a56cf262c7

Tree-SHA512: 44abdcc0def4904b31290875fd4c8a74da402e4cbfa75daae1f656bdf80e5526311c67b6467105382bd416251ef2446a97db30f4ed3b8b1ed015e3c9e3eb11b8
2024-01-16 16:38:03 +01:00
edouardparis
07eba96ebf fix clippy error 2024-01-16 16:17:29 +01:00
edouardparis
0f7a89db64 gui: use async-hwi:master 2024-01-16 15:15:33 +01:00
Antoine Poinsot
6c1430e8bc
Merge #919: Go directly to installer if datadir empty
ca583cd847c757ff5b4f6e9db15ce714d825c1a7 go directly to installer if datadir empty (pythcoiner)

Pull request description:

  address #263, now if there is a .liana dir already existing but not network folder (`bitcoin`/`testnet`/`signet`/`regtest`) inside, liana start directly into installer (before is was starting the launcher even if no network to launch, and displaying a weird 'Install liana on another network')

ACKs for top commit:
  darosior:
    ACK ca583cd847c757ff5b4f6e9db15ce714d825c1a7 -- as per Edouard's review

Tree-SHA512: e4c7725c277082fa354bb9397744dfa92e90c14e96b21cad31cb3e111424de15b9aeab1a4d775a59efcf43b385616852e64b1cd2d184f1ddef4be5348d380218
2024-01-15 23:37:54 +01:00
pythcoiner
ca583cd847 go directly to installer if datadir empty 2024-01-15 22:13:29 +01:00
Antoine Poinsot
c6b554da93
descriptors: unit test we do take into account derivation steps before wildcard and multipath 2024-01-15 18:57:39 +01:00
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
edouardparis
386b1c9ec5 Add coldcard device to supported hws 2024-01-09 15:49:21 +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