feat: add the Sapphire testnet - #199
Merged
Merged
Conversation
Vetting Sapphire's indexer meant editing a hardcoded NETWORK constant to point the checks at it and then remembering to put it back. The next network should not need that: LIVE_INDEXER=1 LIVE_INDEXER_ID=sapphire \ LIVE_INDEXER_URL=https://indexer.sapphire.testnets.gno.land/graphql/query \ pnpm --filter @gnomputer/rpc exec vitest run src/live-schema-check.test.ts All six checks pass against Sapphire, which is the evidence behind the indexer.read capability in this PR. A newly launched chain is exactly where this earns its keep: a field the indexer has not started emitting yet reads identically to one it never will, and both break parsing the same way.
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.
Adds Sapphire to the network registry. Topaz stays the default — a new
network should be selectable, not imposed on anyone mid-session.
One correction to the announced endpoints
The announcement gives the tx-indexer as
https://indexer.sapphire.testnets.gno.land/graphql. That path serves theGraphQL playground — an HTML page. Pointing the app at it would have fed
markup to a JSON parser, surfacing as the "returned a non-JSON response"
error rather than anything that names the real cause.
The API is
/graphql/query, the same convention Topaz already uses:There's a regression test pinning the
/graphql/querysuffix.Everything verified live, not assumed
sapphire-1, v1.0.0-rc.0, height 32k+access-control-allow-origin: *— ADR-018 holds here tooBankMsgSend,MsgCall,MsgAddPackage,MsgRun) across 48 txsThen end-to-end in the app against the live chain:
Sapphire (official testnet), live height ticking.fee and hash — 300 being one of the announced faucet drips. This exercises
yesterday's
blockTransactionsquery against a second indexer, which isthe main thing that could have differed.
vm/qpathsprobe exactly, so the split holds on a chain with a very different mix
from Topaz's 196/145.
persistence: "rolling"Assumed, matching Topaz. Nothing in the announcement states a retention
policy, and rolling is the conservative claim — it warns that history may
not go back forever rather than promising it does. Worth correcting if the
real policy is known.
Why an e2e test changed
custom-network-probe.spec.tsasserted the network dropdown had exactly 3options. Its actual intent is "the bogus endpoint was not added"; the
literal made it a second, accidental assertion about how many networks ship
by default, which a fourth network breaks. It now captures the count before
the attempt and asserts it is unchanged — same intent, and it won't break
on the next testnet.
Gates
typecheck, lint, 467 web unit tests (+7 in
@gnomputer/networks), build,88 e2e. Bundle 383.2KB / 388KB.