Repository navigation
Match evidence roots through one pair memo, and ask the RPC its chain once - #317
Merged
Merged
Conversation
matchEvidenceRoot hashes every tree it tries through one memo of pairs, skips a cut-off that counts the same payments as the one before, and stops at a budget of pairs actually hashed. sigvara_verify_evidence tries 64 cut-offs again within 20,000 hashes, so a finalized root ten payments behind a list of 2,000 is reproduced, after 2,064 hashes, where the old bound gave up after 11,984. The verifier's provider uses staticNetwork and asks eth_chainId once, before its first read, refusing a node on another chain: a first sigvara_check_agent makes 14 calls, one of them eth_chainId, where it made 18 with five. 376 SDK tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main brought #316, whose test counts share a README paragraph with this branch's. The version moves in package.json, the lockfile and server.json; the README's "use alpha.20" lines follow once alpha.21 is on npm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Refreshed by merging main (#316) and bumping the SDK to 1.0.0-alpha.21 in package.json, the lockfile and server.json. The refresh commit carries [skip ci]: every job passed on 56be686, main's part was tested on #316, the only conflict was the README test-count paragraph, and the two SDK test files that read the version files pass locally (60 tests). |
This was referenced 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 SDK's part of findings 5 and 7 from the 15 November performance review. The oracle, contract and site parts are separate PRs.
What changes
5.
sigvara_verify_evidencecalled a busy agent's root "not reproduced" (evidence.ts,mcp.ts)matchEvidenceRootnow hashes every tree it tries through one memo of pairs, skips a cut-off that counts the same payments as the one before, and takeshashBudget(pairs hashed, after which no further cut-off is tried, though the first always is) andmemo(shared by matches over one list).7. Every wave of reads carried an eth_chainId (
verifier.ts,mcp.ts)staticNetworkand asks the node its chain once, before the first read. Before, ethers asked with every wave: 21 to 29% of the SDK's calls.sigvara_check_agentmakes 14 calls, one of themeth_chainId, where it made 18 with five; later calls ask none.chainIdrefuses every read from an RPC serving another chain, with aNETWORK_ERRORnaming both. Before, only the MCP server compared. A failed ask is asked again on the next read.getRpcChainId(), which the MCP server's chain check now uses, so the two checks are one call.rpcChainIdmoved to the verifier and is still exported fromdist/mcp.timeoutMs, 30 s); unchanged.CHANGELOG.mdhas an1.0.0-alpha.21entry;package.jsonis not bumped, so nothing is published by merging.Tests
385 SDK tests: 376 pass and 9 skip (README and whitepaper updated); build and typecheck pass. New: the ten-behind match through the MCP tool, the budget on a list that matches nothing, memo growth and sharing, eth_chainId counted during
sigvara_check_agent, and the verifier asking once, again after a failure, and refusing another chain. The first two counting tests fail on main (reproduced: false; 8eth_chainIdwhere 1 is expected).Not changed: the tool still builds
rebuiltRootand the proof layers without the memo, two more trees per call.🤖 Generated with Claude Code