Problem
scripts/anvil_fork.sh launches anvil without --compute-units-per-second or --retries, so anvil's per-call concurrency saturates whatever upstream RPC it forks against. Free-tier dRPC (the script's default keyless archive) returns HTTP 429 / code: 35 Too many request on the very first burst of 48 parallel vToken.underlying() calls during Venus snapshot init.
Result of an unthrottled boot:
INFO charon_protocols::venus: Venus adapter connected
market_count=48 mapped_markets=11 <- 37 markets dropped
After adding --compute-units-per-second 80 --fork-retry-backoff 1500 --retries 15:
Two markets still dropped — but a recoverable two, not a catastrophic 37.
Impact
P1. With unthrottled defaults, ~75% of Venus markets are silently absent from the adapter snapshot. Any borrower whose collateral or debt sits in one of the dropped markets is invisible. The downstream "scanner not finding opportunities" symptom is masked because borrower-discovery is a separate gap (issue #329).
Proposed fix
ANVIL_ARGS=(
--fork-url "$RPC"
--chain-id "$CHAIN_ID"
--port "$PORT"
--host 0.0.0.0
--block-time 3
+ # Throttle upstream call rate so free-tier RPCs don't 429 us
+ # during the boot-time snapshot of Venus markets and Chainlink feeds.
+ --compute-units-per-second "${FORK_CUPS:-150}"
+ --fork-retry-backoff "${FORK_RETRY_BACKOFF:-1500}"
+ --retries "${FORK_RETRIES:-15}"
)
Override knobs already documented in the diff are intentional: keyed-tier operators want to disable the throttle.
Acceptance
- Fresh boot against unthrottled dRPC reliably maps 46+ of 48 Venus markets across three consecutive runs.
- Operator can disable via
FORK_CUPS=0 (or override to a higher value when on a keyed plan).
- Documented in the script header alongside
FORK_RPC / FORK_BLOCK.
Found during the local mainnet validation walk on 2026-04-25.
Problem
scripts/anvil_fork.shlaunches anvil without--compute-units-per-secondor--retries, so anvil's per-call concurrency saturates whatever upstream RPC it forks against. Free-tier dRPC (the script's default keyless archive) returns HTTP 429 /code: 35 Too many requeston the very first burst of 48 parallelvToken.underlying()calls during Venus snapshot init.Result of an unthrottled boot:
After adding
--compute-units-per-second 80 --fork-retry-backoff 1500 --retries 15:Two markets still dropped — but a recoverable two, not a catastrophic 37.
Impact
P1. With unthrottled defaults, ~75% of Venus markets are silently absent from the adapter snapshot. Any borrower whose collateral or debt sits in one of the dropped markets is invisible. The downstream "scanner not finding opportunities" symptom is masked because borrower-discovery is a separate gap (issue #329).
Proposed fix
ANVIL_ARGS=( --fork-url "$RPC" --chain-id "$CHAIN_ID" --port "$PORT" --host 0.0.0.0 --block-time 3 + # Throttle upstream call rate so free-tier RPCs don't 429 us + # during the boot-time snapshot of Venus markets and Chainlink feeds. + --compute-units-per-second "${FORK_CUPS:-150}" + --fork-retry-backoff "${FORK_RETRY_BACKOFF:-1500}" + --retries "${FORK_RETRIES:-15}" )Override knobs already documented in the diff are intentional: keyed-tier operators want to disable the throttle.
Acceptance
FORK_CUPS=0(or override to a higher value when on a keyed plan).FORK_RPC/FORK_BLOCK.Found during the local mainnet validation walk on 2026-04-25.