Skip to content

feat(operator): integrate community KMS+DVT node onboarding portal (CC-40)#435

Open
jhfnetboy wants to merge 1 commit into
feat/cc43-ethers-viemfrom
feat/cc40-node-onboarding
Open

feat(operator): integrate community KMS+DVT node onboarding portal (CC-40)#435
jhfnetboy wants to merge 1 commit into
feat/cc43-ethers-viemfrom
feat/cc40-node-onboarding

Conversation

@jhfnetboy

Copy link
Copy Markdown
Member

What

Ports the aastar-sdk node-onboarding-portal (PR #309/#310) into YAAA as a new /operator/node-onboarding page + an operator-hub entry card. A 6-step wizard (download image → config → connect wallet → gen key → register+stake → identity) that stakes + registers a DVT node entirely in the operator's browser wallet via @aastar/sdk.

Pieces

  • lib/sdk/nodeOnboarding.ts — the single SDK/chain/key seam (ported from the portal's src/lib/sdk.ts). Only the wallet connection is YAAA-adapted (injected provider via lib/sdk/client getInjectedProvider); all business logic goes through @aastar/sdk via narrow subpaths @aastar/sdk/operator + /core (keeps node-only code out of the browser bundle).
  • app/operator/node-onboarding/page.tsxApp.tsx ported to a Next client page (Layout + .dvt-onboard root); flow logic unchanged.
  • portal.css — portal styles, every selector scoped under .dvt-onboard (no collision with YAAA Tailwind).
  • operator hub: 4th entry card (grid → 4-up); i18n zh/en card copy.

Codex review (2 rounds)

Round 1 → CHANGES REQUESTED (3 findings, all latent in the ported portal code) → fixed → round 2 APPROVE:

  1. BLS keygen was mod r biased → now delegates to the shared, rejection-sampled generateBlsSecretKey (dvtOperator.ts).
  2. kmsPopSigner was a local /pop fetch → now imports the SDK's kmsPopSigner (key pinning + PoP verification + local nodeId derivation), preserving the "all through @aastar/sdk" invariant.
  3. KMS-TEE path now truly gated: KMS_TEE_READY = false blocks submission with a clear CC-37-pending error before any chain call, and the UI hides the submit buttons for that mode. Local/HSM path unaffected.

Behavior

Local/HSM key node registration works today; KMS-TEE key-less path is gated on CC-37 (KMS /pop), flip KMS_TEE_READY when it ships. Needs @aastar/sdk ^0.43.0 (already on it).

Gates

frontend type-check + lint --max-warnings 0 + build (/operator/node-onboarding prerendered static, no child_process/node-builtin leak in the browser bundle).

Note

Stacked on feat/cc43-ethers-viemfeat/cc33-credibility-pagechore/bump-sdk-0.43.0. Wizard body keeps the portal's Chinese copy (faithful port); full body i18n is a follow-up.

https://claude.ai/code/session_01RajETCvboSvhadpqMbekNx

…C-40)

Ports the aastar-sdk node-onboarding-portal (PR #309/#310, headless Playwright +
on-chain E2E verified) into YAAA as a new /operator/node-onboarding page + an
operator-hub entry card. The 6-step wizard (download image → config → connect
wallet → gen key → register+stake → identity) stakes + registers a DVT node
entirely in the operator's browser wallet via @aastar/sdk.

- lib/sdk/nodeOnboarding.ts — the single SDK/chain/key seam, ported from the
  portal's src/lib/sdk.ts. Only the wallet connection is YAAA-adapted: it sources
  the injected provider via YAAA's lib/sdk/client (getInjectedProvider) instead of
  the portal's own window.ethereum glue; all business logic stays in @aastar/sdk
  (onboardDvtNode / buildDvtPop / kmsPopSigner). NARROW subpaths
  @aastar/sdk/operator + /core (not the umbrella barrel) keep node-only code out
  of the browser bundle.
- app/operator/node-onboarding/page.tsx — App.tsx ported to a Next client page
  (Layout + .dvt-onboard root); flow logic unchanged ("页面只串线"). Local/HSM
  key path works now; KMS-TEE key-less path is gated on CC-37 (KMS /pop) and
  surfaces a pending error until that endpoint is live.
- portal.css — the portal styles, every selector scoped under .dvt-onboard so
  its semantic class names can't collide with YAAA's Tailwind.
- operator hub: 4th entry card (grid → 4-up); i18n zh/en card copy.

Needs @aastar/sdk ^0.43.0 (0.42.0's /operator had a child_process → browser
bundle regression; 0.43.0 fixed it + added kmsPopSigner) — already on 0.43.0.

Gates: frontend type-check + lint --max-warnings 0 + build
(/operator/node-onboarding prerendered static, NO child_process/node-builtin
leak in the browser bundle).

Note: the wizard body keeps the portal's Chinese copy (faithful port); full
body i18n is a follow-up — this change i18n's the hub entry card.

Claude-Session: https://claude.ai/code/session_01RajETCvboSvhadpqMbekNx
@jhfnetboy
jhfnetboy requested a review from fanhousanbu as a code owner July 14, 2026 08:14
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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