You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want the ChainTipChange struct to work in a separate process so it can be used in zebra-scan and/or the indexer.
We also want to have access to all of Zebra's best chain via the ReadStateService from another process, including blocks in the non-finalized portion of Zebra's best chain.
Note: Accessing the finalized portion of Zebra's best chain should only require a ReadStateService initialized with a read-only ZebraDb using the same cache directory (except maybe when Zebra is configured to use an ephemeral state).
Design
Add a function in zebra-rpc that:
Polls the getbestblockhash method to check if a process has the latest best chain tip in Zebra
Calls the getblock method to sync any blocks in Zebra that are missing in the new process
Infers when there's been a chain fork/reorganization and re-syncs all of the blocks past the finalized tip from Zebra
Sends new blocks to the LatestChainTip channel used by ChainTipChange
This function could returns a ChainTipChange struct, or accept a ChainTipSender.
The text was updated successfully, but these errors were encountered:
Motivation
We want the
ChainTipChange
struct to work in a separate process so it can be used inzebra-scan
and/or the indexer.We also want to have access to all of Zebra's best chain via the
ReadStateService
from another process, including blocks in the non-finalized portion of Zebra's best chain.Note: Accessing the finalized portion of Zebra's best chain should only require a
ReadStateService
initialized with a read-onlyZebraDb
using the same cache directory (except maybe when Zebra is configured to use an ephemeral state).Design
Add a function in
zebra-rpc
that:getbestblockhash
method to check if a process has the latest best chain tip in Zebragetblock
method to sync any blocks in Zebra that are missing in the new processLatestChainTip
channel used byChainTipChange
This function could returns a
ChainTipChange
struct, or accept aChainTipSender
.The text was updated successfully, but these errors were encountered: