Expand description
This module includes helper functions to get the blockchain synchronization status of the entity. The entity tracks on-chain transactions for many purposes (TxSender, FinalizedBlockFetcher, HCP) and takes action (header chain proving, payout, disprove, L2 state sync, etc.) SyncStatus tracks the latest processed block heights for each of these tasks.
Structs§
- Entity
Sync Status Metrics - The sync status metrics for an entity. This is used by the aggregator to
publish external entity metrics. The scope will be set to the EntityId +
“_l1_sync_status”, which will be displayed as
Operator(abcdef123...)_l1_sync_statusorVerifier(abcdef123...)_l1_sync_statuswhere the XOnlyPublicKey’s first 10 characters are displayed, cf.crate::aggregator::OperatorIdandcrate::aggregator::VerifierId. - Sync
Status - A struct containing the current sync status of the entity.
- Sync
Status Metrics - The sync status metrics for the currently running entity. (operator/verifier)
Constants§
Statics§
- ENTITY_
SYNC_ STATUS - The sync status metrics static for the currently running entity. (operator/verifier)
Traits§
- Sync
Status Provider - Extension trait on named entities to retrieve their sync status (including both L1 and L2 data).
Functions§
- get_
bitcoin_ fee_ rate - Get the current Bitcoin fee rate in sat/vB.
- get_
btc_ syncer_ consumer_ last_ processed_ block_ height - Get the last processed block height of the given consumer or None if no block was processed by the consumer.
- get_
btc_ syncer_ consumer_ last_ processed_ finalized_ block_ height - Get the last processed finalized block height of the given consumer or None if no block was processed by the consumer.
- get_
btc_ syncer_ synced_ height - Get the last processed block height of the Bitcoin Syncer or None if no block is present in the database.
- get_
hcp_ last_ proven_ height - Get the last proven block height of the HCP or None if no block has been proven.
- get_
rpc_ tip_ height - Get the current height of the chain as seen by Bitcoin Core RPC.
- get_
state_ manager_ next_ height - Get the next height of the State Manager or None if the State Manager status for the owner is missing or the next_height_to_process is NULL.
- get_
tx_ sender_ synced_ height - Get the synced height of the Transaction Sender or None if the tx_sender_sync_state table is empty or missing.
- get_
wallet_ balance - Get the current balance of the wallet.
- log_
errs_ 🔒and_ ok