Zaino currently fetches full blocks and parses them to compact blocks every time a client requests block data. This is very inefficient and access to a local compact block cache or at the very lease an internal non-finalised state is required for scale use. This will be inherited from Zebra when Zaino is backed by the ReadStateService (StateService) but this will still not be the case when Zaino uses its backup RPC backend (FetchService), with zcashd or other future RPC based validators. For this reason we need to implement an internal non-finalised state for FetchService.
NOTE: If compact blocks are not available in the ReadStateService at the time this work is being implemented, StateService will continue parse data internally until the required indexes are available.
Zaino currently fetches full blocks and parses them to compact blocks every time a client requests block data. This is very inefficient and access to a local compact block cache or at the very lease an internal non-finalised state is required for scale use. This will be inherited from Zebra when Zaino is backed by the
ReadStateService
(StateService
) but this will still not be the case when Zaino uses its backup RPC backend (FetchService
), with zcashd or other future RPC based validators. For this reason we need to implement an internal non-finalised state forFetchService
.Tasks
FetchService
struct inZaino-State
, initially containingZaino-Fetch
's JsonRpcConnector and anon_finalised_state
struct, and implement sync method as a persistent background process.Indexer
forFetchService
.get_compact_block
method toIndexer
trait and implement forStateService
andFetchService
.FetchService
NOTE: If compact blocks are not available in the ReadStateService at the time this work is being implemented,
StateService
will continue parse data internally until the required indexes are available.