Module metrics

Source
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§

EntityL1SyncStatusMetrics
The L1 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_status or Verifier(abcdef123...)_l1_sync_status where the XOnlyPublicKey’s first 10 characters are displayed, cf. crate::aggregator::OperatorId and crate::aggregator::VerifierId.
L1SyncStatus
A struct containing the current sync status of the entity.
L1SyncStatusMetrics
The L1 sync status metrics for the currently running entity. (operator/verifier)

Constants§

L1_SYNC_STATUS_SUB_REQUEST_METRICS_TIMEOUT 🔒

Statics§

L1_SYNC_STATUS
The L1 sync status metrics static for the currently running entity. (operator/verifier)

Traits§

L1SyncStatusProvider
Extension trait on named entities who synchronize to the L1 data, to retrieve their L1 sync status.

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_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_wallet_balance
Get the current balance of the wallet.
log_errs_and_ok 🔒