Refs #52
Files: scripts/anvil_fork.sh, config/fork.toml, crates/charon-scanner/src/oracle.rs
Problem
PR description flags stale Chainlink warnings as a follow-up tweak. Reality: PriceCache rejects stale prices on every refresh. With the fork's Chainlink feeds frozen at fork time and wall clock advancing, every feed goes stale within 10 minutes (DEFAULT_MAX_AGE). Scanner degrades to zero liquidatable positions because HF math requires prices. Grafana Path B demo shows flat empty metrics — no liquidation activity.
This defeats the entire purpose of this PR.
Fix options
A. anvil_fork.sh auto-advances time periodically:
while true; do
sleep 30
cast rpc anvil_mine 1 --rpc-url http://127.0.0.1:8545 >/dev/null
done &
B. fork.toml profile overrides per-symbol max_age to something huge (e.g. 86400s) OR sets DEFAULT_MAX_AGE to 24h for fork profile.
C. Use anvil_increaseTime + anvil_mine before each scan cycle.
D. Disable freshness check when CHAIN_ID=56 AND rpc is localhost (debug-only bypass).
Recommend A (mines 1 block every 30s in background) — keeps fork clock walking forward, matches the PR's 3s block-time spec.
Refs #52
Files: scripts/anvil_fork.sh, config/fork.toml, crates/charon-scanner/src/oracle.rs
Problem
PR description flags stale Chainlink warnings as a follow-up tweak. Reality: PriceCache rejects stale prices on every refresh. With the fork's Chainlink feeds frozen at fork time and wall clock advancing, every feed goes stale within 10 minutes (DEFAULT_MAX_AGE). Scanner degrades to zero liquidatable positions because HF math requires prices. Grafana Path B demo shows flat empty metrics — no liquidation activity.
This defeats the entire purpose of this PR.
Fix options
A. anvil_fork.sh auto-advances time periodically:
B. fork.toml profile overrides per-symbol max_age to something huge (e.g. 86400s) OR sets DEFAULT_MAX_AGE to 24h for fork profile.
C. Use anvil_increaseTime + anvil_mine before each scan cycle.
D. Disable freshness check when CHAIN_ID=56 AND rpc is localhost (debug-only bypass).
Recommend A (mines 1 block every 30s in background) — keeps fork clock walking forward, matches the PR's 3s block-time spec.