Tracking: Add an indexer/caching service #8610
Labels
A-blockchain-scanner
Area: Blockchain scanner of shielded transactions
A-rpc
Area: Remote Procedure Call interfaces
A-state
Area: State / database changes
I-usability
Zebra is hard to understand or use
Motivation
The indexer needs to notify clients when there are changes to the mempool or best chain with affected transactions.
This is more efficient than polling to check for changes, especially from the indexer's perspective, and has better usability for clients.
Design
Add a method to ChainTipChange in zebra-state for getting changes to the nullifier set, and a tonic
IndexerRpcServer
server for streaming responses to clients with server-sent events.Implementation Plan
Preperation:
zebra-rpc
with a read state service #8618RPC methods:
chain_tip_change()
RPC method for listening to chain tip changes #8619mempool_transactions()
RPC method for listening to changes in the mempool #8620nullifiers()
RPC method for getting new nullifier for a block hash or height #8621Indexer/Cacher:
init
function for a standalone ReadStateService #8520current_tip()
or similar toReadState
#8580zebra-indexer
binary crate that starts a read state with a syncer from thesync
module inzebra-rpc
and starts a tonic RPC server #8623zebra-indexer
#8628Optional:
TrustedChainSync
to use the new RPC method to be notified when there’s a chain tip change or a change to the mempoolzebra-scan
to use RPC methods instead of a synced read stateThe text was updated successfully, but these errors were encountered: