Rationale: It seems redundant with having a JSON RPC and Chronik protobuf API, but adding a REPL directly into the executable enables a few things that are otherwise not possible:
- Most importantly, this allows accessing RocksDB directly, and to inspect the DB using its cheap iterators, and other operations that don't really make sense in an RPC-style interface. This allows debugging and inspecting the database in a way that previously required writing Rust code.
- It allows new devs who want to contribute to Chronik to see what's going on in the DB. There's no interface to look into the DB, so with this REPL they have a portal to understand what's going on
- We can return all kinds of objects, giving a sort-of programmable explorer interface (Note: We could also do this for the Chronik Client interface, but this way a dev can talk to the node directly without connecting to the RPC)
- It's very beginner-friendly, and if extended with tools to make txs (e.g. an ecash-lib equivalent, or just the test_framework), it can be an easy way to learn the blockchain