Skip to content

Time out the app and testnet pages' RPC reads after 20 seconds - #325

Merged
RunTimeAdmin merged 2 commits into
mainfrom
fix/site-read-timeouts
Nov 15, 2026
Merged

RunTimeAdmin merged 2 commits into
mainfrom
fix/site-read-timeouts

Conversation

@RunTimeAdmin

Copy link
Copy Markdown
Owner

The site's part of the minor findings (22) from the 15 November performance review.

22. Two site pages read the RPC with no timeout (app.js, testnet.js)

A node that accepted the connection and never answered left the app and testnet pages waiting with no message. Both now abort a read that has not finished in 20 s, body included, the limit the epochs page already uses, and show it where each page already reports a failed read ("RPC read failed: ...", "lookup failed: ...", "read failed: the RPC did not answer within 20 seconds"). app.js and testnet.js are at ?v=timeout1 on the only page that loads each.

Not done: batching app.js's startup reads. symbol() and decimals() read the token address svr() returns, so they cannot go in one batch with it; with the fee registry off, as on this deploy, only those two go out at load.

Tests

oracle/site-app.test.js and oracle/site-pages.test.js: 13 pass. Each new test fails on main: the app's read at load never ends, and the testnet card stays at "reading chain". Served locally under the production CSP: /testnet filled all five steps from the live RPC, /app's startup reads and a lookup completed, with no console errors. This adds 2 oracle tests; the documented count is reconciled when the PRs that change it are merged.

🤖 Generated with Claude Code

RunTimeAdmin and others added 2 commits November 15, 2026 17:09
A node that accepted the connection and never answered left /app and
/testnet waiting with no message (finding 22 of the 15 November
performance review). Each page now aborts a read that has not finished in
20 s, body included, as the epochs page does, and reports it where it
reports any failed read: the log on /app, the card on /testnet.

The startup reads in app.js stay as they are. symbol() and decimals() are
read from the token address that svr() returns when the fee registry is
live, so the four cannot go in one batch.

Both scripts are bumped to ?v=timeout1. One regression test per page
fails on the old code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…44 [skip ci]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RunTimeAdmin

Copy link
Copy Markdown
Owner Author

Refreshed by merging main (#323, #324, #327) with no conflicts, and the oracle count set to 1544 for the two tests this adds; the refresh commit carries [skip ci]. Every job passed on 82df330; site-app.test.js and site-pages.test.js (13) and check-docs pass on the merged tree.

@RunTimeAdmin
RunTimeAdmin merged commit 489372c into main Nov 15, 2026
2 checks passed
@RunTimeAdmin
RunTimeAdmin deleted the fix/site-read-timeouts branch November 15, 2026 23:47
RunTimeAdmin added a commit that referenced this pull request Nov 15, 2026
Main brought #323, #324, #325 and #327; the only conflict was the test-count paragraph in README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant