Skip to content

Commit

Permalink
grest: retire stake_snapshot_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt committed Feb 6, 2024
1 parent 0961cf9 commit 5bb848d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions scripts/grest-helper-scripts/grest-poll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ function chk_cache_status() {
last_stakedist_block=$(jq -r 'map(select(.key == "stake_distribution_lbh"))[0].last_value' 2>/dev/null <<< "${ctrl_tbl}")
last_poolhist_update=$(jq -r 'map(select(.key == "pool_history_cache_last_updated"))[0].last_value' 2>/dev/null <<< "${ctrl_tbl}")
last_actvstake_epoch=$(jq -r 'map(select(.key == "last_active_stake_validated_epoch"))[0].last_value' 2>/dev/null <<< "${ctrl_tbl}")
last_snapshot_epoch=$(jq -r 'map(select(.key == "last_stake_snapshot_epoch"))[0].last_value' 2>/dev/null <<< "${ctrl_tbl}")
last_epoch_summary=$(jq -r 'map(select(.key == "last_epoch_summary_data_checked"))[0].last_value' 2>/dev/null <<< "${ctrl_tbl}")
if [[ "${last_stakedist_block}" == "" ]] || [[ "${last_stakedist_block}" == "[]" ]] || [[ $(( block_no - last_stakedist_block )) -gt 2000 ]]; then
log_err "Stake Distribution cache too far from tip !!"
Expand All @@ -158,11 +157,6 @@ function chk_cache_status() {
log_err "Epoch Summary Cache for epoch ${epoch} still not populated as of ${epoch_slot} slot, maximum tolerance was $(( epoch_length / 6 )) !!"
optexit
fi
else
if [[ $((last_snapshot_epoch + 2)) -lt ${epoch} ]]; then
log_err "Stake snapshot for instance is at '${last_snapshot_epoch}' while current epoch is ${epoch} !!"
optexit
fi
fi
fi
}
Expand Down
4 changes: 0 additions & 4 deletions scripts/grest-helper-scripts/setup-grest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ SGVERSION=v1.1.1
([[ ${NWMAGIC} -eq 141 ]] && install_cron_job "active-stake-cache-update" "*/5 * * * *") ||
install_cron_job "active-stake-cache-update" "*/15 * * * *"

get_cron_job_executable "stake-snapshot-cache"
set_cron_variables "stake-snapshot-cache"
install_cron_job "stake-snapshot-cache" "*/10 * * * *"

get_cron_job_executable "populate-next-epoch-nonce"
set_cron_variables "populate-next-epoch-nonce"
install_cron_job "populate-next-epoch-nonce" "*/10 * * * *"
Expand Down

0 comments on commit 5bb848d

Please sign in to comment.