It would be possible for users to create a descriptor with xpubs without
an origin set. In fact, not many are used to origins and it's a very
likely mistake. Signers need this information in order to be able to
sign. So they could potentially create a wallet and potentially never be
able to sign for one or multiple keys.
Fix this by requiring an origin for all keys in the descriptor.
We only allow to create "legacy" multisigs for now (that is, what fits
in a CHECKMULTISIG, ie k-of-n with n<=20). See
https://github.com/wizardsardine/liana/issues/53 for discussions around
this.
We are a bit more laxist on parsing, where any miniscript that
corresponds to a multisig policy will be accepted.
Note this makes the helper inferring the CSV value from semantic policy
incorrect, but this is fix in a later commit as part of a complete
refactor of this logic.
Multiple change indexes may be present in a spend
draft transaction and can be detected instead
in the response psbt with the bip32_derivation
outputs fields.
48e4909e7a daemon: store the watchonly wallet file in bitcoind's datadir on Windows (Antoine Poinsot)
Pull request description:
Turns out that providing an absolute path to bitcoind when loading a wallet on Windows results in surprising behaviour.
ACKs for top commit:
edouardparis:
ACK 48e4909e7a
Tree-SHA512: b432460d529cf5b879361452af1e7947ec877c293f8a8a2e1740975a2957c0cdb288d1f9a1fa07e56193c7c65edf1f985d9e24dd3412f2bfc10922df239de766
ba994ff8ff commands: do not underestimate the size of created transactions (Antoine Poinsot)
46a94d6c8e qa: test recovery 'sweep' transaction creation (Antoine Poinsot)
3b5cbd5122 qa: introduce a sign_and_broadcast utility (Antoine Poinsot)
d362885b85 qa: record the recovery xpub too (Antoine Poinsot)
a69fb625ea qa: use a CSV of 10 for recovery (Antoine Poinsot)
a78f46fa2f [refactoring] jsonrpc: sort command names alphabetically (Antoine Poinsot)
c09ae3f87b commands, jsonrpc: add a new 'createrecovery' command (Antoine Poinsot)
3d5d0134b4 commands: fix the capacity of input vectors in create_spend (Antoine Poinsot)
f2312593da commands: check for dust outputs in the PSBT sanity checks (Antoine Poinsot)
9f23161a53 commands: correct the max feerate value (Antoine Poinsot)
54410cd9c4 database: allow to query coins by their spending status (Antoine Poinsot)
Pull request description:
A new command that provides a simple way for a user to sweep all the coins whose timelocked recovery path is available.
The first part of #180. Note this also contains a number of drive-by fixes that i noticed while coding this up.
ACKs for top commit:
darosior:
self-ACK ba994ff8ff -- tested by Edouard on the GUI
Tree-SHA512: 002cb8602370fe3bec0692fe7bbe9e7af494b43756d3092da99b37e4ce2837bcdfcfb3afe7043900eb41c70de12e2129e19363b9efe41cee91c7f1f7c2824fb0
acd6929831 doc: update for bitcoind 24.0.1 release (Antoine Poinsot)
650101525d bitcoind: set minimum required version to 24.0 (Antoine Poinsot)
9211d849c1 bitcoind: be less stupid when loading the watchonly wallet (Antoine Poinsot)
Pull request description:
Fixes#210Fixes#209Fixes#213
ACKs for top commit:
darosior:
self-ACK acd6929831
Tree-SHA512: 8cacf41b0e00faed877462dc57b595265ff2936937d45535d1be2b42fd1bf80df2928ccacbefd43f82d88a728aca898a8549899380e341de8b8e74d34ec74642
This is a new command dedicated to the recovery usecase. For now it's
dead simple: sweep all coins that are available through the recovery
path to a given address.
0306773cdc daemon: log and exit 1 on startup error, don't panic (Antoine Poinsot)
13b2b8eef4 bitcoind: immediately set the default retry limit (Antoine Poinsot)
b0ef121e91 bitcoind: accurate connection sanity checks at startup (Antoine Poinsot)
Pull request description:
We were not properly treating warming up errors when bitcoind was starting up. Also, better to just log as error and `exit` with `1` instead of panic'ing on a daemon startup error.
See the commit messages for details.
Fixes#134Fixes#163
ACKs for top commit:
edouardparis:
ACK 0306773cdc
Tree-SHA512: e14a72456104682ccff30d88e21303447065d371aed7279461595795eb938ba823578f05cc47704d996dbe570d12f467b91a88d58363511864e6a1f10eb76004
We were previously adding it later on to fail early on startup error.
This didn't handle well "warming up" errors.
Now that it was reachable and listening to requests already, we can just
use the real retry limit from the get-go.
The current checks were only testing whether a bitcoind was at all
reachable. We need to make sure it is also listening to requests (and
not warming up) in order for the assumptions made later on (we panic on
requests if we retried for too long) to hold.
This makes the startup sanity checks also wait for bitcoind to get out
of warming up mode.
3224f08ba0 daemon: update rust-miniscript to 0.9 (Antoine Poinsot)
Pull request description:
This also updates the multipaths descriptor patch to the review PR https://github.com/rust-bitcoin/rust-miniscript/pull/470 (rebased on 0.9)
Fixes#123.
ACKs for top commit:
darosior:
self-ACK 3224f08ba0 -- trivial.
Tree-SHA512: 03c8b181e96df8d73953cefadfbb090049859f01e6c8d03cf8417ad4d46795dc295b097f8df6c0f683fb9da03b78f39e824cb7768376d1d5718bdce177edcb6d
a4e6656688 daemon: remove / correct some TODOs (Antoine Poinsot)
628ed3d0ed descriptors: remove TODO in assertions, explain instead (Antoine Poinsot)
62067f0030 qa: remove needless import in fixtures (Antoine Poinsot)
Pull request description:
Small things i noticed while working on #148.
ACKs for top commit:
darosior:
ACK a4e6656688
Tree-SHA512: 0d6b6b95a99744cd92b9ecd30d9678ff27c7223238a31c3e9093899caa11889d40cfe4c7d855c07c378ca127ca900269980d179aeb02478f04e3eaa1e20e1721
The outpoints argument could eventually be made optional in order to
introduce some automated coin selection. So it makes more sense for it
to be after a required parameter, the destinations.
Instead of only incrementing it, allow to be able to set it to any
value. This will be useful for instance to set the derivation to the
latest used onchain, if another wallet is much further down the
derivation tree than we are (or after a rescan).