Skip to content

feat(bench-001): add GMGN as a provider (Solana-only) + sync harness - #168

Merged
Flotapponnier merged 2 commits into
devfrom
feat/add-gmgn-bench-001
May 29, 2026
Merged

feat(bench-001): add GMGN as a provider (Solana-only) + sync harness#168
Flotapponnier merged 2 commits into
devfrom
feat/add-gmgn-bench-001

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Ships GMGN as the 4th provider on the head-lag bench. Bench-001 already has Mobula, Codex, GeckoTerminal — GMGN clocks ~115 ms head-lag p50 across the 3 regions (validated in mobula-api/miniapps/aggregator-head-lag deploy).

YAML changes (benchmarks/aggregator-head-lag.yml)

  • New gmgn provider entry with tag "WebSocket feed (Solana only)".
  • Queries deliberately omit chain=. lib/spec.ts injectLabels will add chain=base / chain=bnb on those tabs → Prom returns empty → tryLoadLive skips the provider → GMGN auto-hidden on non-Solana tabs. "All chains" + "Solana" tabs show the provider.
  • Methodology + cardinality lines updated to acknowledge the 4th provider and its chain restriction.

Harness sync (harnesses/aggregator-head-lag/)
The OCB public harness was stale vs the deployed mobula-api/miniapps version. Re-syncs:

  • gmgn_monitor.go (new): chromedp cf_clearance mint → utls HelloChrome_120 ClientHello with ALPN forced to http/1.1 → WS subscribe chain_stat → parse gk="s" rs/sc fields → emit head_lag_seconds{aggregator="gmgn",chain="solana"}.
  • Dockerfile: chromium + minimal X/font libs (~200 MB image bump, idle when GMGN_ENABLED!=true).
  • go.mod / go.sum: utls + chromedp/fetch deps.
  • config.go, main.go, log_buffer.go synced with the private dir.
  • .gitignore extended to drop the local ./script build artifact.

Validated locally: bun run validate, bun run typecheck, spec tests all green; harness go build ./cmd/script clean.

GMGN's WebSocket pushes Solana chain-tip events (channel=chain_stat, gk='s', rs=ms:slot) sub-second. Adds it as the 4th provider on the head-lag bench.

YAML:
- New provider entry; queries deliberately omit chain= so per-tab filters auto-hide GMGN on Base/BNB and surface it on All/Solana.
- Methodology + cardinality lines updated.

Harness sync (matches private mobula-api/miniapps/aggregator-head-lag):
- gmgn_monitor.go: chromedp cf_clearance mint + utls HelloChrome_120 ClientHello (h1-only ALPN) + WS subscribe + slot-event parser.
- Dockerfile: chromium + minimal X/font libs for chromedp.
- go.mod: utls + chromedp deps.
- log_buffer.go, config.go, main.go: GMGN_PROXY env + startup banner + goroutine launch.

Validated: bun run validate, typecheck, spec tests all green.
@Flotapponnier
Flotapponnier merged commit 1abb424 into dev May 29, 2026
1 check failed
@Flotapponnier
Flotapponnier deleted the feat/add-gmgn-bench-001 branch June 9, 2026 21:41
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