Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking: Add an indexer/caching service #8610

Open
13 tasks
Tracked by #8632
arya2 opened this issue Jun 13, 2024 · 1 comment
Open
13 tasks
Tracked by #8632

Tracking: Add an indexer/caching service #8610

arya2 opened this issue Jun 13, 2024 · 1 comment
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

Comments

@arya2
Copy link
Contributor

arya2 commented Jun 13, 2024

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:

RPC methods:

Indexer/Cacher:

Optional:

  • Update TrustedChainSync to use the new RPC method to be notified when there’s a chain tip change or a change to the mempool
  • Update zebra-scan to use RPC methods instead of a synced read state
@arya2 arya2 added I-usability Zebra is hard to understand or use A-rpc Area: Remote Procedure Call interfaces A-state Area: State / database changes A-blockchain-scanner Area: Blockchain scanner of shielded transactions labels Jun 13, 2024
@conradoplg
Copy link
Contributor

I think this might be missing some of the notifications we need, namely when transactions are available and blocks are validated. See zcash/librustzcash#1395 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: New
Development

No branches or pull requests

2 participants