The `score` method of the `LowestFee` metric has been fixed
and so our temporary fix is no longer required.
The `min_fee` parameter of `select_coins_for_spend`,
if positive, now ensures that RBF rule 4 is satisfied.
`base_weight` is no longer stored in `CoinSelector` and
instead the output weights are stored in `Target`. This
means that the `output_weight` of `DrainWeights` no longer needs
to take into account a potential change in output count varint.
The most notable change is rust-bitcoin's change in the serialization of
transaction with no input. It now accounts for the segwit marker even
for those. The base tx weight in coin selection had to be adapted to
handle this.
See https://gnusha.org/bitcoin-rust/2024-01-04.log for details.
When creating a new spend, if coin outpoints are not provided,
then coins will be selected automatically.
This automatic selection is such that the transaction fee is
minimized, taking into account the cost of creating any
change output now and the cost of spending it in the future.
If change is added, it must reduce the transaction waste and
be above the dust threshold. This same policy is applied also
in the case of manual coin selection, replacing the previous
logic for determining the change amount. This ensures that
creating a spend with auto-selection and another with manual
selection using the same auto-selected coins will give the
same change amount.
This makes it possible to trigger the shutdown of the daemon through the
DaemonHandle, without having to block while waiting for the poller
thread to join.
Incidently, this allows to avoid having to move `self` which in turns
allows to fix a GUI bug (see
https://github.com/wizardsardine/liana/issues/622).
Only available as an optional feature since `is_finished` needs rustc
1.61.
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.
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.
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.
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.
This new syntax would actually force all downstream users to apply the
patch section in their Cargo.toml! Revert to the previous syntax of
specifying the git repo directly.
This also updates the indirect rust-bitcoin dependency to 0.29.
Major changes are in the descriptors management:
- The rust-miniscript descriptors don't support raw hashes
within the pk_h() fragments, so we don't need all the boutique
management for this.
- The key translator API changed.
- We now take a u16 for the timelock instead of our previous
checks. This was inspired by the new rust-bitcoin Sequence
type.
- We now take a path instead of just a derivation index in
DerivedKey. We might use paths after all...
As for rust-bitcoin it's just a few nits:
- No more 'global' field on PSBTs (yay)
- Couple more trait derivation on types
- Some APIs were renamed.