Repository navigation
Try a node that refuses for its rate limit for longer, within a bound - #329
Merged
Merged
Conversation
#318 stopped ethers retrying an HTTP 429 inside each read, leaving retries to readWithBackoff: four tries over 3.5 s. The checker's node answers a burst with HTTP 429 and -32005, and since the deploy the checker has left 2 to 4 agents unread each hourly epoch. A rate-limit refusal is now tried up to 7 times, the wait doubling to at most 8 s and jittered, about 24 s at most; every other failure keeps four tries. isRateLimited moves to read-retry.js, unchanged, so readWithBackoff can ask it. The keeper's process tests load a shim that cuts long waits, so a run that fails only after the whole schedule does not stretch the test. Oracle tests: 1545 (the documented 1544 counted a failed test file as a test). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
#318 (finding 7) stopped ethers retrying an HTTP 429 inside each read, so a throttling node could no longer hold /score and /attest for minutes. Retries were left to
readWithBackoff: four tries over 3.5 s. That is too short for the checker's node,rpc.quicknode.testnet.arc.io, which answers a burst with HTTP 429 and-32005 rate limit exceeded. Since the deploy the checker has left 2 to 4 agents unread each hourly epoch, and 10 to 34 at a restart: 52 of its retries and 9 of its agent errors were that refusal. The primary's node answers its rate limit inside a 200, which was already retried, and is unaffected.What changes (
read-retry.js,chain.js)isRateLimitedmoves fromchain.jstoread-retry.jsunchanged, sinceread-retry.jscannot loadchain.js.chain.jsimports it and still exports it.readWithBackofftakes an optional{ pause, random }, so the schedule can be tested without waiting.Tests
chain.test.jsadds two tests, both failing on main:-32005nested as ethers nests it counts as a rate limit, the schedule ends after 7 tries, and any other failure keeps 4.keeper.test.js: the keeper's process tests loadtest-support/fast-retry.js, which cuts waits of 250 ms or more to 10 ms. A keeper whose node refuses every read now fails each run only after the whole schedule, and six such runs no longer fit the test's minute. The production schedule is unchanged.1,545 oracle tests: the full suite ran once, with one failure, that keeper test, which then passed with the shim (56 keeper tests). The documented 1,544 was one too many, because the minor round's run counted a failed test file as a test.
Deploy
Both operators. The checker is the one that needs it. The services pick it up at their next deploy.
🤖 Generated with Claude Code