feat(node): add node status overview#48
Open
philippWassibauer wants to merge 8 commits into
Open
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds node status overview to the crunch page.