Skip to content

feat(node): add node status overview#48

Open
philippWassibauer wants to merge 8 commits into
masterfrom
split/node-status-overview-stacked
Open

feat(node): add node status overview#48
philippWassibauer wants to merge 8 commits into
masterfrom
split/node-status-overview-stacked

Conversation

@philippWassibauer
Copy link
Copy Markdown
Contributor

Adds node status overview to the crunch page.

…hain

The coordinator node generates checkpoints automatically from
snapshots/predictions. This adds the ability to fetch those pending
checkpoints and submit them on-chain from the platform UI.

Flow:
1. Node creates checkpoints periodically (status=PENDING)
2. Checkpoints page fetches pending checkpoints from node report API
3. Each pending checkpoint shows the prize breakdown (ranked models + amounts)
4. Coordinator clicks 'Submit On-Chain' to sign and execute the transaction
5. After success, confirms back to the node with the tx hash

New files:
- domain/nodeTypes.ts — types for node checkpoint/emission data
- infrastructure/nodeService.ts — fetches from node via Hub proxy
- hooks/useGetPendingNodeCheckpoints — polls for PENDING checkpoints
- hooks/useSubmitNodeCheckpoint — converts emission→prizes, submits on-chain
- ui/pendingNodeCheckpoints — card UI with prize breakdown table

The pending checkpoints appear above the existing on-chain checkpoint list
on the checkpoints page. If the node API is unreachable, the section
silently hides (existing manual flow still works).
- Rewire CreateCheckpoint to POST prizes to node API (saves as PENDING)
  instead of going directly on-chain
- Add createNodeCheckpoint to nodeService
- Add next.config.ts rewrites to proxy /api/crunches/{name}/reports/*
  to the node report worker at localhost:8000

Flow is now: enter prizes → Save Checkpoint (→ node DB) →
redirect to checkpoints page → review → Submit On-Chain
…point page

Only automatic node-generated checkpoints flow through the pending →
submit on-chain path. Hugo's original manual create-checkpoint page
stays as-is (direct on-chain).
- SettleCheckpointDialog shows checkpoint details (period, models,
  snapshots, payout) and a prize breakdown table before settling
- Clicking 'Settle On-Chain' signs the tx, confirms to node (SUBMITTED),
  then transitions to CLAIMABLE
- PendingNodeCheckpoints is now a table with a 'Settle' button per row
  that opens the dialog
- Added updateNodeCheckpointStatus to nodeService for SUBMITTED→CLAIMABLE
- Added payout column (total USDC) and improved claimed column (X/Y ✓)
- Added 'Details' button per row that expands a detail card below
- Detail card shows: total payout, cruncher count, claimed count
- Prize breakdown table: cruncher address (linked to explorer),
  prize amount in USDC, claimed/unclaimed badge
- Renamed header to 'On-Chain Checkpoints' for clarity vs pending
Shows live coordinator node status on the crunch overview page:
- Online/Offline badge (polls healthz every 15s)
- Model count with names
- Feed count with source/subject and record counts
- Feed freshness (time since last data point)
- Snapshot count with latest timestamp
- Checkpoint count with pending settlement count
- Multi-feed display when multiple feeds are active

Gracefully hides when node is unreachable.
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
coordinator-webapp Ignored Ignored Mar 4, 2026 3:54pm

Request Review

Base automatically changed from feat/checkpoint-node-integration to master March 4, 2026 15:46
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