Running Floresta
So far in the Floresta journey we have mostly learned about the two core library crates: floresta-chain and floresta-wire.
In Chapter 1 we went over the common library (floresta-common), the three extra libraries (floresta-watch-only, floresta-compact-filters, and floresta-electrum) and the floresta meta-crate. We also mentioned floresta-rpc and floresta-node, the libraries powering our two current binaries.
This chapter puts it all together leveraging the assembler library floresta-node, which provides:
-
The
Florestadstruct: the "orchestrator" that starts the node, spawning asynchronous tasks for each subsystem (theUtreexoNode, an optional JSON-RPC server, the Electrum server, etc.). It also sends the stop signal when requested to, as the main loop inflorestadkeeps checking for aCtrl+Csignal. -
The
Configtype: a single configuration struct used to bootstrapFlorestad.