feat: add mainnet - #48
Conversation
n13
left a comment
There was a problem hiding this comment.
Reviewer model: GPT 5.6 Sol
REQUEST_CHANGES: the mainnet option targets an unavailable single-host origin, and the attempted mainnet default is overridden by the application root.
Findings:
-
[P1] Use the deployed HA GraphQL hostname before exposing mainnet —
src/components/common/network-provider/network-provider.tsx:7The new selectable endpoint currently returns HTTP 502 for both
/healthzand a minimal GraphQL query; running the repository's benchmark against it made every executable operation fail with 502. It is also theapp-1origin hostname, while the mainnet Subsquid infrastructure defines a separate public Cloudflare load-balancer hostname overapp-1andapp-2. Point this entry at the deployedload_balancer_hostnameoutput and verify the application query set there before exposing the option. Otherwise selecting mainnet is a total data outage today, and tying clients directly toapp-1defeats the provisioned failover after deployment. -
[P2] Apply the mainnet default at the provider call and handle persisted Planck selections —
src/components/common/network-provider/network-provider.tsx:44,src/providers.tsx:27Changing the component's parameter default does not change the application default because the only root call still passes
defaultNetwork="planck". A fresh browser therefore starts on Planck, and existing browsers continue readingplanckfromqube-network-planck. If this PR is intended to make mainnet the default, update the root configuration and deliberately migrate or invalidate the persisted selection; if activation is intentionally deferred, keep the provider default/fallback on Planck until that activation change.
Validation:
- Reviewed head
97ec2cda6d1b398ee5480e18b7b63c084a52af93against basef2dea016b4611b380accac529decbdbad2d5baf7. bun run build— passed locally; both GitHub checks are also green.bun run bench:graphqlagainst Planck — 24 operations passed, 3 skipped for absent sample data.- The same benchmark against the new mainnet URL — 17 operations failed with HTTP 502, 10 dependent operations skipped because bootstrap returned no data. Direct health/GraphQL probes to both mainnet app origins also returned 502.
git diff --check— passed.bun run test -- --runInBand— could not execute tests because the unchanged Jest configuration does not transform TypeScript/ESM; the PR workflow likewise has tests disabled. This is not treated as a PR-specific failure.- Prettier check — the four regenerated GraphQL files are not formatted according to the repository's pinned Prettier configuration; non-blocking relative to the runtime findings above.
n13
left a comment
There was a problem hiding this comment.
Reviewer model: GPT 5.6 Sol
REQUEST_CHANGES: route the now-default mainnet through its HA endpoint instead of a single origin.
Findings:
-
[P1] Route mainnet through the health-checked load balancer —
src/components/common/network-provider/network-provider.tsx:7This URL sends every mainnet client directly to
subsquid-mainnet-app-1. The mainnet infrastructure defines a Cloudflare load balancer over bothapp-1andapp-2, with/healthzmonitoring; both origins are currently healthy and serve the explorer's query set, but this client can never fail over toapp-2. Because this PR also makes mainnet the default, anapp-1failure or rolling restart would take the explorer offline for every fresh user even while the redundant origin remains healthy. Use the deployedload_balancer_hostname; if that hostname is not ready yet, defer the mainnet default switch until it is.
The earlier default-selection issue is fixed: the root provider now passes mainnet, and the new storage key prevents persisted Planck selections from overriding that migration. The earlier 502 outage is also resolved; both origin health and GraphQL probes now return HTTP 200.
Validation:
- Reviewed head
78a9f18b9ca4fc4aa3475608d8a86bc1a40865a5against basef2dea016b4611b380accac529decbdbad2d5baf7; both GitHub checks are green. npx --yes bun@1.2.16 run build— passed.- GraphQL benchmark against each mainnet origin — 20 operations passed and 7 data-dependent operations skipped on each origin; Planck retained 24 passing operations and 3 data-dependent skips.
- Regenerating GraphQL artifacts against mainnet produced byte-identical files;
git diff --checkpassed. - Pinned Prettier reports the four regenerated files as unformatted; non-blocking relative to the routing issue.
- Jest remains unable to parse the repository's TypeScript/ESM setup; tests are also disabled in the unchanged PR workflow, so this was not treated as PR-specific.
Summary
Added mainnet subsquid network. The network will be deployed soon.