baa87375d0 fix windows title and doc (edouard)
b77d331792 fix clippy errors (edouard)
Pull request description:
ACKs for top commit:
edouardparis:
ACK baa87375d0
Tree-SHA512: c9cefb39664512c0618422710e5d9d0e6a980f5a724d1e0f62cc2269f7520db8fc5529102e236c3ac3624a742da74864986e6766b19e015b7f058cde2b6956f5
9d0c68dae3 commands: add a 'list_coins' command. (Antoine Poinsot)
99a9cbf0f8 poller: query derivation index by address from DB (Antoine Poinsot)
3f17e9f0c3 database: change interface from update_der_index to increment_der_index (Antoine Poinsot)
e74ea4c2d3 sqlite: a table for a mapping from address to derivation index. (Antoine Poinsot)
c9ef068fa5 poller: update our coins on each poll (Antoine Poinsot)
c6a25adfcd bitcoin: interface for coins discovery and updates (Antoine Poinsot)
05b3af1b5a database: interface and implementation for coins storage and update (Antoine Poinsot)
Pull request description:
ACKs for top commit:
edouardparis:
ACK 9d0c68dae3
Tree-SHA512: 0087ff04939326ae7affbb4c0defbe5573fc58d15f4b2fb47a71a03880187c4105742cc9eda868c3fe0ee5890931dc57eb3c63b4ef79335f434771d5cc089483
29e134748d Add settings panel to gui (edouard)
Pull request description:
based on #8
ACKs for top commit:
edouardparis:
ACK 29e134748d
Tree-SHA512: 7a09c00d53ddef091219ffe5bf702795171bc0575b55f4930680a251d712d8cfdf30afd1ad38218c01c8430346fe95625202eb30b8cb9e1190d40806a7e6d226
798bf67e21 commands: derive Deserialize for commands results (Antoine Poinsot)
fe5de96312 Shorten the paths to the dummy datadirs in the unit tests (Antoine Poinsot)
069bca546a jsonrpc: don't use a Mutex to share the DaemonControl between threads (Antoine Poinsot)
e6fcdd5b09 jsonrpc: don't umask in unit tests (Antoine Poinsot)
14bd3890dc doc: add an API.md documenting the JSONRPC API. (Antoine Poinsot)
eeac67dc0a qa: shut down the daemon via the JSONRPC interface at teardown (Antoine Poinsot)
726209cc0a jsonrpc: add a 'stop' command (Antoine Poinsot)
d03c469967 Introduce a testutils module with a DummyMinisafe for unit tests (Antoine Poinsot)
e510c0a30d config: separate the Bitcoin and bitcoind-specifc settings (Antoine Poinsot)
ea3595349d Accept a custom database interface when starting the daemon (Antoine Poinsot)
f365effacd Accept a custom Bitcoin interface when starting the daemon (Antoine Poinsot)
93098be7dc tests: implement the connection to the daemon's RPC server (Antoine Poinsot)
0d55d6c455 jsonrpc: a simple JSONRPC2 server (Antoine Poinsot)
dd1b353a36 commands: derive serde::Serialize for results (Antoine Poinsot)
86c1d32662 bitcoin: name the Bitcoin poller thread (Antoine Poinsot)
6b2e901814 bit poller: fix a off logged percentage (Antoine Poinsot)
6ff43fcd95 daemon: log the name of the current thread, too. (Antoine Poinsot)
a067daf16b tests: use a ranged descriptor (Antoine Poinsot)
5228ee370b tests: remove mistakenly committed file (Antoine Poinsot)
Pull request description:
On top of #9, this introduces a simple JSONRPC server calling into the exposed commands. I started by reusing code from revaultd, but ended up rewriting it entirely. Compared to it, it t is simpler, smaller and dependency-less.
In order to sanity check the whole server startup and teardown in unit tests, this took a detour by introducing a `testutils` module with mocked Bitcoin and database interfaces. Those will be useful later.
This introduces a JSONRPC-specifc command: `stop`, which shuts down the daemon. We add a `doc/API.md` adapted from #1 with documentation for the existing commands.
ACKs for top commit:
darosior:
self-ACK 798bf67e21 -- tested using following PRs #13 and #17.
Tree-SHA512: 2eb07c29904e1f71f7375aa5729d5f3bfc5649627a92ef6e49dd273f91a8d4c4243b495eb87d09fa44198ef125066161cf6a2c86af14b4135d806c8baca217b2
This also implements a simple JSONRPC server sanity check
And introduces a new tmp_dir() test utility, that i didn't have the courage to split from this commit
So we can have unit tests without a dummy bitcoind thread, as we
currently do for the startup test.
This commit also implements sanity checks for the two existing commands
using this mechanism.
The Bitcoin interface was thought of as being generic, but a caller
couldn't use one different from bitcoind. Make it so they can, and fix
our trait and generics implementations.
8b95b9f449 Make commands module public (edouard)
Pull request description:
It allows the gui to import commands
responses structs.
ACKs for top commit:
darosior:
ACK 8b95b9f449
Tree-SHA512: 3ccfd5acae8e02bf3dd3e14cbb89be86c4dca21bd7699ba633b0cc04a22c5701cc9ce0f4c62442dca8e5a1075bd3666d52b6deaa5241d622f50e9e672c0c5dd0
2609061a69 commands: implement getnewaddress (Antoine Poinsot)
8309c85e30 commands: a module for the implementation of the API (Antoine Poinsot)
4b659bc35a lib: introduce a VERSION constant, the daemon version (Antoine Poinsot)
fd86cfccee lib: introduce a daemon controller for the API (Antoine Poinsot)
Pull request description:
This module contains the implementation of our external API. Like the others, it's very inspired (or grossly copied from) `revaultd`.
This PR implements the `getinfo` and `getnewaddress` commands to showcase the usage of the new `DaemonControl` command.
ACKs for top commit:
darosior:
ACK 2609061a69, adapted from already reviewed `revaultd` code, and largely tested through follow-up #11
Tree-SHA512: 5e30a29807ec854b6d2e8ca0eb340ca45146cd726810875435f4d5959cd5d6f44ceed19439edaf6477e8bf747af3b551edc8d424c4462475a5924f1b8d13c648