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.
48e4909e7ad83c21f788802953327f8041a69b7d 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 48e4909e7ad83c21f788802953327f8041a69b7d
Tree-SHA512: b432460d529cf5b879361452af1e7947ec877c293f8a8a2e1740975a2957c0cdb288d1f9a1fa07e56193c7c65edf1f985d9e24dd3412f2bfc10922df239de766
ba994ff8ff01d04fd31ed77cf7f66e0862e68e17 commands: do not underestimate the size of created transactions (Antoine Poinsot)
46a94d6c8eb144484a4b0df2ddbd48b32d4d096f qa: test recovery 'sweep' transaction creation (Antoine Poinsot)
3b5cbd5122fa53d0247e82dd7fc703b5d0a4bae3 qa: introduce a sign_and_broadcast utility (Antoine Poinsot)
d362885b85107b616447899d5eaaa5ba1b55c170 qa: record the recovery xpub too (Antoine Poinsot)
a69fb625ea3b8dfbfa1bf384e001f167fd04ff86 qa: use a CSV of 10 for recovery (Antoine Poinsot)
a78f46fa2fc5337c51d1eaa6ac6bbee04cfdf437 [refactoring] jsonrpc: sort command names alphabetically (Antoine Poinsot)
c09ae3f87bc8bb2391d88d1a718b35d4a6c568fa commands, jsonrpc: add a new 'createrecovery' command (Antoine Poinsot)
3d5d0134b4b5bc06910a89d23def36de5b548c30 commands: fix the capacity of input vectors in create_spend (Antoine Poinsot)
f2312593da8b27c6c6a69c7b0463959369c5acb6 commands: check for dust outputs in the PSBT sanity checks (Antoine Poinsot)
9f23161a53ad32d03d4ec464c48a819862dbf3e5 commands: correct the max feerate value (Antoine Poinsot)
54410cd9c435e1e6228b985d78e55b357c2368b8 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 ba994ff8ff01d04fd31ed77cf7f66e0862e68e17 -- tested by Edouard on the GUI
Tree-SHA512: 002cb8602370fe3bec0692fe7bbe9e7af494b43756d3092da99b37e4ce2837bcdfcfb3afe7043900eb41c70de12e2129e19363b9efe41cee91c7f1f7c2824fb0
acd6929831964d643565f8f22b552f74613a3a1d doc: update for bitcoind 24.0.1 release (Antoine Poinsot)
650101525d890f50290989bd58c367024a69115c bitcoind: set minimum required version to 24.0 (Antoine Poinsot)
9211d849c191ff5d2552bde681edaa7038c8d049 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 acd6929831964d643565f8f22b552f74613a3a1d
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.
0306773cdca15009d3bf2c6eb0c3ebd8e7fb7989 daemon: log and exit 1 on startup error, don't panic (Antoine Poinsot)
13b2b8eef4dd5deafe04b2330b469067afd0b12c bitcoind: immediately set the default retry limit (Antoine Poinsot)
b0ef121e91209e1c69ddefa0765d7a93d1dfb569 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 0306773cdca15009d3bf2c6eb0c3ebd8e7fb7989
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.
3224f08ba083e384f55abb690770d8dd09f8ea3d 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 3224f08ba083e384f55abb690770d8dd09f8ea3d -- trivial.
Tree-SHA512: 03c8b181e96df8d73953cefadfbb090049859f01e6c8d03cf8417ad4d46795dc295b097f8df6c0f683fb9da03b78f39e824cb7768376d1d5718bdce177edcb6d
a4e66566886901f28e383e67f06de2215e3ebc42 daemon: remove / correct some TODOs (Antoine Poinsot)
628ed3d0ed3997a64d8d0d92206842ef5445e2fa descriptors: remove TODO in assertions, explain instead (Antoine Poinsot)
62067f0030795143cbec87dcc1d5db0e5265c5c5 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 a4e66566886901f28e383e67f06de2215e3ebc42
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).