fix(#76): structured errors for local eth_getLogs + gasPrice premium - #143
Merged
Conversation
- Raise localGetLogsMaxRange from 2880 (24h) to 20160 (~7d at 30s blocks) so first-boot Curio watchers can backfill a weekly window without chunking. Full-tier retention supports this; PDP/Light tiers still benefit for anything inside their retention window. - Introduce ErrLocalRangeTooWide + ErrLocalOutOfRetention. When the local path bails out and the VM bridge is NOT configured, surface the specific reason instead of masking it as 'FEVM method requires --vm-bridge-rpc'. That mask stays correct for genuinely-FEVM methods (e.g. eth_call, #74 parity) but was misleading for eth_getLogs, where the client can almost always chunk and get a served answer. - EthGasPrice now returns parentBaseFee + gasPremium (nblocksincl=10) mirroring lotus. Fixes ~14% gasPrice-vs-Glif underprice observed on 2026-07-23 that could make tx builders stall during base-fee spikes. Reduces the confusing 'daemon unavailable to Curio' failure mode Rabinovitch reported today: an in-retention address-filtered query succeeds locally; an out-of-window query returns a truthful reason the caller can react to.
This was referenced Jul 23, 2026
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.
See commit message. Ships as v1.9.1 once green.
What:
localGetLogsMaxRangeraised from 24h to 7d.ErrLocalRangeTooWide/ErrLocalOutOfRetention— surfaced to bridge-off clients instead of the misleadingFEVM method requires --vm-bridge-rpc.EthGasPricenow returns base-fee + gas-premium (mirrors lotus).Why: today Rabinovitch reported his lantern demon 'suddenly became unavailable to Curio.' Diagnosis in
~/.openclaw/workspace/projects/lantern-internal-notes/rabinovitch-reply-draft-2026-07-23.md. His node was stale, but even fresh it would have served him misleading error text for a chunk of Curio's watcher queries.Test evidence (from live mainnet on node2 today):
eth_getCodeon 0xd44bf…f668f7: 15,930-byte match with Glif ✅eth_getLogsin-retention address-filtered: matches Glif (both 0 in the test range) ✅eth_getLogs500 epochs back (out-of-retention) → previously masked as 'requires --vm-bridge-rpc'; now returns ErrLocalOutOfRetention ✅eth_gasPrice14% low vs Glif (0x5e7f5d vs 0x6c1438) — this fix closes the deltaFollow-ups NOT in this PR:
nblocksincltuning if 10 turns out wrong for Curio's writers.