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

core block diff health check #11365

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/discovery-provider/src/queries/get_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from src.queries.get_sol_plays import get_sol_play_health_info
from src.queries.get_trusted_notifier_discrepancies import get_delist_statuses_ok
from src.tasks.index_core import (
CoreHealth,
core_health_check_cache_key,
core_listens_health_check_cache_key,
)
Expand Down Expand Up @@ -263,7 +264,7 @@ def get_health(args: GetHealthArgs, use_redis_cache: bool = True) -> Tuple[Dict,
latest_indexed_block_num = db_block_state["number"] or 0
latest_indexed_block_hash = db_block_state["blockhash"]

core_health = get_core_health(redis=redis)
core_health: CoreHealth = get_core_health(redis=redis)
core_listens_health = get_core_listens_health(
redis=redis, plays_count_max_drift=plays_count_max_drift
)
Expand All @@ -273,6 +274,13 @@ def get_health(args: GetHealthArgs, use_redis_cache: bool = True) -> Tuple[Dict,
if indexing_plays_with_core:
play_health_info = core_listens_health

indexing_entity_manager_with_core = core_health and core_health.get(
"indexing_entity_manager"
)
if indexing_entity_manager_with_core:
latest_indexed_block_num = core_health.get("latest_indexed_block") or -1
latest_block_num = core_health.get("latest_chain_block") or -1

user_bank_health_info = get_solana_indexer_status(
redis, redis_keys.solana.user_bank, user_bank_max_drift
)
Expand Down