Skip to content

fix: default display/unverified reads to include_proof:false - #10

Merged
pauldelucia merged 1 commit into
masterfrom
fix/proof-off-default-reads
Jul 7, 2026
Merged

pauldelucia merged 1 commit into
masterfrom
fix/proof-off-default-reads

Conversation

@pauldelucia

Copy link
Copy Markdown
Contributor

What & why

Plain display reads omitted include_proof, and the server defaults an absent flag to true — so every display read paid per-entity Merkle proving plus the proof-consistency retry loop (measured ~22× bytes, 2–4× latency on an idle indexer) and then discarded a proof it never verified. This sends include_proof: false explicitly on the display read path.

Verification APIs are untouched and still fail closed: verified query()/getData(), queryHistoricalVerified(), verifiable-rpc and eth-state all still request and verify proofs.

This repo

  • graphqlQuery() now sets include_proof: options?.includeProof ?? false on the POST body (previously omitted the field entirely — mirrors sqlQuery(), which was already correct).
  • GraphQLQueryOptions gains an includeProof?: boolean opt-in so callers can turn proofs back on.

Verification

tsc --noEmit and npm run build clean; jest 17/17 pass, including a new routing.test.ts case asserting the serialized POST body carries include_proof:false by default and true when opted in. No verification API changed.

Closes the "SDK display reads: pass include_proof: false" task.

🤖 Generated with Claude Code

graphqlQuery() now sends include_proof:false on the POST body by default (previously omitted; the server defaults an absent flag to true, so display reads paid per-entity Merkle proving + the proof-consistency retry loop, ~22x bytes and 2-4x latency, then discarded the proof). Adds an includeProof opt-in on GraphQLQueryOptions. Verification APIs (verified query()/getData(), queryHistoricalVerified(), verifiable-rpc, eth-state) are unchanged and still fail closed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pauldelucia
pauldelucia merged commit 0e56340 into master Jul 7, 2026
3 checks passed
@pauldelucia
pauldelucia deleted the fix/proof-off-default-reads branch July 7, 2026 06:26
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