932 Commits

Author SHA1 Message Date
Antoine Poinsot
9007947e4e
bitcoind: use minreq as HTTP transport for JSONRPC
Instead of the hand-written HTTP implementation in the rust-jsonrpc
library, use the minreq crate. It's a small, maintained, low dependency
library actually focused on writing an HTTP client.

This also reworks and better document the request retry logic.
2023-07-13 10:18:07 +02:00
Antoine Poinsot
e3ee50b7af
Update rust-jsonrpc dependency to latest version 2023-07-13 10:07:00 +02:00
Antoine Poinsot
12a3d50928
Merge #565: Update rust-miniscript (and thereby rust-bitcoin) to latest version
a19f2c1536cab6f6a3e85eedcba9be4b907dc33b daemon: drop the base64 dependency (Antoine Poinsot)
96e4cb53537a59f4b2e11011f77e7635ee4a1dd9 Update proc-macro2 to fix a nightly compilation bug (Antoine Poinsot)
b9753b48d03ec7d4398764ec6a91e04388bdb85e descriptors: update the satisfaction size estimation (Antoine Poinsot)
0ac4d80ddbdb61ef3ba9d7e6eb7b76114dfcf961 commands: fix two clippy lints (Antoine Poinsot)
e28010915f4d784ba06a1947ddadaeb5addf6082 lianad: update rust-miniscript (and rust-bitcoin) dependencies (Antoine Poinsot)

Pull request description:

  It was a big chunk, especially in making sure we don't introduce any silent bug with all the upstream recent code movements.

  Also, we no longer depend on my custom `rust-miniscript` branch! 🎉

ACKs for top commit:
  darosior:
    Self-ACK a19f2c1536cab6f6a3e85eedcba9be4b907dc33b.

Tree-SHA512: 7b785551b51bd247c233cac8a44148d25832be729772e2987d6e276643d9f781feb5016e81f2914845a2c93542f57ce861d06b31ba6c455f75cf93681fb98805
2023-07-13 10:02:53 +02:00
Antoine Poinsot
a19f2c1536
daemon: drop the base64 dependency
rust-bitcoin now takes care of that.
2023-07-13 09:56:11 +02:00
Antoine Poinsot
96e4cb5353
Update proc-macro2 to fix a nightly compilation bug 2023-07-13 09:56:11 +02:00
Antoine Poinsot
b9753b48d0
descriptors: update the satisfaction size estimation
The latest rust-miniscript version deprecated the helper we were using,
in favour of one that gives the maximum size difference of a transaction
input before and after satisfaction. The new helper differs in that it
does not account for the empty ScriptSig byte (which uncovered we were
actually double-counting it), and assumes the non-satisfied transaction
input is already part of a Segwit transaction (which we rectified).

This uncovered a mistake in the computation of the witness script size
in the unit test. We also get rid of the needless wu_to_vb() standalone
function.
2023-07-13 09:56:10 +02:00
Antoine Poinsot
0ac4d80ddb
commands: fix two clippy lints
For some reason it started warning about them after the upgrade of
rust-miniscript.
2023-07-13 09:56:10 +02:00
Antoine Poinsot
e28010915f
lianad: update rust-miniscript (and rust-bitcoin) dependencies
Rust-bitcoin, that we use through rust-miniscript, has seen plenty of
breaking changes in the latest version. I've tried to keep the necessary
changes here minimal, still it had to be a single commit to keep it
hygienic. But i'll try to summarize the main things here. Tobin also
wrote a guide about the release at
https://rust-bitcoin.org/blog/release-0.30.0/.

The most verbose change in this commit is probably due to the `Address`
type overhaul. It's overengineered if you ask me but hey here we are. I
tried to keep network validation in commands, and otherwise passing
around unchecked addresses (to avoid having to pass around a global
state between our various components).

Another non-obvious change was changes in hash types upstream and the
removal of `ToHex`, forcing us to get the hex representation of a txid
through its `Display` implementation. It is however displayed backward
in this case ("little-endian" if you will), and we need a regular hex
encoding for some queries to the database. We needed to make sure we
didn't implement any silent bug here.

The rest (Script type changes, PSBT serialization updates, ..) is
probably self-explanatory.
2023-07-13 09:56:09 +02:00
Antoine Poinsot
3bea69170f
Merge #554: Test minimum bitcoin core version
5eba9c3189d509e206198e5910dde5c8b8cfb946 Run tests for minimum supported bitcoin version (Wim van der Ham)

Pull request description:

  Added the cirrus job for bitcoin-24.0.1. For now only for the `test_misc.py` but this can be extended to the other tests as well.

  Fixes https://github.com/wizardsardine/liana/issues/548

ACKs for top commit:
  darosior:
    utACK 5eba9c3189d509e206198e5910dde5c8b8cfb946

Tree-SHA512: 0a55767b5dbb6668195e6203b5e3e1ceb2ec05773d75dfb1f7666ab0e386966fb724c5bfab5f16dd88a2cb4f07fc1b615aa2823b69192dc01af80a64d7621f71
2023-06-28 15:50:41 +02:00
Antoine Poinsot
0d6a752784
Merge #561: Update our MSRV from 1.48 to 1.54
b53236f9dd29e36a7c31dc8cbe138204e4674a71 Update libc wrapper and getrandom (Antoine Poinsot)
9b17d7029ff6e80eb177bf8d04efb85cdefa21ef Update rusqlite to 0.27 (Antoine Poinsot)
1271b646fb87b5d45bd001c616dda4ee1dd37bed Update backtrace dependency (Antoine Poinsot)
5d7a1b4fe5de2a1247f3f0445a87c575e71b129f Update serde dependencies (Antoine Poinsot)
c20c05cee7b25fe6bc9a638b48a14a4430185edc ci: upgrade lianad clippy to 1.70 (Antoine Poinsot)
b2f95ada585fb04c3d82d9419d33affebd9eaccc commands: take advantage of 1.48 compat riddance (Antoine Poinsot)
117221e9eed92fd197822b82a25de094b79cfafd Bump lianad MSRV to 1.54 (Antoine Poinsot)

Pull request description:

  The latest Debian stable was released this month with support for Rust up to 1.63.

  Fixes #69.

ACKs for top commit:
  darosior:
    self-ACK b53236f9dd29e36a7c31dc8cbe138204e4674a71

Tree-SHA512: f2b7fc1462a71cc76897d7cb0fe6644cf5927d5db60b42112fdc6c5c68334af22f45b6d99b8bdfdab1222812bd3832a9abf89ca429789d734cfdc8e9e8f753c8
2023-06-28 15:41:05 +02:00
Antoine Poinsot
b53236f9dd
Update libc wrapper and getrandom
For getrandom it's mostly updates to support new platforms, but also an
added fallback when one system RNG isn't available on some platforms.

See https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md
2023-06-28 11:18:03 +02:00
Antoine Poinsot
9b17d7029f
Update rusqlite to 0.27
The release is >1yo but they keep breaking the MSRV so we can't get the
fixes without upgrading to a bleeding edge compiler...

This upgrades the bundled SQLite to version 3.38, which had quite some
patch releases but no issue that should be relevant to us.
https://sqlite.org/releaselog/3_38_0.html

Full rusqlite changelog available here:
https://github.com/rusqlite/rusqlite/releases/tag/v0.27.0.
2023-06-28 11:01:29 +02:00
Antoine Poinsot
1271b646fb
Update backtrace dependency 2023-06-28 10:43:30 +02:00
Antoine Poinsot
5d7a1b4fe5
Update serde dependencies 2023-06-28 10:39:14 +02:00
Antoine Poinsot
c20c05cee7
ci: upgrade lianad clippy to 1.70 2023-06-28 10:23:15 +02:00
Antoine Poinsot
b2f95ada58
commands: take advantage of 1.48 compat riddance 2023-06-27 17:26:44 +02:00
Antoine Poinsot
117221e9ee
Bump lianad MSRV to 1.54
Now that the latest Debian stable was released with 1.63.
2023-06-27 17:01:32 +02:00
edouard
607c0abdda
Merge #481: gui: bump iced 0.9
b070d61edb6c00c5d6ff7b0c563716192fc6cd7a gui: bump iced 0.9 (edouard)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK b070d61edb6c00c5d6ff7b0c563716192fc6cd7a

Tree-SHA512: abc99fad18efe54d00fd25c77b028db150b5f07cbcd32350e4f0e9ce3b5b783b3dc6832ee0e466cd44f23b7a3ad0facb66006b8be78172bf0efba608f54ecc88
2023-06-13 11:10:40 +02:00
Wim van der Ham
5eba9c3189 Run tests for minimum supported bitcoin version 2023-06-06 21:33:47 +02:00
Antoine Poinsot
74598742f5
Merge #549: doc: mention the minimum supported glibc version
e437f6bd5717d7c3ef290b4e88aca22dd434dc71 doc: mention the minimum supported glibc version (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  darosior:
    self-ACK e437f6bd5717d7c3ef290b4e88aca22dd434dc71 -- trivial, it's only docs

Tree-SHA512: cab02c7879c2ef7ea564a7c474aa43b0858ad6cd1f04ea77cd9761c81fcc9c63baac70d03c8b00d93b366055fd114f434cc618251599b0ddfbad3ca233b6358b
2023-06-06 11:42:50 +02:00
Antoine Poinsot
4f8fbc60a9
Merge #538: Add test for rescan and recovery
0c4c347011e1c558ede08e6ca929e9c658fa6947 Add test for rescan and recovery This test simulates a typical recovery flow for a user (Novo)

Pull request description:

  Resolves #202
  This PR adds a new test that simulates the typical flow for a user trying to recover their coins

ACKs for top commit:
  darosior:
    utACK 0c4c347011e1c558ede08e6ca929e9c658fa6947

Tree-SHA512: e15add35ea53e475cdf57d79030905a8ae9c48562e3b73bc936c64b9a6c0b78ae0606f181957dbff9a2d2a02e947f8bdffced25689ef8e02fbabe7ebb753fc1b
2023-06-06 11:36:14 +02:00
Antoine Poinsot
e4a019281d
Merge #553: add tips and tricks
60ff05acf7a8081c4adba532b5f9f95135ef9bd5 add tips and tricks (pythcoiner)

Pull request description:

  follow #512

ACKs for top commit:
  darosior:
    ACK 60ff05acf7a8081c4adba532b5f9f95135ef9bd5

Tree-SHA512: 8dcc16a65725544969dc13ebd7ce9406fd8b59b9517e0fdfd374ca428656bc03a655eec30e2152fd2966db3c8e4332416eb473b1ddb31351b8bbba81f9671c94
2023-06-06 11:19:16 +02:00
edouard
b070d61edb gui: bump iced 0.9 2023-06-05 11:08:04 +02:00
pythcoiner
60ff05acf7 add tips and tricks 2023-06-02 18:51:22 +02:00
Novo
0c4c347011 Add test for rescan and recovery
This test simulates a typical recovery flow for a user
2023-06-01 10:49:50 +01:00
edouard
825a69bd2b
Merge #551: gui: update async-hwi 0.0.7
89d8e660beb2b4fee13effefdc32daf6341a2728 gui: update async-hwi 0.0.7 (edouard)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK 89d8e660beb2b4fee13effefdc32daf6341a2728

Tree-SHA512: 9725e422231997c8eb03d01dacf343c66060c1676527a4ea7510b0013f6653acef973b507876f290aab07638a3dfaa04c63d86ade641b55bef171c818de663de
2023-05-31 17:40:43 +02:00
edouard
89d8e660be gui: update async-hwi 0.0.7 2023-05-31 11:21:42 +02:00
Antoine Poinsot
e437f6bd57
doc: mention the minimum supported glibc version 2023-05-30 16:05:26 +02:00
Antoine Poinsot
21f069a4e7
Merge #529: add glibc version
0d3e9e1593b736fd68c89ac2dfc8fe05f0846403 add glibc version (pythcoiner)

Pull request description:

  follow #523

ACKs for top commit:
  darosior:
    ACK 0d3e9e1593b736fd68c89ac2dfc8fe05f0846403

Tree-SHA512: 2348297de50752c7af35470644597a618defdfdcccf20b773f7034a6aa441b10c77d00405f836becdbeebf033fb1f8f932b7af6e4db06ca7705671b38a3906c1
2023-05-30 15:14:52 +02:00
Antoine Poinsot
210322c143
Merge #541: doc/ci: Use Bitcoin Core 25.0
5b63fe813869af82bf70a027d38e32c15bd219fa doc/ci: Use Bitcoin Core 25.0 (fanquake)

Pull request description:

  Leave minimum supported version as 24.0.1.

ACKs for top commit:
  darosior:
    ACK 5b63fe813869af82bf70a027d38e32c15bd219fa

Tree-SHA512: 2ec14693cc4ece42aab398c1e06722cd92799ee5806c3f3c526ae9f34d70d6fddc23feb66b72054ad49edf7aa92f717918f43e9745a2a8d6a48dd3a3463fb075
2023-05-30 14:21:04 +02:00
fanquake
5b63fe8138
doc/ci: Use Bitcoin Core 25.0 2023-05-29 10:14:42 +01:00
edouard
a39a806d1c
Merge #540: gui: clear fingerprint alias when changing device type
c55b992ace93da5b334a878b92a62a5d5325a0cd gui: clear fingerprint alias when changing device type (jp1ac4)

Pull request description:

  This is to resolve #531.

ACKs for top commit:
  edouardparis:
    ACK c55b992ace93da5b334a878b92a62a5d5325a0cd

Tree-SHA512: d38d393d669704c4c980315b5f9c7eda433ce3b1faeeaa0efd71d5f2c4eee531c4943957d1236dd1d245f1e3fff896638600369d0c7e66b2b2be9568aa0036e0
2023-05-26 10:14:36 +02:00
jp1ac4
c55b992ace
gui: clear fingerprint alias when changing device type 2023-05-26 08:23:36 +01:00
Antoine Poinsot
11ed7bf7aa
Merge #536: Make compilable on aarch64 (M1)
700f6e1d6fc9f4fcbfeeffc00a49c655be8ce671 make compilable on aarch64 (M1) (raphjaph)

Pull request description:

  I ran into some issues while trying to build this on an M1 Mac. First, the `bip39` crate was somehow not being imported correctly and secondly there wasn't a way to just use the `hardware_randomness()` if `cpu_randomness()` wasn't available. Not sure how to do the `#[cfg]` stuff correctly so feel free to close and do another way. Just wanted to post somewhere in case someone else runs into this.

ACKs for top commit:
  darosior:
    utACK 700f6e1d6fc9f4fcbfeeffc00a49c655be8ce671

Tree-SHA512: 01113ef48d103348159f366e70eacbae9b5fa9b255dc758e9b24ae079c2f2468eefc792b58ce3bc25e3e89e5b7719eba8ef6d60fbecfd726f42a62d55c5b46e0
2023-05-25 09:10:23 +02:00
raphjaph
700f6e1d6f make compilable on aarch64 (M1) 2023-05-24 00:08:54 +02:00
Antoine Poinsot
54ac3c7d49
Merge #535: add udev dependency to TRY.md
4dcac426a941dd62b27d4df1379ef836e394a789 add udev dependency to TRY.md (pythcoiner)

Pull request description:

  i just found out that on ubuntu 22.04,  libudev-dev cannot be installed if udev is not installed first

ACKs for top commit:
  darosior:
    Thanks. utACK 4dcac426a941dd62b27d4df1379ef836e394a789.

Tree-SHA512: 916e00ba5679573692913272d9d827562c14742b7e4e5f08b8b3f4bbd88577b2361a5b74683d7865de4e279e26365a163edb8cbc13daef4485ae7d18065deb30
2023-05-22 18:03:39 +02:00
Antoine Poinsot
32dbb9490e
Merge #533: doc/ci: Use Bitcoin Core 24.1
1eb7c08b4525861e93d4b9889499d7ab1bca912d doc/ci: Use Bitcoin Core 24.1 (fanquake)

Pull request description:

  Leave minimum supported version as 24.0.1.

ACKs for top commit:
  darosior:
    ACK 1eb7c08b4525861e93d4b9889499d7ab1bca912d

Tree-SHA512: 9316932eb256884da33b7f975b53bb37a1a791af3b77fc9bbc1bba2a74547c91c122598760a4baa241092f29418d766930b3c6fac49e246437b4fff4c38d02a1
2023-05-22 17:41:00 +02:00
pythcoiner
4dcac426a9 add udev dependency to TRY.md 2023-05-20 23:59:14 +02:00
pythcoiner
0d3e9e1593 add glibc version 2023-05-20 23:42:39 +02:00
fanquake
1eb7c08b45
doc/ci: Use Bitcoin Core 24.1
Leave minimum supported version as 24.0.1.
2023-05-19 15:04:57 +01:00
Antoine Poinsot
0406085ed5
Merge #527: minor wording fix
506f97dc8e7ad053e30e19a12327b2bf16f09882 minor wording fix (pythcoiner)

Pull request description:

  following #508

ACKs for top commit:
  darosior:
    ACK 506f97dc8e7ad053e30e19a12327b2bf16f09882

Tree-SHA512: 5e511e8ebe1ec346dfdf70759f15e2548e78323efafe0ba97a15a8195e52dd6dde490c4320f8a42b533d3772e5f83f8fa9c9edba9dcb8012cb96b319507a3072
2023-05-14 13:43:38 +02:00
Antoine Poinsot
2644a47b17
Merge #526: gui: minor wording fix
41978be064f2f7191e24124f21ae813426b74d19 minor wording fix (pythcoiner)

Pull request description:

  fixes #515

ACKs for top commit:
  darosior:
    utACK 41978be064f2f7191e24124f21ae813426b74d19

Tree-SHA512: c5594c1509e9d7e834a021be83c6a804381e071755ed4a671aaa0b18c2d141a2a1a4c93d0389d75343e11c823053b33178299a0d783e873ab852c30520a76877
2023-05-14 13:40:45 +02:00
Antoine Poinsot
2bd28a1073
Merge #524: doc: replace minisafe by liana
54679343ec04bffcaa9fa4e08b0489176ea22166 replace minisafe by liana (pythcoiner)

Pull request description:

  just rewording minisafe => liana

ACKs for top commit:
  darosior:
    web ACK 54679343ec04bffcaa9fa4e08b0489176ea22166

Tree-SHA512: 42e8966d1f03a2217f0c573cf5220124a5f22954bc1c15c929a0f3842e53e7fa5298f8c0f6be6aae4122a416bcda0205c0e896b35d93bfc04c28347a20b9a767
2023-05-14 13:39:42 +02:00
Antoine Poinsot
f88f1678bc
Merge #521: add .idea/ to .gitignore
07ede01855320d4c6869547b0264c9ed566cc31b add .idea/ to .gitignore (pythcoiner)

Pull request description:

  .idea/ is folder for Jetbrains IDEs (Clion,Pycharm, etc...)

ACKs for top commit:
  darosior:
    web ACK 07ede01855320d4c6869547b0264c9ed566cc31b

Tree-SHA512: 009a3d660f2ff2002f697c58ed67e66121acf64db088d29f12bf625b62fbe3ef636b280d828a0ca1ed35b18d33414884f6626eecd5765eff172136c4b1f67971
2023-05-14 13:38:50 +02:00
pythcoiner
506f97dc8e minor wording fix 2023-05-14 08:51:32 +02:00
pythcoiner
41978be064 minor wording fix
minor wording fix
2023-05-14 08:03:00 +02:00
pythcoiner
07ede01855 add .idea/ to .gitignore 2023-05-13 19:01:45 +02:00
pythcoiner
54679343ec replace minisafe by liana 2023-05-13 18:59:49 +02:00
Antoine Poinsot
73a90b412d
Merge #500: README: mention the verify-commits script
7f6a7ed6983fc65d544be458f9904b32e0cfcc92 README: mention the verify-commits script (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  darosior:
    self-ACK 7f6a7ed6983fc65d544be458f9904b32e0cfcc92 -- simple doc

Tree-SHA512: 3714302b78a947475d08292282e5886e954ca354a22b3837d21ac72bf383c1972bd9b4905cf4900beebd3c17834ee22b63f0e0fe55106b07966c45cac5fb3d3c
2023-05-12 13:15:28 +02:00
Antoine Poinsot
7f6a7ed698
README: mention the verify-commits script 2023-05-12 13:14:33 +02:00