702 Commits

Author SHA1 Message Date
Antoine Poinsot
3aa9980635
tests: simplify the MultiSigner 2023-04-04 11:53:23 +02:00
Antoine Poinsot
75ea367235
tests: make most of the body of the multisig test a general helper
We'll exercise the same commands for the multipath test, except for the
recovery. DRY.
2023-04-04 11:53:22 +02:00
Antoine Poinsot
d68d0e1134
commands: adapt 'createrecovery' to multiple recovery paths 2023-04-04 11:53:22 +02:00
Antoine Poinsot
cfbb02c7c8
descriptors: multi-recovery-path Liana descriptor
This makes it possible to have more than one recovery path in a Liana
descriptor. The descriptor and partial spend analysis are adapted to
report information about all recovery paths.
2023-04-04 11:53:21 +02:00
Antoine Poinsot
ec0009113a
descriptors: lift the bounds to create a Liana policy
Since we now use the Miniscript compiler, there is no reason not to
allow more than 20 keys.
2023-04-04 11:50:27 +02:00
Antoine Poinsot
55d86c62a5
descriptors: use the Miniscript compiler to create a descriptor 2023-04-04 11:50:26 +02:00
Antoine Poinsot
a0aa30470c
Merge #401: lib: couple block height and time
89eb1572e955548886bf0c00c5e64b69f9f8cb32 lib: reorder struct fields for consistency (jp1ac4)
b519c8d185a328cff5c81c032d4fad6746704760 lib: rename and use existing structs `(Db)SpendBlock` (jp1ac4)
4cb6d2dc690d243616b32535774a0f959ff99bc2 lib: couple block height and time (jp1ac4)

Pull request description:

  This PR aims to resolve #35.

  I hope I'm on the right path here. Please let me know in case I need to make further changes.

  Thanks.

ACKs for top commit:
  darosior:
    utACK 89eb1572e955548886bf0c00c5e64b69f9f8cb32

Tree-SHA512: ceb7b378e66ed08830872cc438bc83273d69e2530abc1bff9e40522d42d8fcc719ef01dcf76a961387235a3da095b78f05461d94013a575d7c32210d65dd8895
2023-04-04 11:48:20 +02:00
jp1ac4
89eb1572e9
lib: reorder struct fields for consistency 2023-04-04 09:38:58 +01:00
jp1ac4
b519c8d185
lib: rename and use existing structs (Db)SpendBlock 2023-04-04 09:27:03 +01:00
edouard
3b321cd9c8
Merge #402: gui: do not check empty addresses for duplicates
f508d4a1ce9739af92b99be479dcfeeda2d263d9 gui: do not check empty addresses for duplicates (jp1ac4)

Pull request description:

  This is to resolve #190.

  The check for a duplicate is skipped if the recipient address is an empty string.

  I was able to run the GUI locally and it seemed to work as required.

ACKs for top commit:
  edouardparis:
    ACK f508d4a1ce9739af92b99be479dcfeeda2d263d9

Tree-SHA512: 32a1fc89eba7fd0f8bb39d19ec76957228e0a4240d0d784c35890ecea8e0f8540c529001cda3d81380b9fa24547325fb1ea2b0d7db82e0facf9fc8e10d7ed775
2023-04-04 09:02:16 +02:00
Antoine Poinsot
64ab6eba79
Merge #399: doc: clearer build documentation
3ed255f1174329b71b3f4b711f1db8f99fd81cad doc: clearer build documentation (Antoine Poinsot)

Pull request description:

  They weren't the clearest. Someone was confused they couldn't build the GUI with an old `cargo`. Make it clearer.

ACKs for top commit:
  darosior:
    self-ACK 3ed255f1174329b71b3f4b711f1db8f99fd81cad -- trivial documentation

Tree-SHA512: 22285c75c2df8d389005519f57691182cfd979bac707f036933a3ddd96a8cbef8bcbd841dcb2d3630809054265698ae5474525a51f14b1c45f9a3255c286524c
2023-04-03 18:14:46 +02:00
jp1ac4
f508d4a1ce
gui: do not check empty addresses for duplicates 2023-04-03 17:13:24 +01:00
Antoine Poinsot
3ed255f117
doc: clearer build documentation 2023-04-03 18:13:18 +02:00
jp1ac4
4cb6d2dc69
lib: couple block height and time 2023-04-03 10:47:04 +01:00
Antoine Poinsot
943cc16e77
Merge #398: bitcoind: do not error if watchonly wallet is loading on bitcoind
f0beef5f6095bdff399aa10e72ee01a6a678707f bitcoind: do not error if watchonly wallet is loading on bitcoind (Antoine Poinsot)

Pull request description:

  Fixes #380

ACKs for top commit:
  darosior:
    ACK f0beef5f6095bdff399aa10e72ee01a6a678707f -- tested manually.

Tree-SHA512: 6c22243623f3300379e90849e3d0ba0860da2cf23d38664465e0e844f0b04ca35af30082e1012d82f8e7454dbaf7a5a883067ca4ad3b1409624679a8e8370ad0
2023-03-31 14:51:03 +02:00
Antoine Poinsot
f0beef5f60
bitcoind: do not error if watchonly wallet is loading on bitcoind 2023-03-31 14:00:05 +02:00
Antoine Poinsot
c9753e9153
Merge #396: Reproducible builds updates for 0.4
a7678091673015a7f8c193451b5e591930a27ba1 docker: use 'apt satisfy' to avoid being too strict with package pinning (Antoine Poinsot)
1454bd86d5e8cf9c2ed935be1b7889132fff851b docker: adapt the reproducible builds to the new gui folder structure (Antoine Poinsot)
2596e03a9f877372145e464a5eef49b443b758ab guix: use rust 1.65 to build the GUI (Antoine Poinsot)
b295637101c92f1d19053ce5aa25cf01f8b35d7a guix: always expose the "ui" GUI folder (Antoine Poinsot)
0824fcfefcbd2788425cf6d6dd2b480e07834f99 guix: use the minimal version of coreutils (Antoine Poinsot)

Pull request description:

  This updates the reproducible builds with the new structure of the GUI project, updates `rustc` for building the GUI in GUIX to 1.65 to drop the last patch that was required, and update the dependencies versions in the Dockerfiles.

ACKs for top commit:
  darosior:
    ACK a7678091673015a7f8c193451b5e591930a27ba1

Tree-SHA512: c672bcca2e7558830dae04bbb7bc8f156481e942c8f75a24033b2d6d2a50ed3d39edffd37d6b485b0dada1c020fd4766eed7712384414c0fec34a22273086157
2023-03-31 12:30:58 +02:00
Antoine Poinsot
a767809167
docker: use 'apt satisfy' to avoid being too strict with package pinning 2023-03-31 12:13:31 +02:00
Antoine Poinsot
1454bd86d5
docker: adapt the reproducible builds to the new gui folder structure
For simplicity get rid of the vendoring within the image itself. We can
always reintroduce it later should we need it.
2023-03-31 12:13:31 +02:00
Antoine Poinsot
2596e03a9f
guix: use rust 1.65 to build the GUI
This allows to get rid of the last patch that was necessary to build the
GUI! 🎉
2023-03-31 12:13:30 +02:00
Antoine Poinsot
b295637101
guix: always expose the "ui" GUI folder
The GUI introduced a new workplace member, that is necessary to build
it. Thankfully it doesn't appear to need be vendoring, however it needs
to be mounted in the virtual environment.
2023-03-31 12:13:30 +02:00
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