1353 Commits

Author SHA1 Message Date
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
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
edouardparis
1fa414be75 fix bitbox unsupported status when no wallet yet
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.
2023-12-14 14:00:41 +01:00
Antoine Poinsot
2b5fe01cf0
gui: make the trash button prettier
After feedback from Kevin.
2023-12-13 14:12:07 +01:00
Antoine Poinsot
b9cf62d71b
Merge #871: Prepare v4 release (GUI version)
dc300d3e66b8eba4eff2be9234a7bcb7b80f86ea gui: upgrade to latest Liana master (Antoine Poinsot)
56134b9f54a238a15428580e9ddb28122e23a4b1 gui: bump version to 4.0 (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  darosior:
    self-ACK dc300d3e66b8eba4eff2be9234a7bcb7b80f86ea

Tree-SHA512: 65ae761d69e88595929a8003205039422969e98d293b54e25f521b8b13e48b6433388317284d7d314e444588447b0075b18c80fed26c4670494cada17ca5442e
2023-12-12 18:35:14 +01:00
Antoine Poinsot
dc300d3e66
gui: upgrade to latest Liana master 2023-12-12 18:34:17 +01:00
Antoine Poinsot
56134b9f54
gui: bump version to 4.0 2023-12-12 18:33:50 +01:00
Antoine Poinsot
87d1c55d2e
Merge #870: Prepare v4 release
6625e67eed37ba385223dab6256478c312a190dc CHANGELOG: release notes for v4 (Antoine Poinsot)
35e50b4f383652b3cc7929a93e2dd5737fa74118 Bump lianad version to 4.0 (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  darosior:
    self-ACK 6625e67eed37ba385223dab6256478c312a190dc

Tree-SHA512: 2fd3492578ab1bd92c9249b1a4f5bb6134fac6b86febc1bffb33edc184bcbd30aad8554d5e3cb3bb5640ffe8b51c78d7839e1913c126edc5d6de0043c0d54a51
2023-12-12 18:32:52 +01:00
Antoine Poinsot
e79897892f
Merge #867: spend: a temporary partial fix for LowestFee
5f534eb988b903c28b8c2edb1db9a6389aadfdc0 spend: a temporary partial fix for `LowestFee` (jp1ac4)

Pull request description:

  This is a temporary partial fix for https://github.com/bitcoindevkit/coin-select/issues/6 that should be reverted once the upstream fix has been made.

  When calculating the score, the excess should be added to changeless solutions instead of those with change.

  Given a solution has been found, this fix adds or removes the excess to its incorrectly calculated score as required so that two changeless solutions can be differentiated if one has higher excess (and therefore pays a higher fee).

  Note that the `bound` function is also affected by this bug, which could mean some branches are not considered when running BnB, but at least this fix will mean the score for those solutions that are found is correct.

  The new functional test included here fails without this fix.

ACKs for top commit:
  darosior:
    ACK 5f534eb988b903c28b8c2edb1db9a6389aadfdc0

Tree-SHA512: f3a0e67434cad005389a938c0833394ff2c242d262f1ed1e6da9d1ce403af221bbce265a6fe67ad72f8fa8b461530faac1387c980f7f539cbb187603371c58d7
2023-12-12 18:32:04 +01:00
Antoine Poinsot
bf7f34feeb
Merge #869: gui: set max feerate in RBF modal
dfc4342d44cc2a3bcc080050fa636c5db78a2768 gui: set max feerate in RBF modal (jp1ac4)

Pull request description:

  This applies a similar change to feerate form validation as in #863 to ensure value is not too high.

  ![image](https://github.com/wizardsardine/liana/assets/121959000/caa31a99-8bc7-43bb-a2c2-a9d41d752f50)

ACKs for top commit:
  edouardparis:
    utACK dfc4342d44cc2a3bcc080050fa636c5db78a2768

Tree-SHA512: 7f1fa5eb71ea2c5bc6b2c28bd79ba39e3be4b39fcade89e1978441937cbb75a9de8c52ea397fc0c7ef9ef3858995bca69a077b9c3625bb027d39e3d57bf3fa7f
2023-12-12 16:04:08 +01:00
Antoine Poinsot
6625e67eed
CHANGELOG: release notes for v4 2023-12-12 15:42:15 +01:00
jp1ac4
5f534eb988
spend: a temporary partial fix for LowestFee
This is a temporary partial fix for
https://github.com/bitcoindevkit/coin-select/issues/6 that should be
reverted once the upstream fix has been made.

When calculating the score, the excess should be added to changeless solutions
instead of those with change.

Given a solution has been found, this fix adds or removes the excess to its
incorrectly calculated score as required so that two changeless solutions can
be differentiated if one has higher excess (and therefore pays a higher fee).

Note that the `bound` function is also affected by this bug, which could mean
some branches are not considered when running BnB, but at least this fix will
mean the score for those solutions that are found is correct.
2023-12-12 14:31:36 +00:00
Antoine Poinsot
35e50b4f38
Bump lianad version to 4.0 2023-12-12 15:10:50 +01:00
jp1ac4
dfc4342d44
gui: set max feerate in RBF modal 2023-12-12 13:51:36 +00:00
Antoine Poinsot
0346b7a11d
Merge #863: Use create_spend to calculate amount left to select and coin selection
a7324681e1072e4b53cd932cb49d462e9cc35956 spend: check max feerate (edouardparis)
4ccecd1cdfbd58bcbf86df82aa4c0bcc4fc0678e Use create_spend to calculate amount left to select (edouardparis)

Pull request description:

  Fixes #822. based on #865

ACKs for top commit:
  jp1ac4:
    ACK a7324681e1.

Tree-SHA512: aa2728218d9ccf7b6511f881d88b262522705b4162b5b4235560626ee8b5b8c6d57e743ebfaf85dc633d6e3d2380badfe354a6dc4d19b89d3f380c63e123704e
2023-12-12 14:20:55 +01:00
edouardparis
a7324681e1 spend: check max feerate 2023-12-12 10:07:43 +01:00
edouardparis
4ccecd1cdf Use create_spend to calculate amount left to select
close #822
2023-12-12 10:07:43 +01:00
Antoine Poinsot
3e0f82a71e
Merge #864: gui: add option to delete wallet
279c1c75a1dfe6617798b59cbe3932c803aeb90f gui: add option to delete wallet (jp1ac4)

Pull request description:

  This is to resolve #543.

  I've used a trash icon instead of a cross, but can change it to a cross if preferred.

ACKs for top commit:
  edouardparis:
    ACK 279c1c75a1dfe6617798b59cbe3932c803aeb90f

Tree-SHA512: d6bdbf7894726be5e1eb0b6d62d3689d1828222deba3ae84814396ae7e2b1aa144ff12908ecc1d8e1f26fc3cc29e0d137200d3039eeb870226feabb7a8aec428
2023-12-11 16:55:40 +01:00
jp1ac4
279c1c75a1
gui: add option to delete wallet 2023-12-11 14:57:21 +00:00
Antoine Poinsot
23e834a978
Merge #865: Expose spend module and coins fields
572567a7e4ceb838edcdf765af01b4aa69ac230d Expose ListCoinsEntry derivation_index and is_change (edouardparis)
3200c942fb048ea23f0bd663c53f756a646e848b lib: expose spend module (edouardparis)

Pull request description:

  In order to externally use create_spend, the spend module must be exposed and the listcoinsentry must include the derivation_index and is_change fields.

ACKs for top commit:
  darosior:
    utACK 572567a7e4ceb838edcdf765af01b4aa69ac230d

Tree-SHA512: 536a379974f58929f0036340e9f888614094e367cecaa474afa5f7f60ad1be73aac9bf8c7fbb1e7fc5947fc70dc44667462655147b287a10210f99d75061419b
2023-12-11 15:23:35 +01:00
edouardparis
572567a7e4 Expose ListCoinsEntry derivation_index and is_change 2023-12-11 13:35:30 +01:00
edouardparis
3200c942fb lib: expose spend module 2023-12-11 11:52:00 +01:00
Antoine Poinsot
fe14cbec58
Merge #856: spend: Scale down the number of BnB rounds in debug mode and with a high number of candidates
c002ab95799750c1957d9172d9e255a2f3511fe4 spend: scale down the number of BnB when not compiling with optimizations (Antoine Poinsot)
f18086c152ffa033def8cbed52895fd1d99ffc6d spend: scale down the number of BnB rounds as number of candidates increases (Antoine Poinsot)

Pull request description:

  Based on #842.

  Performing BnB with a large number of candidates can be computation expensive. Especially in debug mode. It can make the software lag in situations where it's called repeatedly.
  Reasonably scale down the number of rounds performed depending on the number of candidates and whether optimizations are enabled.

  Fixes #846

ACKs for top commit:
  jp1ac4:
    ACK c002ab9579.

Tree-SHA512: 83de99d54c427de86dad779549280b3316b0e72a9e3a5cb4af22d44eefa9832408b974f2a2aca0847b13ad5899e324ad43f32e99eb4efb69716c827f3ab47aaf
2023-12-08 17:09:06 +01:00
Antoine Poinsot
c002ab9579
spend: scale down the number of BnB when not compiling with optimizations 2023-12-08 15:10:44 +01:00
Antoine Poinsot
f18086c152
spend: scale down the number of BnB rounds as number of candidates increases 2023-12-08 15:10:43 +01:00
Antoine Poinsot
b5a3e78b38
Merge #842: Standalone module for creating a spend transaction
0f6941150cdf98da92c40f85526735ec10e9daf1 spend: a nicer interface for providing fee informations (Antoine Poinsot)
990b153107dfae779b054d7ae52bcad574982f5f commands: don't query unconfirmed coins when creating recovery tx (Antoine Poinsot)
c63a120794af593704cede911f666467d3ce4c1e spend: don't use database's Coin type (Antoine Poinsot)
08ce0ad1d7ac7b4d519ca98a44ecaeb45c7d063c spend: update comment about create_spend behaviour (Antoine Poinsot)
0c395bb63c5e7c7f4ad53ae25743efa0f6afb4c7 spend: document the create_spend function (Antoine Poinsot)
f3113ba0d20ebed69a21ea50ed3adfe7f7c82a7d commands: remove redundant output value check (Antoine Poinsot)
5894e788b87f7335fb7715036e55add4202a83a8 spend: move tx size calc helper back to command module (Antoine Poinsot)
6ddda6137cd1a19e446a9a81623290de8ff0d5b8 spend: make coin selection helpers private (Antoine Poinsot)
33be1ff18bf3eeda772efaf29439340b30b5c5e9 commands: make create_recovery use the create_spend helper (Antoine Poinsot)
0523f0047fd463945cdb2147c2dc13c8538bb0d3 commands: update next deriv index for any spend output address (Antoine Poinsot)
5d5015553239fb19de0890a6956c8e22ebfec0f4 spend: avoid direct access to our Bitcoin backend (Antoine Poinsot)
7c238124bebf38fc93994b183de90c2baf0cb0c3 spend: don't access the database in the PSBT creation function (Antoine Poinsot)
22f97e11b7ab772d30ca9ccd992c9092559ab493 spend: let caller update next derivation index (Antoine Poinsot)
9fdb75cf883c53af97fbbe40a4d7f727611aebac commands: split up spend transaction creation into its own module (Antoine Poinsot)

Pull request description:

  Based on top of #816, this introduces a new `spend` module with a helper to create a transaction spending coins from the wallet. It can be leveraged to create regular or recovery transactions, and also replacement for them. All the data structures used by the exposed spend creation function are contained with this module, in order to make it usable without a `lianad`-specific database and Bitcoin interface.

  This PR is structured in an incremental fashion. First we pull out the `create_spend_internal` method introduced in #816 into a standalone `spend` module, then we incrementally remove the cruft and the ties from the spend module to the other components.

ACKs for top commit:
  darosior:
    self-ACK 0f6941150cdf98da92c40f85526735ec10e9daf1

Tree-SHA512: a75afeb2c1f58e685c6b6e0d88c53e158ad850266261ef93b20065f6b02ad9e817cefcef4a89dc038e4db81549efc6d5393e4c59b4f7d86b69dc2168b9d818d3
2023-12-08 15:10:14 +01:00
Antoine Poinsot
0f6941150c
spend: a nicer interface for providing fee informations
Allows for a clearer interface: you explicitly set whether you are
creating a replacement, and you don't have dangling 0s when you don't
which necessitate a comment to explain what they correspond to.
2023-12-08 15:08:22 +01:00
Antoine Poinsot
990b153107
commands: don't query unconfirmed coins when creating recovery tx
They would be discarded immediately in the filter below.
2023-12-08 15:07:33 +01:00
Antoine Poinsot
c63a120794
spend: don't use database's Coin type
We could use a trait but instead there is just a couple fields we need so simply copy them over.
2023-12-08 15:07:33 +01:00
Antoine Poinsot
08ce0ad1d7
spend: update comment about create_spend behaviour 2023-12-08 15:07:32 +01:00
Antoine Poinsot
0c395bb63c
spend: document the create_spend function 2023-12-08 15:07:29 +01:00