Skip to content

fix(rpc): make live RPC examples evergreen (74/80 pass, was 41)#34

Merged
mikedotexe merged 4 commits into
mainfrom
fix/rpc-examples-evergreen
Jul 24, 2026
Merged

fix(rpc): make live RPC examples evergreen (74/80 pass, was 41)#34
mikedotexe merged 4 commits into
mainfrom
fix/rpc-examples-evergreen

Conversation

@mikedotexe

Copy link
Copy Markdown
Collaborator

Problem

About half the RPC operation "Send request" examples were broken. They pinned specific historical references (block/chunk/receipt/tx/epoch) that the public non-archival RPC garbage-collects after a few epochs — so clicking Send returned UNKNOWN_BLOCK / UNKNOWN_CHUNK / UNKNOWN_RECEIPT / UNKNOWN_EPOCH or timed out. They worked when authored, then rotted.

Verified with a live harness firing every example's exact body at its endpoint: 41/80 example requests passing before this change.

Fix (all verified live — now 74/80 pass)

Fix Ops
Archival endpoints (never GC) block-by-id/height, chunk-by-hash, chunk-by-block-shard, gas-price-by-block, congestion-level, receipt, receipt-to-tx, tx-status, EXPERIMENTAL-tx-status, validators-ordered, validators-by-epoch, light-client-block-proof, next-light-client-block, light-client-proof ×2
finality:"final" (latest, evergreen) block_effects
type: receipttransaction (fields matched transaction) light_client_proof, EXPERIMENTAL_light_client_proof
Real params + block_height anchor EXPERIMENTAL_receipt_to_tx (both nets)
Fresh testnet epoch (testnet reset) validators_by_epoch (testnet)
Small contract (was TOO_LARGE) view_state (testnet → counter.testnet)

The remaining 6 "failures" are write methods (broadcast_tx_async/commit, send_tx) that inherently need a real one-time signed transaction — mike-docs already treats them as shape-only. health returns a valid null.

How

Root fix is in mike-docs (per-op rpcs/*.yaml servers: + example params, mirrored in scripts/rpc-example-config.js so refresh-examples keeps them). This PR is the regenerated + vendored generatedFastnearPageModels.json.

Paired source branch: mike-docs fix/rpc-examples-evergreen.

Validation

  • yarn ci:locale-quality — green (en+ru build + page-model audit 79/79 + indexing)
  • Live harness: 74/80 example requests return a valid response (was 41)

🤖 Generated with Claude Code

https://claude.ai/code/session_01H8DjaLbA7Ed63XuSAENrJ7

…ints + param fixes)

Regenerated src/data/generatedFastnearPageModels.json from the paired mike-docs
change. ~Half the RPC "Send request" examples had rotted — they pinned historical
block/chunk/receipt/tx/epoch references that the public non-archival RPC
garbage-collects, so clicking Send returned UNKNOWN_BLOCK/CHUNK/RECEIPT/EPOCH or
timed out. Historical lookups now point at the archival endpoints (never GC),
block_effects uses finality:"final", light_client_proof uses the correct
type:transaction, and receipt_to_tx/validators_by_epoch/view_state got real
resolvable params.

Verified live: 74/80 example requests now succeed (was 41); the remaining 6 are
write methods (broadcast_tx_*, send_tx) that require a real signed transaction.

Paired source PR: mike-docs branch fix/rpc-examples-evergreen.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8DjaLbA7Ed63XuSAENrJ7
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploying builder-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: adeddb8
Status: ✅  Deploy successful!
Preview URL: https://e2a30017.builder-docs.pages.dev
Branch Preview URL: https://fix-rpc-examples-evergreen.builder-docs.pages.dev

View logs

mikedotexe and others added 3 commits July 24, 2026 09:38
Regenerated from the paired mike-docs change: the send_tx example's
signed_tx_base64 was the literal "ExampleBase64EncodedTransaction" (base64
PARSE_ERROR). It now carries a real, well-formed Borsh SignedTransaction, so
clicking Send returns a meaningful InvalidTxError (AccessKeyNotFound, HTTP 200)
instead of a parse failure. It still can't succeed — a live signed tx is
single-use — but the response now shows real transaction validation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8DjaLbA7Ed63XuSAENrJ7
… signed txs

Regenerated from the paired mike-docs change: both broadcast examples previously
failed with base64 PARSE_ERROR; they now carry real Borsh SignedTransactions.
broadcast_tx_async returns the submitted tx hash (fire-and-forget);
broadcast_tx_commit returns a meaningful AccessKeyNotFound. With send_tx, all
three mutating methods are now parse-clean and honest to their contracts.
Regenerated from mike-docs: restores the light_client_proof `type` enum to
[transaction, receipt] and the fuller proof-subject description, converging the
vendored source with origin/main. Enum/description-only change; example harness
holds at 74/80.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8DjaLbA7Ed63XuSAENrJ7
@mikedotexe
mikedotexe merged commit efe29ba into main Jul 24, 2026
2 checks passed
@mikedotexe
mikedotexe deleted the fix/rpc-examples-evergreen branch July 24, 2026 20:21
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