Skip to content

feat(nodes): jobs by type, run time, earnings vs est. power per node on /nodes - #363

Merged
ralyodio merged 1 commit into
masterfrom
feat/nodes-jobs-earnings
Nov 14, 2026
Merged

ralyodio merged 1 commit into
masterfrom
feat/nodes-jobs-earnings

Conversation

@ralyodio

Copy link
Copy Markdown
Collaborator

Shows prospective operators what nodes actually run and earn, to help convert visitors into node runners.

Aggregator (status_aggregator.rs): the job tracker already correlated JobAccept → JobReceipt, but only network-wide. It now keeps the accepted winner and agreed price per in-flight job and credits a completion to that node only when the receipt comes from the accepted peer. GET /nodes rows gain jobs_24h: { jobs, busy_s, paid_usd, by_type: { <workload>: { jobs, busy_s, paid_usd } } } (omitted when zero). Anyone can gossip an accept, so prices are capped at $1,000/job and non-finite ones count as 0. No protocol change; in-memory 24h window like the existing counters.

c0mpute.com/nodes:

  • New section last 24h: what nodes earned, by job type: headline (N nodes ran M jobs and kept $X after the 5% fee), then per type: jobs, nodes, avg run time, avg price, node keeps / job, node keeps / busy hour.
  • Board gains columns: jobs 24h (with top 3 types), busy, earned (95%), est. power, net.
  • Power estimate: 65 W CPU / 250 W GPU / 40 W Apple while busy at $0.17/kWh, labelled as a typical figure, not a measurement.

Tests: new completions_credit_the_accepted_worker_by_type (credit by type, forged-price cap, receipt from a non-winner credits nobody). Web tsc --noEmit clean.

🤖 Generated with Claude Code

…on /nodes

The status aggregator already correlated JobAccept -> JobReceipt but only
network-wide. It now remembers the accepted winner and agreed price, credits a
completed job to that node only when the receipt comes from the same peer, and
GET /nodes carries jobs_24h {jobs, busy_s, paid_usd, by_type} per row.
Prices are capped and non-finite ones credited as 0, since anyone can gossip
an accept.

c0mpute.com/nodes shows a network table by job type (jobs, nodes, avg run
time, avg price, what the node keeps per job and per busy hour) and per-node
columns: jobs 24h with top types, busy time, earned after the 5% fee,
estimated power cost and net.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

14 finding(s)

HIGH/CRITICAL: 2 | MEDIUM: 8 | LOW: 4

Severity Rule Location
HIGH js-ssrf-outbound-request apps/web/public/sw.js:24
HIGH sh-remote-script-execution scripts/install.sh:606
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:53
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:109
MEDIUM sql-template-interpolation apps/web/src/lib/chat/convo-store.ts:116
MEDIUM sql-template-interpolation apps/web/src/lib/chat/convo-store.ts:117
MEDIUM sql-template-interpolation apps/web/src/lib/chat/push.ts:476
MEDIUM js-dynamic-code-execution apps/web/src/lib/router/verify.ts:91
MEDIUM sh-remote-script-execution scripts/dev-setup.sh:25
MEDIUM sh-eval-expansion scripts/dev-setup.sh:35
LOW py-ssrf-outbound-request examples/business-strategist-agent/chat.py:37
LOW py-ssrf-outbound-request examples/business-strategist-agent/train.py:54
LOW secret-generic-credential node/crates/c0mpute-core/src/webhook.rs:1171
LOW py-path-traversal node/crates/c0mpute-core/tests/fixtures/fake-infernet-text:29

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 3ba13c9 into master Nov 14, 2026
12 checks passed
@ralyodio
ralyodio deleted the feat/nodes-jobs-earnings branch November 14, 2026 03:32
ralyodio added a commit that referenced this pull request Nov 14, 2026
Each status aggregator keeps its 24h job window in memory, and the board took
one aggregator's answer whole (the one seeing the most workers). The dev2
aggregator restarts on every web deploy, so the jobs/earnings columns reset to
zero even while the vienna seed still held the whole day. getNodesPayload now
reads every aggregator and overlays each node's jobs_24h from whichever counted
the most jobs for it.

Bumps to 0.3.66 so the seed aggregators (release binaries) start computing
jobs_24h too (from #363).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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