Antoine Poinsot b548451292
Merge #11: JSONRPC2 server
798bf67e21977ad18ee680a14e23e534f64a3ea5 commands: derive Deserialize for commands results (Antoine Poinsot)
fe5de96312dc8d57f982c060d4b9b045c2194163 Shorten the paths to the dummy datadirs in the unit tests (Antoine Poinsot)
069bca546a23ce1b1714b9564973f13a6f090536 jsonrpc: don't use a Mutex to share the DaemonControl between threads (Antoine Poinsot)
e6fcdd5b095232729cbeef4bd42bf6e57d77ffde jsonrpc: don't umask in unit tests (Antoine Poinsot)
14bd3890dcf6c5dc9fbe25992710c80c9ff107c7 doc: add an API.md documenting the JSONRPC API. (Antoine Poinsot)
eeac67dc0a7724ef4ca9003b7e734f546e62c0ae qa: shut down the daemon via the JSONRPC interface at teardown (Antoine Poinsot)
726209cc0a07d12c71041573313d5b34def30bbd jsonrpc: add a 'stop' command (Antoine Poinsot)
d03c46996798d9e5d68858c4d4631e6b3295f9b3 Introduce a testutils module with a DummyMinisafe for unit tests (Antoine Poinsot)
e510c0a30dd18445d595e403d5cddd8fe04ef1b6 config: separate the Bitcoin and bitcoind-specifc settings (Antoine Poinsot)
ea3595349d0051912ce187ca27de7a6df9b6e7e6 Accept a custom database interface when starting the daemon (Antoine Poinsot)
f365effacd12d0d3fce105dbc59e7ccf5f85488c Accept a custom Bitcoin interface when starting the daemon (Antoine Poinsot)
93098be7dcb82808f6644eee97005c6607eb0cda tests: implement the connection to the daemon's RPC server (Antoine Poinsot)
0d55d6c45599c2a4996f10c5066041369c06d9b1 jsonrpc: a simple JSONRPC2 server (Antoine Poinsot)
dd1b353a36feb04b1af5553e9c71763957996af0 commands: derive serde::Serialize for results (Antoine Poinsot)
86c1d32662e7fda9887da5f799e42cce73228448 bitcoin: name the Bitcoin poller thread (Antoine Poinsot)
6b2e90181484d5dd0ed4ee23b78ab705d98b5c36 bit poller: fix a off logged percentage (Antoine Poinsot)
6ff43fcd9543acb79d6f4c343e102f5029f5480f daemon: log the name of the current thread, too. (Antoine Poinsot)
a067daf16b99a8bdaad1034f2e539c60108a1b4a tests: use a ranged descriptor (Antoine Poinsot)
5228ee370bad72efd98d27e2181fb1ee1c27bae2 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 798bf67e21977ad18ee680a14e23e534f64a3ea5 -- tested using following PRs #13 and #17.

Tree-SHA512: 2eb07c29904e1f71f7375aa5729d5f3bfc5649627a92ef6e49dd273f91a8d4c4243b495eb87d09fa44198ef125066161cf6a2c86af14b4135d806c8baca217b2
2022-08-18 12:00:50 +02:00
2022-07-20 16:17:32 +02:00
2022-07-25 11:43:04 +02:00
2022-07-26 10:46:16 +02:00
2022-07-26 10:46:16 +02:00
2022-07-20 16:17:32 +02:00
Description
A fork of https://github.com/wizardsardine/liana with removed loopback restrictions to allow connecting to a custom remote bitcoin core node
Languages
Rust 90.4%
Python 8.5%
Shell 0.5%
Scheme 0.3%
Nix 0.3%