We detect and store immature deposits (cause otherwise we won't go
through them again with listsinceblock), but mark them as such and
unconfirmed.
We only mark them as confirmed once they've matured. It's a bit clumsy
but it's not as if most of our users had coinbase deposits.
We need to keep track of such coins to:
- Track their maturation
- Avoid using them (for instance in coin selection)
Reorg handling for coinbase deposits that become immature is not
implemented (yet). That's reasonable because:
1. It would be very unlikely that we'd move back, so it's most likely
gonna be mature again immediately.
2. If there's a reorg of more than 100 blocks we've got bigger problems.
f4d184f6f7fb748bff17f8a846616c589a432342 descriptor: refuse non-normalized xpubs (Antoine Poinsot)
Pull request description:
We wouldn't be able to derive them. See https://github.com/wizardsardine/liana/issues/576#issuecomment-1642429179.
ACKs for top commit:
darosior:
self-ACK f4d184f6f7fb748bff17f8a846616c589a432342
Tree-SHA512: 2da34a8fccbeda1bab69d7bfd6e453173578884d76718ba54f6c505639f4117de9f8d03850b5bddb75bc3e23a57ddfc1ce4b885250c6ff468d591932e947f379
43a0cf232be58d40479ff51790765b94e92aaae4 test_misc.py: linter (Antoine Poinsot)
c421610b302d41b119a231114154b779a0ca5293 qa: test we retry requests to bitcoind when it's overloaded (Antoine Poinsot)
9007947e4e3600737f0de183ef198bbf1da988f8 bitcoind: use minreq as HTTP transport for JSONRPC (Antoine Poinsot)
e3ee50b7af30c313229b232017dfce9ec709c78f Update rust-jsonrpc dependency to latest version (Antoine Poinsot)
Pull request description:
This makes us take advantage of a more robust, but still lightweight, HTTP implementation.
This PR also cleanups our error handling code and adds a functional test checking we do retry request on transient bitcoind failures.
ACKs for top commit:
darosior:
ACK 43a0cf232be58d40479ff51790765b94e92aaae4 -- let's get it in early and try it as we go.
Tree-SHA512: 8b66663079a77df86ce0fc2f6f60c61b2d3fd50a6d5f8f06b35dcb5a8a942210260e68023e90647aaf8da70625b73d024eda2aba284203c0db99842ed4bb0ceb
7c3511e1e4516bef26f525b7280aeeda9299d206 add script for build .deb packages (pythcoiner)
Pull request description:
following #519
should i locate the script in some specific location instead of at the repo root?
is it a way in the CI workflow to automate the test for .deb installs on different versions?
ACKs for top commit:
darosior:
utACK 7c3511e1e4516bef26f525b7280aeeda9299d206 -- can be refined and integrated into the release process in a follow-up.
Tree-SHA512: 67a5a7bd81e975a2a68a3eb195bef79a75b171270d0a3cd9ba0f8e041d320aada20749591258fe7da7c5ed03fa355143885cf22cb7cbe7a43e855c526e884840
11a280bfe4e46031b55259d1ba4963ed4b6f2b8b doc(api): fix order of params for `createspend` (jp1ac4)
Pull request description:
This fixes the documented order of parameters for the `createspend` command.
I also added a full stop to the `destinations` description for consistency.
ACKs for top commit:
darosior:
Thanks! ACK 11a280bfe4e46031b55259d1ba4963ed4b6f2b8b.
Tree-SHA512: bb8778fcb25bb31f883825142e102741592593db22ccfad467b6704767055c67f135b39a5d8b2e3ba9f1e9bf53a422bd82423212c546882a5d302e512718beab
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.
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
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.
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.
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
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
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.
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
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
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
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