681 Commits

Author SHA1 Message Date
Antoine Poinsot
0824fcfefc
guix: use the minimal version of coreutils
Fixes #360.
2023-03-31 12:13:29 +02:00
Antoine Poinsot
dea6283dd3
Merge #395: fix installer: wrong detection of hot signer usage.
2cbdf5bb32b711ea6057141c553b74ec810d9f0d fix installer: wrong detection of hot signer usage. (edouard)

Pull request description:

  We did not check that the keys in the primary path were using the hot signer. In the case of a hot signing key only used for the primary path,
  the hot signer was not advertised to the context
  passing to each installer step and was not stored after install.

ACKs for top commit:
  darosior:
    ACK 2cbdf5bb32b711ea6057141c553b74ec810d9f0d

Tree-SHA512: b7d79b798be1ff0e17609b3ada3bb2374ff56be9bfc023cabc0156f63131e90cf89e646cf391399c8b687740f32a6dd6b0b004dd74120cb4dad9dd9560da55da
2023-03-31 11:18:12 +02:00
edouard
2cbdf5bb32 fix installer: wrong detection of hot signer usage.
We did not check that the keys in the primary path
were using the hot signer. In the case of a hot signing
key only used for the primary path,
the hot signer was not advertised to the context
passing to each installer step and was not stored after
install.
2023-03-30 16:25:11 +02:00
Antoine Poinsot
47e649a69f
Merge #376: Update our dependencies
a7aa4adef008bb63000e085348d67d4498fb51f2 Cargo: bump dirs and bip39 dependencies major versions. (Antoine Poinsot)
510f964e0c8dcdb9d3274dd5526a3b7f96d79c01 Cargo.lock: minor version dependencies updates (Antoine Poinsot)

Pull request description:

  Mostly minor versions as most of the others have broken their MSRV.

ACKs for top commit:
  darosior:
    ACK a7aa4adef008bb63000e085348d67d4498fb51f2 -- i've reviewed upstreams.

Tree-SHA512: 04c701c05984c0b02c9042ec18533133b5e005bbee09b6462810132387e3978caafbe1e5753a42b7346c616769f00d8f0cc2aaceea5e88d9c0deb3d5de852416
2023-03-29 16:40:34 +02:00
edouard
327ffcb696
Merge #385: gui: update liana dep with the descriptors cleanup
f049c2f16e8dd00c4cfcdd74e08b883cd7169356 gui: update lib liana with descriptors module cleanup (edouard)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK f049c2f16e8dd00c4cfcdd74e08b883cd7169356

Tree-SHA512: da4fe931196be8344ed2fd315f9aea5131ed599ef6fbeb7594ae3f0eb4e82eb67f7d3293c4a46e04dc4f780a554033d992d9f00012b03510b28e16d207ca05db
2023-03-29 09:30:59 +02:00
edouard
f049c2f16e gui: update lib liana with descriptors module cleanup 2023-03-29 09:08:47 +02:00
Antoine Poinsot
9c6059c996
Merge #387: tests: update pytest to work with Python >= 3.10
48deb3b7f079339594c936e4b81188e5d40be61b tests: update pytest to work with Python >= 3.10 (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  darosior:
    ACK 48deb3b

Tree-SHA512: 278bfb0ef36974c58658ba670c2921a6b6761738eed81de21f5e7b7c8410ffd31019968cd37c325de0960d38a3477699934a156b78a91a1594d79a8bd917735b
2023-03-28 15:11:28 +02:00
edouard
292b94f72c
Merge #389: fix installer pick_list warning
d108a0f48d5efab21af698aead8fe07788985c36 fix installer pick_list warning (edouard)

Pull request description:

  ![2023-03-28T14:10:07,557792143+02:00](https://user-images.githubusercontent.com/6933020/228231883-2da81e02-edb5-4271-9cd4-fc4b81ed5097.png)

ACKs for top commit:
  edouardparis:
    Self-ACK d108a0f48d5efab21af698aead8fe07788985c36

Tree-SHA512: 69e5d60aeb433e10b30073be8342cc438dd454ce782e07b0d3b722e4730fb678b56b6109f9ecd29f8c01e0e7b3be97b306b6090bb9cf3576ba538454aaa7d9a2
2023-03-28 14:27:13 +02:00
edouard
d108a0f48d fix installer pick_list warning 2023-03-28 14:10:31 +02:00
Antoine Poinsot
48deb3b7f0
tests: update pytest to work with Python >= 3.10 2023-03-28 13:07:24 +02:00
Antoine Poinsot
2b76180cdf
Merge #374: Cleanup the descriptors module
9394be645c698591da9c477dd77363010cb3298e [bugfix] descriptors: fix parsing of descriptor with 1-of-N multisig (Antoine Poinsot)
1a13b7a6f820e92ff436198bffc78b8ad785a758 descriptors: rename InheritanceDescriptor into SinglePathLianaDesc (Antoine Poinsot)
8d1c6de5dde85583a6fb3a03458774d113ccb7b9 descriptors: rename MultipathDescriptor into LianaDescriptor (Antoine Poinsot)
f6885e358bfe78a790226e6246dad4922cf82d02 descriptors: cleanup error types (Antoine Poinsot)
647d65fe045a71158041cfb4bf5b98e5200db2e8 descriptors: create Liana descriptors through the policy (Antoine Poinsot)
9b866300be53be8a4e49e7913be25ff8887eac63 descriptors: merge the semantic analysis in one place (Antoine Poinsot)
cd566b91af07a53f9651c034ef4da95a8a033c56 descriptors: rename LianaDescInfo into LianaPolicy (Antoine Poinsot)
757009536b489b333ddb6a2d6bf237196e930e4e descriptors: make sure there is at least one timelocked path when parsing (Antoine Poinsot)
eebfa4755944f14aaa23f8b1a293a1b6a0f0f30f descriptors: move descriptor policy analysis into its own submodule (Antoine Poinsot)
c0dd63dfb2b6831666fb260581dce36e6f7601fa descriptors: move the LianaDescKey to the keys submodules (Antoine Poinsot)
7772ae8d8a74dc0f52be0381a77e68e4d2e8478f descriptors: move derived keys into their own submodule (Antoine Poinsot)
9e78ac7e8dd8bfb7170f64aa314aea30921aca4b descriptors: make the module a folder. (Antoine Poinsot)

Pull request description:

  We've been piling a bunch of new features since this module was first architectured, and it has become messy. This led to duplicate code, a confusing interface (`InheritanceDescriptor`, `LianaDescInfo`, ..) and more importantly bugs.

  This is a complete re-organization of the module in view of introducing multi-paths descriptors soon. This PR contains two bugfixes but aside from that it should not change (correct) behaviour. It does however completely break the interface.

  The new interface makes a lot more sense:
  - A `LianaPolicy` representing a Liana spending policy, from which you can get the parameters for the various spending path, and you can create from those parameters.
  - A `LianaDescriptor` which can be created from a `LianaPolicy`, and from which you can infer a `LianaPolicy` to retrieve the parameters of each spending path.

  This bijection (although it will soon become a surjection as we'll introduce the Miniscript policy compiler to create a `LianaDescriptor` from a `LianaPolicy`) makes the life of a client of the API easier, but it also harmonizes the code: we've centralized the Miniscript Semantic Policy checks of a descriptor in a single place to make sure that we can parse only what, and all, descriptors we can create.

ACKs for top commit:
  edouardparis:
    ACK 9394be645c698591da9c477dd77363010cb3298e

Tree-SHA512: 784eee825644db43417ec040f85b9e20ab72bcc545eed68a2b9b5a5945f86bea6e2d7b091e438b7ba8d4e0a6963459f2b29af59995a407a3c509b5be0fd06e9b
2023-03-28 12:21:50 +02:00
edouard
30054d2755
Merge #372: gui: design system example
d4d5a66aa1f7323398267ee80bbf98bec2284698 gui: transitioning to ui crate (edouard)
8d337eb7e183b44f967a1e7f19c23141ffef6237 ui: add support for legacy (edouard)
f3bf6fa589ed23ded4633de1ea9d80d9ab04e8f4 gui: design system example (edouard)

Pull request description:

  This PR reorganizes the ui module in its own crate and makes usage of the iced theming feature.
  The new theme that is introduced help to keep track of the colors and appearance of each widget, it is a crucial part for the next-coming design system and it is a `iced` good practice that since Iced 0.7 we must take care.
  This PR also put the basics for a little wasm app example that will help us to share and review new components design.

ACKs for top commit:
  edouardparis:
    Self-ACK d4d5a66aa1f7323398267ee80bbf98bec2284698

Tree-SHA512: 9d01a2c734c1880da5115aeec5632b649f9b81bb963ab72f0772ee06705805e4df3ab294dff577765bf76b420017faf51d3a5b67e0e1dffadcd8c7d193593241
2023-03-28 10:26:05 +02:00
edouard
d4d5a66aa1 gui: transitioning to ui crate 2023-03-27 19:53:49 +02:00
edouard
8d337eb7e1 ui: add support for legacy 2023-03-27 19:01:30 +02:00
edouard
f3bf6fa589 gui: design system example 2023-03-27 19:01:30 +02:00
edouard
e1926c40a4
Merge #386: gui: filter unused events
75c4109373fecf527b0d93daa1b8df6f4250f068 gui: filter unused events (edouard)

Pull request description:

  It may removes the annoying logs that occurs after a while.
  ```
  [1669885771][iced_futures::subscription::tracker][WARN] Error sending event to subscription: TrySendError { kind: Full }
  [1669885771][iced_futures::subscription::tracker][WARN] Error sending event to subscription: TrySendError { kind: Full }
  [1669885771][iced_futures::subscription::tracker][WARN] Error sending event to subscription: TrySendError { kind: Full }
  ```
  By filtering the events to use only the events listened by the application, we may not reach some buffer size limit

ACKs for top commit:
  edouardparis:
    Self-ACK 75c4109373fecf527b0d93daa1b8df6f4250f068

Tree-SHA512: d4d699675bea624e6fb4d671dba9a6862d42b7462fa6c9988c635ea29fa8b22ea038a1f76e5aca9c4702fe9f689d1c9824fe1ffafdf0f0e75910ea236025f3b6
2023-03-27 18:55:16 +02:00
Antoine Poinsot
9394be645c
[bugfix] descriptors: fix parsing of descriptor with 1-of-N multisig 2023-03-27 16:56:12 +02:00
edouard
75c4109373 gui: filter unused events 2023-03-27 16:04:08 +02:00
edouard
267ebc4c7c
Merge #384: gui settings: truncate file
76f3c1a876c99014bee0d4483d01ceda755df7da gui settings: filter empty aliases in map (edouard)
915bb18caaa5be77932567ea187ea87900ab5865 gui settings: truncate file (edouard)

Pull request description:

  We want to override preexisting settings file.

  fixes #383

ACKs for top commit:
  darosior:
    ACK 76f3c1a876c99014bee0d4483d01ceda755df7da

Tree-SHA512: 8124cd5c5558e9fe6513742a9f82b8d4c460dba94a8f079385fd4f6b4cfac8e52021a51bbf4803054f2dbe15f672cf0948f4f28aad62ba5048f65eb6668791f2
2023-03-27 13:37:59 +02:00
edouard
76f3c1a876 gui settings: filter empty aliases in map 2023-03-27 13:18:10 +02:00
edouard
915bb18caa gui settings: truncate file 2023-03-27 13:08:43 +02:00
Antoine Poinsot
a7aa4adef0
Cargo: bump dirs and bip39 dependencies major versions. 2023-03-24 18:14:12 +01:00
Antoine Poinsot
510f964e0c
Cargo.lock: minor version dependencies updates 2023-03-24 18:10:50 +01:00
Antoine Poinsot
7279a3205e
Merge #166: deps: make libc optional
4bf5234ce97fa725c076be628c12b7289466c1f1 Cargo.lock: update libc (Antoine Poinsot)
6ea9ba5c1c661eb26edd17212dd34459a006a981 Cargo: get rid of the jsonrpc_server feature. (Antoine Poinsot)
cc8844671773e2fbfe0c17fdf504ff2bed769413 deps: make libc optional (edouard)

Pull request description:

ACKs for top commit:
  darosior:
    ACK 4bf5234ce97fa725c076be628c12b7289466c1f1

Tree-SHA512: 0d754d8201c74b88edc5bf1166bd8ff33a25fd4490e58d3a6f23bbf3a7970881706181228e17683cd7030d7ae94ebbcff0bbcfaa42a96fdc684fbbaca58a1d58
2023-03-24 17:59:33 +01:00
Antoine Poinsot
4bf5234ce9
Cargo.lock: update libc 2023-03-24 17:48:32 +01:00
Antoine Poinsot
6ea9ba5c1c
Cargo: get rid of the jsonrpc_server feature.
It implies daemon. (Also, it needed libc.)
2023-03-24 17:46:37 +01:00
Antoine Poinsot
1a13b7a6f8
descriptors: rename InheritanceDescriptor into SinglePathLianaDesc
It was named at a time where there was an over emphasis on inheritance
as a Liana usecase. In addition, "SinglePath" reflects better it is only
one part of the main, multipath, Liana descriptor.
2023-03-23 19:15:54 +01:00
Antoine Poinsot
8d1c6de5dd
descriptors: rename MultipathDescriptor into LianaDescriptor 2023-03-23 19:15:53 +01:00
Antoine Poinsot
f6885e358b
descriptors: cleanup error types
This removes circular dependencies and apply the appropriate variants to
the appropriate enums.
2023-03-23 19:15:52 +01:00
Antoine Poinsot
647d65fe04
descriptors: create Liana descriptors through the policy
This makes it possible for a LianaPolicy to be created from a user
configuration. This in turn centralizes the descriptor creation inside
it as well and make `MultipathDescriptor` take a `LianaPolicy` directly.

This is useful to centralize all the Miniscript and Miniscript policy
handling under in a single place as we'll soon be managing much more
complex policies (and make use of the Minsicript policy compiler).

Unfortunately this is an invasive API change. But at least the API now
makes a lot more sense: you can create a spending policy from a
configuration and create a descriptor from it. And vice-versa you can
infer a spending policy from a descriptor and inspect the configuration
from it.
2023-03-23 19:15:52 +01:00
Antoine Poinsot
9b866300be
descriptors: merge the semantic analysis in one place
This merges the Miniscript policy semantic analysis we perform both when
parsing a descriptor and when gathering information about a Liana
descriptor in one, right, place: the analysis submodule.
2023-03-23 19:15:51 +01:00
edouard
a151fe3703
Merge #366: gui: separate settings panels
17815864cb11b961e1f0be460a0d9233a5fe975a gui settings: rename bitcoind for core (edouard)
f5394bf8894e30194942bf9de8d458e7ffd783af wallet settings: edit fingerprint aliases (edouard)
ae8df0dd4ca8e521207edc08bd630661b559cd66 gui: separate settings panels, add wallet settings (edouard)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK 17815864cb11b961e1f0be460a0d9233a5fe975a

Tree-SHA512: 43d63bcc3137735afea4a3baf04fd572adc45add98335b5c90071f89bdc82e65b1ccc595b28436a68d896b7f5ad836c81ede1c756303fad3ecac0966e964ffab
2023-03-23 17:51:18 +01:00
Antoine Poinsot
cd566b91af
descriptors: rename LianaDescInfo into LianaPolicy
What this really represents is a spending policy. We'll extend it to be
able to infer it from a descriptor and to create a descriptor from it.
2023-03-23 16:25:01 +01:00
Antoine Poinsot
757009536b
descriptors: make sure there is at least one timelocked path when parsing 2023-03-23 16:10:21 +01:00
Antoine Poinsot
eebfa47559
descriptors: move descriptor policy analysis into its own submodule 2023-03-23 16:09:55 +01:00
Antoine Poinsot
c0dd63dfb2
descriptors: move the LianaDescKey to the keys submodules 2023-03-23 14:43:18 +01:00
Antoine Poinsot
7772ae8d8a
descriptors: move derived keys into their own submodule 2023-03-23 14:37:43 +01:00
Antoine Poinsot
9e78ac7e8d
descriptors: make the module a folder. 2023-03-23 14:25:13 +01:00
Antoine Poinsot
1493d24cd5
Merge #373: bitcoin: remove a confusing TODO
eebd0619812f5d70acab53bfb30e12094225a0b7 bitcoin: remove a confusing TODO (Antoine Poinsot)

Pull request description:

  We don't assume that and in fact now use multiple descriptors

ACKs for top commit:
  darosior:
    self-ACK eebd0619812f5d70acab53bfb30e12094225a0b7 -- only removing a comment

Tree-SHA512: 995ab3671dd580d700663630b2a01d186df3c1cd84038873df5c6ee0232a0a943e3fae9873798e5fadb219a3146a2b7d335bd50296c90bc815c2b69bbba976f7
2023-03-22 16:57:18 +01:00
Antoine Poinsot
eebd061981
bitcoin: remove a confusing TODO
We don't assume that and in fact now use multiple descriptors
2023-03-22 14:58:30 +01:00
Antoine Poinsot
2dea4b1a6c
Merge #355: Clippification: a little bit of housekeeping
ebf5a294ad5eeb9359625e941013809f5544672b gui: fix some clippy warning (Antoine Poinsot)
cf3e9cafe05d703637e09220351113d7be4458e4 ci: run clippy using Rust 1.67.1 (Antoine Poinsot)
896575842119a5e2779309edea4f9b4141126825 bitcoind: fix a clippy warning about lifetime ellision (Antoine Poinsot)

Pull request description:

  FIx clippy lints and bump the clippy version for the daemon. Also fix some lints for the GUI (there are some false positives that couldn't be fixed though).

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

Tree-SHA512: 3fccbce67637d417da1758584f1d4f027e1536054b21c7abafc2e6b70e65901abb373a1ffc7fc7efbbbdf5c504ccde9df75e477d72ecd46a8b7798ce7985f64d
2023-03-21 18:51:02 +01:00
edouard
17815864cb gui settings: rename bitcoind for core 2023-03-21 15:20:04 +01:00
edouard
f5394bf889 wallet settings: edit fingerprint aliases 2023-03-21 15:20:04 +01:00
edouard
ae8df0dd4c gui: separate settings panels, add wallet settings 2023-03-21 15:20:04 +01:00
edouard
2c7cd2b0ca
Merge #365: gui: make daemon config optional
9577e6a227a85aa3a2f337a52b0f2904ed836bdf gui: make daemon config optional (edouard)

Pull request description:

  If no daemon config path is present in the
  gui configuration file, gui will try first to connect
  to the socket path, either `daemon_rpc_path`
  if present in configuration file or default
  path.

  close #147

ACKs for top commit:
  edouardparis:
    Self-ACK 9577e6a227a85aa3a2f337a52b0f2904ed836bdf

Tree-SHA512: 85e95dc3e4d5c0e4642cd75387fffd17ddd23e14459644238fed82cb8477bee27ae4e1f603d3dd2a7615ec8e397d9f50e2239a9c1ced49892cb02bd8cc5f748b
2023-03-14 16:19:18 +01:00
edouard
9577e6a227 gui: make daemon config optional
If no daemon config path is present in the
gui config, gui will try first to connect
to the socket pat, either `daemon_rpc_path`
if present in configuration file or default
path.

close #147
2023-03-14 13:32:39 +01:00
edouard
cc88446717 deps: make libc optional
libc dependency is only use by the lianad
binary it is not needed for liana-gui.
This commit makes the dependency optional
by introducing a new default feature named
daemon.

liana/src/daemonize.rs is still compiling
because the feature daemon is marked as required
for the lianad binary.
2023-03-14 09:39:36 +01:00
edouard
1d6a34e910
Merge #345: Add panic_hook to gui
bda82fe83db29da31f78d61eaa006b40b824fe5e gui: ignore hw apdu exchanges in log (edouard)
a13bb0272b62a989ea079f498cfa1c9925d8b63b gui: add logger module and handle log file destinations (edouard)
9ccb22b2ac943f500ae1940f0279525e0e277637 Add panic_hook to gui (edouard)

Pull request description:

  close https://github.com/wizardsardine/liana/issues/338

ACKs for top commit:
  edouardparis:
    Self-ACK bda82fe83db29da31f78d61eaa006b40b824fe5e

Tree-SHA512: b5c87d9c27113c184101dcfb11cdf799e78eda48acf2dce24f9a432f0e9c8ec1b513e2a0e103b7a9c860d8ff5ce4e7d9ee1b528ad8c90433ffbfc101fa008e5f
2023-03-10 11:58:25 +01:00
edouard
bda82fe83d gui: ignore hw apdu exchanges in log
A solution to keep it only for debug was
not found for now with tracing, but it could
be easily fixed if ledger_transport_hid use
debug instead of info as log level.
2023-03-08 18:22:37 +01:00
edouard
a13bb0272b gui: add logger module and handle log file destinations
Installer has its own log file installer.log that is removed
after successful install.
When changing network, the destination log file change
to <datadir>/<network>/liana-gui.log
2023-03-08 16:12:19 +01:00