namada
namada copied to clipboard
Avoid blocking state updates on client queries
We currently use RocksDB as our database backend. RocksDB has an interesting snapshot feature, which provides read-only access to the database without blocking subsequent writes.
Namada's ABCI Query implementation, as of v0.43.0, blocks on incoming requests, since it exclusively borrows the Shell (an abstraction holding all in-memory/persisted state in Namada).
Perhaps we could leverage RocksDB snapshots to allow up to some configurable number of $n$ queries to execute concurrently, before ultimately blocking on a request (or handling it as a background job without blocking state updating ABCI requests at all).