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.
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:
Indexing:
RPC methods:
Index Server / Cacher:
Optional:
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 state