1720 Commits

Author SHA1 Message Date
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
Antoine Poinsot
8551424d15
Merge #363: ci: cleanup the GUI dependencies.
87f54e147983ed3e0ef88b32895f7f9637495312 doc: cleanup GUI dependencies instructions (Antoine Poinsot)
a36e16e00d31741946aa6fb7a4f8110089baa48b ci: cleanup the GUI dependencies. (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  darosior:
    self-ACK 87f54e147983ed3e0ef88b32895f7f9637495312 -- only doc

Tree-SHA512: be2def2a45cc617b5dcc8d5cf734b12f2ceaeacb3fcb8cd48a6aa548b35a5590f44818ebd81ca42cd6722522d0bb6f10d9598ca0726b1580881901c87f323074
2023-03-07 14:20:25 +01:00
Antoine Poinsot
87f54e1479
doc: cleanup GUI dependencies instructions 2023-03-07 14:19:18 +01:00
Antoine Poinsot
a36e16e00d
ci: cleanup the GUI dependencies. 2023-03-07 14:17:50 +01:00
edouard
9ccb22b2ac Add panic_hook to gui 2023-03-07 14:17:44 +01:00
Antoine Poinsot
1d989301f0
Merge #361: Add dependencies for ubuntu
12050a3cc58cfeceab10b0a2689ff8a504a7f144 add link to TRY.md for dependencies (cc1)

Pull request description:

  I got few errors while building liana-gui with Ubuntu Mate 22.10, then try on a  fresh install with ubuntu 22.04 server (minimal install):

  ```
   running: "cmake" "/home/pythcoiner/.cargo/registry/src/github.com-1ecc6299db9ec823/freetype-sys-0.13.1/freetype2" "-DWITH_BZip2=OFF" "-DWITH_HarfBuzz=OFF" "-DWITH_PNG=OFF" "-DWITH_ZLIB=OFF" "-DCMAKE_INSTALL_PREFIX=/home/pythcoiner/liana/gui/target/release/build/freetype-sys-952a2cbdb10ff868/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"

    --- stderr
    thread 'main' panicked at '
    failed to execute command: No such file or directory (os error 2)
    is `cmake` not installed?

    build script failed, must exit now', /home/pythcoiner/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.49/src/lib.rs:1104:5
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  warning: build failed, waiting for other jobs to finish...
  ```

  fixed by

  ```
  sudo apt install cmake.
  ```

  then:

  ```
  --- stderr
    CMake Deprecation Warning at CMakeLists.txt:78 (cmake_minimum_required):
      Compatibility with CMake < 2.8.12 will be removed from a future version of
      CMake.

      Update the VERSION argument <min> value or use a ...<max> suffix to tell
      CMake that the project does not need compatibility with older versions.

    CMake Error at CMakeLists.txt:119 (project):
      The CMAKE_CXX_COMPILER:

        c++

      is not a full path and was not found in the PATH.

      Tell CMake where to find the compiler by setting either the environment
      variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
      to the compiler, or to the compiler name if it is in the PATH.

    thread 'main' panicked at '
    command did not execute successfully, got: exit status: 1

    build script failed, must exit now', /home/pythcoiner/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.49/src/lib.rs:1104:5
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  warning: build failed, waiting for other jobs to finish...
  ```

  fix by:

  ```
  sudo apt install build-essential
  ```

  then:

  ```
  --- stderr
    thread 'main' panicked at 'Could not run `"pkg-config" "--libs" "--cflags" "fontconfig" "fontconfig >= 2.11.1"`
    The pkg-config command could not be found.

    Most likely, you need to install a pkg-config package for your OS.
    Try `apt install pkg-config`, or `yum install pkg-config`,
    or `pkg install pkg-config` depending on your distribution.

    If you've already installed it, ensure the pkg-config command is one of the
    directories in the PATH environment variable.

    If you did not expect this build to link to a pre-installed system library,
    then check documentation of the servo-fontconfig-sys crate for an option to
    build the library from source, or disable features or dependencies
    that require pkg-config.', /home/pythcoiner/.cargo/registry/src/github.com-1ecc6299db9ec823/servo-fontconfig-sys-5.1.0/build.rs:34:17
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  warning: build failed, waiting for other jobs to finish...
  ```

  fix by:

  ```
  sudo apt install libfontconfig1-dev

  ```

  then:

  ```
  --- stderr
    thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "`\"pkg-config\" \"--libs\" \"--cflags\" \"libudev\"` did not exit successfully: exit status: 1\nerror: could not find system library 'libudev' required by the 'libudev-sys' crate\n\n--- stderr\nPackage libudev was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libudev.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libudev' found\n"', /home/pythcoiner/.cargo/registry/src/github.com-1ecc6299db9ec823/libudev-sys-0.1.4/build.rs:38:41
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  warning: build failed, waiting for other jobs to finish...
  ```

  fix by:

  ```
  sudo apt install librust-libudev-dev
  ```

ACKs for top commit:
  darosior:
    Thanks! ACK 12050a3

Tree-SHA512: 547768c2b71e4cfa23ce7681f0420bb19e57a8bf4ac2e3a05ad1eb415c4e2935fb32afd1363bb74a3736938d23fdbdae108d058aaa83a72a67d434b9fe7a686a
2023-03-07 14:17:01 +01:00
cc1
12050a3cc5 add link to TRY.md for dependencies 2023-03-07 14:08:29 +01:00
Antoine Poinsot
fd9745363c
Merge #362: Update TRY.md: Resolve dead link
bf02236239e4977bb30e56fb85fd63efc5145e10 Update TRY.md: Resolve dead link (MarcoFalke)

Pull request description:

ACKs for top commit:
  darosior:
    ACK bf02236239e4977bb30e56fb85fd63efc5145e10

Tree-SHA512: 80b7af1d71bcef02a14270e04614418948abc410b55dcdde8b91283d4738dec58b0d112bcd628c57350c549db94c424e17db89c8ea94e756db0456ba6c1567a0
2023-03-02 15:38:18 +01:00
MarcoFalke
bf02236239 Update TRY.md: Resolve dead link 2023-03-02 12:45:08 +01:00
Antoine Poinsot
26ff92d793
Merge #359: doc: some tiny additions to TRY.md
8b990a86efb426a33dc09df0f4d57517e803aace doc: some tiny additions to TRY.md (Antoine Poinsot)

Pull request description:

  After feedback from Kevin

ACKs for top commit:
  darosior:
    self-ACK 8b990a86efb426a33dc09df0f4d57517e803aace -- just some doc.

Tree-SHA512: e63c3beb2ab7c925a02dfade8f85379d504080af09671bff77f71fdbb73003e88bae1e99bf86720fe5ce8cf7124d4e09c467d4f081dfb21203507f49f8002577
2023-02-28 11:32:35 +01:00
Antoine Poinsot
8b990a86ef
doc: some tiny additions to TRY.md
After feedback from Kevin
2023-02-28 11:31:54 +01:00
Antoine Poinsot
5d5792197d
Merge #358: 0.3 release, part 2: update Liana dependency in the GUI, release 0.3 of the GUI
d24dc06d964bd89f491e483b0d0d3fc15541e03e doc: adapt the try-out guide to non-Linux platforms (Antoine Poinsot)
25760e88b4dc545ad79c29e9c1c45f760e260c7b README: various fixes, especially regarding hot keys now available (Antoine Poinsot)
c66eb430a863153229521f1897e6931a72e694bc doc: update the TRY.md tutorial to use hot keys (Antoine Poinsot)
1449c4865e02f34b72215c886cf4e1a7f0c6ca58 README: update the introduction with the current state of development (Antoine Poinsot)
46a4da38f80d65c3f38f9cdd256b9a82840cc8e1 gui: update Liana to 0.3 and release 0.3 (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  darosior:
    self-ACK d24dc06d964bd89f491e483b0d0d3fc15541e03e -- mostly documentation

Tree-SHA512: 41692c5b2e0fcfe10313bef04280e5b1338e8efd3339980a6b0cb1bb78bba41adf18b8b6b4d216e5699077eda094b295e47343d2f6497dc286e9d2e3424b06cc
2023-02-27 18:00:53 +01:00