373 Commits

Author SHA1 Message Date
Kevin Loaec
733b1240bd
Update CONTRIBUTING.md 2022-12-13 20:21:39 -01:00
Antoine Poinsot
ad1f0e20b1
Merge #182: Recovery command to sweep "expired" coins
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
2022-12-13 18:17:14 +01:00
Antoine Poinsot
05bbb3eef2
Merge #215: update bitcoind connection and be more robust at startup
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 #210
  Fixes #209
  Fixes #213

ACKs for top commit:
  darosior:
    self-ACK acd6929831964d643565f8f22b552f74613a3a1d

Tree-SHA512: 8cacf41b0e00faed877462dc57b595265ff2936937d45535d1be2b42fd1bf80df2928ccacbefd43f82d88a728aca898a8549899380e341de8b8e74d34ec74642
2022-12-13 18:00:17 +01:00
Antoine Poinsot
1e56c58166
Merge #214: descriptors: rule-out 0-value timelocks
b74a6ffc16740c1a8c0b93a8b4aa34bc1a1b819a qa: unflake test_rescan_edge_cases (Antoine Poinsot)
f6db9c6677ca43c51afbacbf4036cfe55f5539b1 descriptors: rule out null timelocks (Antoine Poinsot)

Pull request description:

  Fixes #208.

ACKs for top commit:
  darosior:
    self-ACK b74a6ffc16740c1a8c0b93a8b4aa34bc1a1b819a

Tree-SHA512: 3d4ed44f3b376e897bd28d11b9e1ce367d6cdf28f70472f39b3939d2cf25580302a81542131086aa1b9a028161f0eabe084efdd54a55703d0a2d4150eac84ae9
2022-12-13 17:47:27 +01:00
Antoine Poinsot
b74a6ffc16
qa: unflake test_rescan_edge_cases
We weren't waiting for lianad to be back to the same height as bitcoind.
Necessarily it could happen that sorted_coins() would return an empty
list.

Fixes #142 (did 50 successful runs of the test)
2022-12-13 16:59:57 +01:00
Antoine Poinsot
f6db9c6677
descriptors: rule out null timelocks
They are valid by consensus, not by Miniscript.
2022-12-13 16:59:56 +01:00
Antoine Poinsot
acd6929831
doc: update for bitcoind 24.0.1 release
Technically the minimum we support is 24.0 but let's not nudge people to
install a version with a buggy wallet.

Fixes #210
2022-12-13 16:37:52 +01:00
Antoine Poinsot
650101525d
bitcoind: set minimum required version to 24.0 2022-12-13 16:37:52 +01:00
Antoine Poinsot
9211d849c1
bitcoind: be less stupid when loading the watchonly wallet
Only load it if isn't there already.
2022-12-13 16:14:20 +01:00
Antoine Poinsot
de629cc075
Merge #211: gui: disable daemon jsonrpc client for windows
37562608ecd9471fe37ea123fe21512b6d373068 gui: disable daemon jsonrpc client for windows (edouard)

Pull request description:

  It is not certain that uds_windows will work so we prefer
  to remove it.

ACKs for top commit:
  darosior:
    utACK 37562608ecd9471fe37ea123fe21512b6d373068. That sounds more reasonable, and removes 8 dependencies 🎉.

Tree-SHA512: f0af1ceba6dc0881d5265497c606ff9916ba9a64cb94a79b4e4b4ecce9c3800fc796f0cd2eb620abf14793efb413b88cee202ce800a4e4c237e761ef5d2ab528
2022-12-13 16:00:47 +01:00
Antoine Poinsot
ba994ff8ff
commands: do not underestimate the size of created transactions
We were truncating when computing the virtual size of satisfactions.
2022-12-13 15:37:58 +01:00
Antoine Poinsot
46a94d6c8e
qa: test recovery 'sweep' transaction creation 2022-12-13 15:34:25 +01:00
Antoine Poinsot
f9359869f7
Merge #140: Bootstrappable builds
ef20b782301bae2fdfb842dfd89a749e60cb449e guix: make the builds actually reproducible (Antoine Poinsot)
72a332d2caf6c139d20855203d107fe3b185ba7d guix: fix the dependencies listing for the GUI container (Antoine Poinsot)
4a38040acf12dd457ac5f29a24f4b3800114255c guix: documentation (Antoine Poinsot)
37a28dbf7d5a22426d1844ef792d04e604e5b91b guix: use a lighter environment for building the daemon (Antoine Poinsot)
ae0b24f97494a7a859578ab6191187c4405a225f guix: allow to limit the number of cores dedicated to the build (Antoine Poinsot)
940c28d072c449295f6e1225446b829bea2d3053 guix: use patchelf to strip interpreter and RPATH (Antoine Poinsot)
3906a1b5bc5e7f57925981b4dd009fc6b13de7c1 guix: reproducible builds of the GUI (Antoine Poinsot)
8dda896e4b2c4baa69b5e1b839bfaf47b9b36320 guix: Linux reproducible builds of the daemon (Antoine Poinsot)

Pull request description:

  This introduces reproducible and bootstrappable builds of our softwares by using [Guix](https://guix.gnu.org/). This is heavily inspired by the work on Guix [that was done in the Bitcoin Core project](https://github.com/bitcoin/bitcoin/tree/master/contrib/guix). For an intro to reproducible builds with Guix see [this post](https://guix.gnu.org/blog/2020/reproducible-computations-with-guix/).

  For details, see the documentation introduced in this PR. Apologies for the poor commit history.

ACKs for top commit:
  darosior:
    ACK ef20b782301bae2fdfb842dfd89a749e60cb449e

Tree-SHA512: 58800170a8fd0822129f1fefa23c8a8cb68e8758a56b3ea9933b41cff1eff7691ed735a28f156395b76c18447044f2ba5a3f4cd519696667b6df90e27e20d3f6
2022-12-13 14:52:42 +01:00
Antoine Poinsot
ef20b78230
guix: make the builds actually reproducible
Paths to the dependencies affect the symbols in the binary
2022-12-13 14:50:59 +01:00
Antoine Poinsot
72a332d2ca
guix: fix the dependencies listing for the GUI container 2022-12-13 14:50:59 +01:00
Antoine Poinsot
4a38040acf
guix: documentation
This is directly inspired from the Bitcoin Core project's documentation.
This especially copies some stuff written by Carl Dong.
2022-12-13 14:50:58 +01:00
Antoine Poinsot
37a28dbf7d
guix: use a lighter environment for building the daemon
Special case the GUI dependencies to the GUI's container
2022-12-13 14:50:57 +01:00
Antoine Poinsot
ae0b24f974
guix: allow to limit the number of cores dedicated to the build 2022-12-13 14:50:57 +01:00
Antoine Poinsot
940c28d072
guix: use patchelf to strip interpreter and RPATH 2022-12-13 14:50:56 +01:00
Antoine Poinsot
3906a1b5bc
guix: reproducible builds of the GUI
The GUI is using an insane MSRV so i had to patch my way through in
order to be able to build some dependencies.
2022-12-13 14:50:56 +01:00
Antoine Poinsot
8dda896e4b
guix: Linux reproducible builds of the daemon 2022-12-13 14:50:55 +01:00
edouard
37562608ec gui: disable daemon jsonrpc client for windows
It is not sure uds_windows will work so we prefer
to remove it.
2022-12-13 12:20:20 +01:00
edouard
bb9a41727e
Merge #201: fix gui: wrong event selection on home panel
ea6d4f9b6374ea9e8873a4eb768feef11caaa48f fix gui: wrong event selection on home panel (edouard)

Pull request description:

  Because pending events are in a different list
  that confirmed event. The wrong list item was
  selected when user tried to click on a pending
  event.

ACKs for top commit:
  edouardparis:
    Self-ACK ea6d4f9b6374ea9e8873a4eb768feef11caaa48f

Tree-SHA512: c0eef61c53a75f1fa746494bf9abc151a31f37d05616a8615eba2f3d3f6fe2573d96adef3b5ad7efd7f30b71d01afb012d5166cdfcbf9a1215752cbdfb43d6ae
2022-12-12 15:49:34 +01:00
Antoine Poinsot
3b5cbd5122
qa: introduce a sign_and_broadcast utility 2022-12-09 12:27:50 +01:00
Antoine Poinsot
d362885b85
qa: record the recovery xpub too 2022-12-09 12:27:49 +01:00
Antoine Poinsot
a69fb625ea
qa: use a CSV of 10 for recovery 2022-12-09 12:27:49 +01:00
Antoine Poinsot
a78f46fa2f
[refactoring] jsonrpc: sort command names alphabetically 2022-12-09 12:27:48 +01:00
Antoine Poinsot
c09ae3f87b
commands, jsonrpc: add a new 'createrecovery' command
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.
2022-12-09 12:27:47 +01:00
Antoine Poinsot
3d5d0134b4
commands: fix the capacity of input vectors in create_spend
They were based on the expected size of the outputs vector...
2022-12-09 12:20:39 +01:00
Antoine Poinsot
f2312593da
commands: check for dust outputs in the PSBT sanity checks 2022-12-09 12:19:02 +01:00
Antoine Poinsot
9f23161a53
commands: correct the max feerate value
We should have a functional test for this...
2022-12-09 12:19:02 +01:00
Antoine Poinsot
54410cd9c4
database: allow to query coins by their spending status 2022-12-09 12:19:01 +01:00
Antoine Poinsot
b3337193a4
Merge #153: Fill in non_witness_utxo when creating Spend PSBTs
07e5ea3fd2afae4e1b84abc57b0937c6e74ab3b0 commands: fill non_witness_utxo field in PSBT inputs for createspend (Antoine Poinsot)

Pull request description:

  Fixes #133.

ACKs for top commit:
  edouardparis:
    ACK 07e5ea3fd2afae4e1b84abc57b0937c6e74ab3b0

Tree-SHA512: 57a211482e138d55c95494a070e67e2f353a8688cf0f546b71de18c5ea6c2b752231c84c6281b8ed59487cb057fc8265139b59598b3bed79bb6482a5cdd00a7c
2022-12-09 12:18:43 +01:00
edouard
ea6d4f9b63 fix gui: wrong event selection on home panel
Because pending events are in a different list
that confirmed event. The wrong list item was
selected when user tried to click on a pending
event.
2022-12-09 11:45:45 +01:00
Antoine Poinsot
07e5ea3fd2
commands: fill non_witness_utxo field in PSBT inputs for createspend
We are still in segwit v0, so signers need it!!
2022-12-09 10:49:49 +01:00
edouard
ca771e3e00
Merge #183: fix installer: import_descriptor next button
2d788d5bffc1b237dc6be3c09ca2e13afcdeca67 fix installer: import_descriptor next button (edouard)

Pull request description:

  Next button was grey although the descriptor form
  is not empty.

ACKs for top commit:
  edouardparis:
    Self-ACK 2d788d5bffc1b237dc6be3c09ca2e13afcdeca67

Tree-SHA512: ad98aa33691c24e65ca0c04af47b007f4c9a5abcfd376f9a84c9a2de40a39f34f24aceebdd209ad9dd92d5ec7a7d3806ff61063ec45eb7c00a5f4b986e8c97ba
2022-12-09 09:03:12 +01:00
edouard
abe69a1f8f
Merge #184: gui: bump ledger_bitcoin_client 0.1.1
2a609a8eb69fc14d6bb9f58e0043a95ca9713d04 gui: bump ledger_bitcoin_client 0.1.1 (edouard)

Pull request description:

  This version of the client contains a fix
  required for the no inputs recognized warning.

ACKs for top commit:
  edouardparis:
    Self-ACK 2a609a8eb69fc14d6bb9f58e0043a95ca9713d04

Tree-SHA512: 39cff0aee6c66909948cdef9354e71c204f0e03696e71c641919d9f749463316da470b296197c794940e412cf13cf43139f48cda76b010652e8c6dc309f227f3
2022-12-09 08:57:05 +01:00
edouard
d0abaec485
Merge #175: gui: bump liana for release
9fa3cde2991a9ea66ba0f5e2b1da3f40e3d8165e bump liana:master (edouard)

Pull request description:

  TODO: bump this branch again, after milestone is done

ACKs for top commit:
  edouardparis:
    Self-ACK 9fa3cde2991a9ea66ba0f5e2b1da3f40e3d8165e

Tree-SHA512: 55941cba40ffc1ff82ea43a7b46fca40e424a529a76c727ae25a276b88fca2b5a45c9481d43cb30298662b4b1b04a121969cee6407b92b91db7b8dec012e6eb0
2022-12-09 08:08:47 +01:00
edouard
2a609a8eb6 gui: bump ledger_bitcoin_client 0.1.1
This version of the client contains a fix
required for the no inputs recognized warning.
2022-12-08 18:08:10 +01:00
edouard
2d788d5bff fix installer: import_descriptor next button
Next button was grey although the descriptor form
is not empty.
2022-12-08 17:30:28 +01:00
Antoine Poinsot
f03b617490
Merge #176: Friendlier bitcoind startup error handling
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 #134
  Fixes #163

ACKs for top commit:
  edouardparis:
    ACK 0306773cdca15009d3bf2c6eb0c3ebd8e7fb7989

Tree-SHA512: e14a72456104682ccff30d88e21303447065d371aed7279461595795eb938ba823578f05cc47704d996dbe570d12f467b91a88d58363511864e6a1f10eb76004
2022-12-08 17:23:11 +01:00
edouard
9fa3cde299 bump liana:master 2022-12-08 15:49:04 +01:00
Antoine Poinsot
d385e99726
Merge #179: gui: cleanup the README.
f1e072bb5f59e0bffb6d39b340bb5be85c132be4 gui: cleanup the README. (Antoine Poinsot)

Pull request description:

  Fixes #105.

ACKs for top commit:
  darosior:
    self-ACK f1e072bb5f59e0bffb6d39b340bb5be85c132be4 -- trivial

Tree-SHA512: a1ef68eacdca0c40ac9ff701b29016ee50cbca15528d8cb028f33532369c109e214ca31be9ec89a9ff59baebd1f3e9d706f9e64303df00462471f64f7f487899
2022-12-08 15:02:53 +01:00
Antoine Poinsot
4479ff91d2
Merge #178: Cargo: fix the rust-miniscript patched dependency for downstream
293c28570ca28e1375d424245a907c8d0b7e2f85 Cargo: fix the rust-miniscript patched dependency for downstream (Antoine Poinsot)

Pull request description:

  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.

ACKs for top commit:
  darosior:
    self-ACK 293c28570ca28e1375d424245a907c8d0b7e2f85

Tree-SHA512: ddddf7e680c13f2b8b3d64ca01d928e9ce64af18f21bc8eaecc009f4c6aee8aae85cecd027173ed13505035506dff659b11a5d8595d838d09098b213c5a43c99
2022-12-08 15:01:48 +01:00
Antoine Poinsot
4aeae407c7
Merge #177: Check for key duplicates when creating a descriptor
9cc748cd2acb3338f230378b827104fee4e56318 descriptors: make the satisfaction size helpers part of the multi desc (Antoine Poinsot)
929c79a56a82566359bb9c19587d4ddf9ed2e04d descriptors: check for duplicates when creating a descriptor (Antoine Poinsot)

Pull request description:

  Fixes #149.

  Also contains a drive-by fix for the sat size API in the second commit.

ACKs for top commit:
  darosior:
    self-ACK 9cc748cd2acb3338f230378b827104fee4e56318

Tree-SHA512: 72be90ff49895546d5c83060650418243d43d48c19d781a209dc12cb6bcff0d880ffe0aa34b8f124b9fea6c0629c7e20328579e72072cad8e39a45be4b176471
2022-12-08 15:00:50 +01:00
Antoine Poinsot
0306773cdc
daemon: log and exit 1 on startup error, don't panic 2022-12-08 14:59:50 +01:00
Antoine Poinsot
13b2b8eef4
bitcoind: immediately set the default retry limit
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.
2022-12-08 14:59:49 +01:00
Antoine Poinsot
b0ef121e91
bitcoind: accurate connection sanity checks at startup
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.
2022-12-08 14:59:49 +01:00
Antoine Poinsot
f1e072bb5f
gui: cleanup the README. 2022-12-08 12:21:44 +01:00
Antoine Poinsot
293c28570c
Cargo: fix the rust-miniscript patched dependency for downstream
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.
2022-12-08 12:06:19 +01:00