Skip to content

Reuse pair hashes when matching a root, and page the Agents table and lobby - #319

Merged
RunTimeAdmin merged 1 commit into
mainfrom
fix/site-evidence-and-lobby
Nov 15, 2026
Merged

RunTimeAdmin merged 1 commit into
mainfrom
fix/site-evidence-and-lobby

Conversation

@RunTimeAdmin

Copy link
Copy Markdown
Owner

The site's part of findings 5 and 10 from the 15 November performance review. The oracle, contract and SDK parts are separate PRs.

What changes

5. "Check evidence" froze the page for seconds (explorer.js, agents.js)

  • matchRoot built a whole tree for every cut-off with the BigInt keccak in did.js. It now shares one memo of pair hashes across the trees of a call, skips a cut-off that keeps the same payments as the one before, and takes the leaves the agents page has already built. Its answers are unchanged (18 of 18 readings checked against the old code).
  • At 1,000 payments under Node: a root 10 payments behind is found in 0.33 s instead of 3.9 s, and a root no reading reproduces is ruled out in 0.47 s instead of 18.2 s.
  • did.js's keccak is unchanged.

10. Every registered agent cost a row, five chain reads and an animated walker (agents.js, lobby.js, lobby-scene.js, agents.html)

  • The Agents table shows 50 rows a page and reads the chain only for the rows shown.
  • The table is now in registration order, oldest first, where it was by matured score. Sorting by score needs every agent's score read before the first row is drawn, which is what paging is meant to avoid.
  • The lobby, flat and 3D, holds the first 60 agents to register. They are the table's first rows, so one read covers both, the choice is the same on every visit, and a wave of new registrations cannot push the existing agents out of the room. Today there are 46, so nothing changes yet.
  • Seated walkers are placed once and skipped each frame.
  • "N active" is shown only once every agent has been read, which is every load until there are more than 60.

Not changed: the simulation page still fetches each agent's whole evidence. It reads every payment's fields for its replay, not just a count. slashes.html keeps explorer.js?v=scores1, since another change was editing that page; it never calls matchRoot.

Tests

oracle/explorer-merkle.test.js, oracle/site-pages.test.js and oracle/lobby.test.js: 19 pass. New: the memo (fails on main at 11,933 pairs against a bound of 1,300; now 1,058) and the paging (fails on main with 130 walkers where 60 is the cap). The agents page was loaded locally against live data with no console errors: 46 agents on one page, the 3D lobby, the filters. Not checked in a browser: the pager past 50 agents, "Check evidence" (the oracle allows only sigvara.xyz), and frame cost.

🤖 Generated with Claude Code

… lobby

Findings 5 and 10 of the 15 November performance review, site part.

matchRoot built a whole tree for every candidate cut-off with the BigInt
keccak in did.js, so Check evidence froze the page for seconds on a long
payment list. It now shares one pair memo across the trees of a call,
skips a cut-off that keeps the same payments as the one before, and takes
the leaves agents.js has already built. Its answers are unchanged. At
1,000 payments under node, a root 10 payments behind is found in 0.33 s
instead of 3.9 s, and a root no reading reproduces is ruled out in 0.47 s
instead of 18.2 s.

The Agents table lists agents in the order they registered, 50 to a page,
and reads the chain only for the agents on screen, since an order by score
needs every agent read first. The lobby, flat and 3D, holds the first 60
agents to register and no longer updates seated walkers every frame.

slashes.html keeps explorer.js?v=scores1, because another branch is
changing that page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RunTimeAdmin
RunTimeAdmin merged commit 284bc36 into main Nov 15, 2026
7 checks passed
@RunTimeAdmin
RunTimeAdmin deleted the fix/site-evidence-and-lobby branch November 15, 2026 22:00
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