fix(rpc): make live RPC examples evergreen (74/80 pass, was 41)#34
Merged
Conversation
…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
Deploying builder-docs with
|
| 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 |
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
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.
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_EPOCHor 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)
finality:"final"(latest, evergreen)type: receipt→transaction(fields matched transaction)block_heightanchorTOO_LARGE)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.healthreturns a validnull.How
Root fix is in mike-docs (per-op
rpcs/*.yamlservers:+ example params, mirrored inscripts/rpc-example-config.jssorefresh-exampleskeeps them). This PR is the regenerated + vendoredgeneratedFastnearPageModels.json.Paired source branch:
mike-docsfix/rpc-examples-evergreen.Validation
yarn ci:locale-quality— green (en+ru build + page-model audit 79/79 + indexing)🤖 Generated with Claude Code
https://claude.ai/code/session_01H8DjaLbA7Ed63XuSAENrJ7