Skip to content

feat: add mainnet - #48

Merged
dewabisma merged 2 commits into
mainfrom
beast/add-mainnet
Sep 9, 2026
Merged

feat: add mainnet#48
dewabisma merged 2 commits into
mainfrom
beast/add-mainnet

Conversation

@dewabisma

Copy link
Copy Markdown
Collaborator

Summary

Added mainnet subsquid network. The network will be deployed soon.

@dewabisma
dewabisma requested a review from n13 September 9, 2026 09:47

@n13 n13 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. [P1] Use the deployed HA GraphQL hostname before exposing mainnet — src/components/common/network-provider/network-provider.tsx:7

    The new selectable endpoint currently returns HTTP 502 for both /healthz and a minimal GraphQL query; running the repository's benchmark against it made every executable operation fail with 502. It is also the app-1 origin hostname, while the mainnet Subsquid infrastructure defines a separate public Cloudflare load-balancer hostname over app-1 and app-2. Point this entry at the deployed load_balancer_hostname output and verify the application query set there before exposing the option. Otherwise selecting mainnet is a total data outage today, and tying clients directly to app-1 defeats the provisioned failover after deployment.

  2. [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:27

    Changing 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 reading planck from qube-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 97ec2cda6d1b398ee5480e18b7b63c084a52af93 against base f2dea016b4611b380accac529decbdbad2d5baf7.
  • bun run build — passed locally; both GitHub checks are also green.
  • bun run bench:graphql against 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.

@dewabisma
dewabisma requested a review from n13 September 9, 2026 10:30
@dewabisma
dewabisma merged commit 5078766 into main Sep 9, 2026
2 checks passed

@n13 n13 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer model: GPT 5.6 Sol

REQUEST_CHANGES: route the now-default mainnet through its HA endpoint instead of a single origin.

Findings:

  1. [P1] Route mainnet through the health-checked load balancer — src/components/common/network-provider/network-provider.tsx:7

    This URL sends every mainnet client directly to subsquid-mainnet-app-1. The mainnet infrastructure defines a Cloudflare load balancer over both app-1 and app-2, with /healthz monitoring; both origins are currently healthy and serve the explorer's query set, but this client can never fail over to app-2. Because this PR also makes mainnet the default, an app-1 failure or rolling restart would take the explorer offline for every fresh user even while the redundant origin remains healthy. Use the deployed load_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 78a9f18b9ca4fc4aa3475608d8a86bc1a40865a5 against base f2dea016b4611b380accac529decbdbad2d5baf7; 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 --check passed.
  • 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.

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.

2 participants