Repository navigation
Correct the Arbitrum fix: RPC endpoint, not block range - #21
Merged
Merged
Conversation
PR #20's max_block_range=40 was the wrong diagnosis. Measured again, more carefully: publicnode's free endpoint refuses eth_getLogs whenever toBlock is more than ~50-100 blocks behind its *live* head, regardless of range width (a 10-block, already-narrow query fails at 100 blocks behind head; a 1000-block query succeeds right at head). Since 'safe' is always confirmations(240) blocks behind head by design, every query against that endpoint was structurally unreachable — reducing the range couldn't have fixed it, and confirmed it still didn't (same error after the PR #20 deploy). Switched to Arbitrum's own public RPC (arb1.arbitrum.io/rpc), verified directly: no archive restriction, just a 10,000-matched-logs cap. max_block_range=500 measured at ~2,700 logs/1000 blocks for USDC on Arbitrum, comfortable margin. Also fixes the three house.py portfolio tests that share the same PRESETS entry: arb1.arbitrum.io's path is /rpc, not /, so the test fixtures needed a second mock registration. OPENCLAW_BRIEF.md's RPC reference table updated to match. Manually re-advanced the still-stuck ChainCursor row (chain_id=42161) via direct UPDATE to the new safe head — same nothing-to-backfill situation as before. 181 tests pass, ruff clean. Verified against the live endpoints, not just diagnosed.
alipishbin77
added a commit
that referenced
this pull request
Sep 30, 2026
Correct the Arbitrum fix: RPC endpoint, not block range
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #20, which was the wrong diagnosis. Root cause: publicnode's free Arbitrum endpoint refuses eth_getLogs whenever toBlock is more than ~50-100 blocks behind its live head, regardless of range width — confirmed narrow queries fail far from head, wide queries succeed at head. Since
safeis always 240 blocks behind head by design, no block-range tuning could have fixed this. Switched to Arbitrum's own public RPC (arb1.arbitrum.io/rpc), verified directly: no archive restriction, just a 10k-matched-logs cap, max_block_range=500 stays comfortably under it. Also fixes 3 house.py portfolio tests sharing the same PRESETS entry (different path: /rpc not /), and updates the brief's stale RPC table. 181 tests pass, ruff clean.