Repository navigation
Fix the oracle's part of the minor findings from the 15 November performance review - #323
Merged
Merged
Conversation
…ormance review - 13: /health sums an outcome count kept per agent list instead of recounting every payment, and asks an unreachable ERC-8004 feed again after 30 s at most, not on every request. - 15: an epoch's per-agent steps, /score and /evidence reuse a chain-clock reading up to 5 s old. - 23: the signer answers a failed chain read "chain read failed", logs the node's words without the RPC URL, and gives a request 8 s. - 24: the watcher reads at most 1 MiB of the checker's or a webhook's answer. - 25: /attest, /flag, /flag/resolve and /link answer an error their checks did not expect "bad request", and log its message. Oracle tests: 1542. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 15, 2026
RunTimeAdmin
added a commit
that referenced
this pull request
Nov 15, 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.
The oracle's part of the minor findings from the 15 November performance review (the critical ones were #311, the moderate ones #316 to #319). Each fix has a test that fails on main, run against it before committing.
What changes
13. /health recounted every payment, and asked a down ERC-8004 feed on every request (
store.js,external.js)15. An epoch's per-agent steps and the read routes read the chain's clock one round trip at a time (
chain.js,index.js)getLatestBlockTimestamp({ maxAgeMs })reuses a reading up to 5 s old where a caller allows it: the per-agent steps of an epoch, /score and /evidence. Their margins are minutes. The readings at the start of an epoch stay fresh.23. The signer sent provider error text, RPC URL included, to the publisher (
signer.js)chain read failed. The node's words are logged shortened, with the RPC URL taken out (event-index.redact, as the watcher does).24. The watcher read the checker's and the webhook's answers whole (
watcher.js)log-spans.readAnswer, as the indexer reads). The checker's /divergence page is 100 records at most.25. /attest, /flag, /flag/resolve and /link answered an error their checks did not expect with its raw message (
http-helpers.js,index.js)bad_json). Anything else is answeredbad request, and its message goes to the log only.Not done
Deploy
Both operators, when convenient. The signer and the watcher take 23 and 24 at their next deploy; every service copies
oracle/*.js, so the modules this uses ship with them.Tests
1,542 oracle tests: main had 1,535 (the documented 1,532 missed the tests #319 and #321 added), and this adds 7. README and whitepaper say 1,542. The full suite ran once locally; 43 tests failed there under load, while a forge suite ran beside it and the HTTP file's oracle missed its 21 s start window, and those six files then ran clean on their own (192 tests). New:
store.test.js: the outcome count follows a list that changes, and 200 status reads stay fast (441 ms on main).external.test.js: an unreachable feed is asked again after 30 s for /health, at once for the epoch.chain.test.js: a chain-clock reading is reused only where a caller allows it.signer.test.js: a failed chain read is answered and logged without the RPC URL.watcher.test.js: an answer over 1 MiB is refused (main accepts 2 MiB of valid JSON).http-helpers.test.js: the reply rule, and invalid JSON keeping its own words.🤖 Generated with Claude Code