Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ members = [
]

[workspace.package]
version = "0.2.42"
version = "0.2.43"
edition = "2024"
license = "MIT"
repository = "https://github.com/profullstack/c0mpute"
Expand Down
2 changes: 1 addition & 1 deletion apps/tui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@c0mpute/tui",
"version": "0.2.42",
"version": "0.2.43",
"private": true,
"type": "module",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c0mpute",
"version": "0.2.42",
"version": "0.2.43",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/releases/latest.json/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const dynamic = "force-dynamic";
* this in sync with the workspace version in `Cargo.toml` on each release so a
* freshly built CLI reports "already latest" rather than a phantom upgrade.
*/
const FALLBACK_VERSION = "0.2.42";
const FALLBACK_VERSION = "0.2.43";
const FALLBACK_MIN_REQUIRED = "0.0.1";

type Channel = "stable" | "beta" | "nightly";
Expand Down
11 changes: 11 additions & 0 deletions node/crates/c0mpute-bench/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,17 @@ fn host_info() -> (String, String, Option<u64>) {
(cpu, kernel, ram_bytes)
}

/// Current public host hardware summary for capability adverts. Bench reports
/// remain the source of performance results, but this lets unbenchmarked nodes
/// publish CPU, core count and installed memory too.
pub fn hardware_summary() -> (String, usize, Option<u64>) {
let (cpu, _kernel, ram_bytes) = host_info();
let cores = std::thread::available_parallelism()
.map(|n| n.get())
.unwrap_or(1);
(cpu, cores, ram_bytes)
}

fn rfc3339_now() -> String {
let secs = SystemTime::now()
.duration_since(UNIX_EPOCH)
Expand Down
1 change: 1 addition & 0 deletions node/crates/c0mpute-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ enum Cmd {
/// Benchmark this machine (fib / matmul / hash at 1…N threads) and record
/// a score the worker advertises to the network. Report lands in
/// `<data-dir>/bench.json`, same shape as fleetcode's runtime-benchmarks.
#[command(alias = "benchmark")]
Bench {
#[command(subcommand)]
cmd: Option<BenchCmd>,
Expand Down
11 changes: 6 additions & 5 deletions node/crates/c0mpute-core/src/capabilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,13 @@ pub fn hardware_blob(config: &Config) -> serde_json::Value {
"version": env!("CARGO_PKG_VERSION"),
"free_disk_root": config.storage.root.display().to_string(),
});
let (cpu, cores, ram_bytes) = c0mpute_bench::hardware_summary();
blob["cpu"] = serde_json::Value::String(cpu);
blob["cores"] = serde_json::Value::from(cores);
if let Some(ram_bytes) = ram_bytes {
blob["ram_bytes"] = serde_json::Value::from(ram_bytes);
}
if let Some(report) = bench_report_path().and_then(|p| c0mpute_bench::load(&p).ok().flatten()) {
blob["cpu"] = serde_json::Value::String(report.metadata.cpu.clone());
blob["cores"] = serde_json::Value::from(report.metadata.cores);
if let Some(ram_bytes) = report.metadata.ram_bytes {
blob["ram_bytes"] = serde_json::Value::from(ram_bytes);
}
blob["bench_at"] = serde_json::Value::String(report.metadata.start_time.clone());
if !report.metadata.quick && report.score > 0 {
blob["benchmark"] = benchmark_details(&report);
Expand Down
28 changes: 28 additions & 0 deletions node/crates/c0mpute-update/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,41 @@ pub async fn upgrade_now(current_version: &str, release_feed_url: &str) -> Resul
current: current_version.to_string(),
});
}
// Save the executable path before replacing its on-disk inode. After the
// swap, launch the new binary's full benchmark under this node's identity
// so its refreshed report is what the worker advertises on restart.
let new_exe = std::env::current_exe().ok();
perform_upgrade(&manifest).await?;
if let Some(exe) = new_exe {
if let Err(error) = run_post_update_benchmark(exe).await {
warn!(err = %error, "post-update benchmark failed; continuing with the updated binary");
}
} else {
warn!("could not locate updated executable to run the post-update benchmark");
}
Ok(UpgradeOutcome::Upgraded {
from: current_version.to_string(),
to: manifest.version,
})
}

async fn run_post_update_benchmark(exe: std::path::PathBuf) -> Result<()> {
let status = tokio::task::spawn_blocking(move || {
std::process::Command::new(exe)
.arg("benchmark")
// The child already is the newly installed version; avoid another
// release-feed request before it starts measuring this machine.
.env("C0MPUTE_NO_AUTO_UPDATE", "1")
.status()
})
.await
.context("join post-update benchmark")??;
if !status.success() {
anyhow::bail!("`c0mpute benchmark` exited with {status}");
}
Ok(())
}

/// Map the compile-time target to the release artifact's os/arch tokens
/// (matching `.github/workflows/release.yml` naming).
fn target_os_arch() -> Result<(&'static str, &'static str)> {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c0mpute-monorepo",
"version": "0.2.42",
"version": "0.2.43",
"private": true,
"workspaces": [
"apps/*",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@c0mpute/shared",
"version": "0.2.42",
"version": "0.2.43",
"private": true,
"type": "module",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion plugins/ads-manager/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[module]
id = "ads-manager"
name = "Ads Manager — shared ad operations layer"
version = "0.2.42"
version = "0.2.43"
kind = "service"
category = "applications"
description = "Unified ad operations for the c0mpute network: campaign management, creative registry, publisher inventory, OpenRTB auction primitives, CoinPay escrow, and reporting. Required dependency for ctv-ads and all future ad format plugins."
Expand Down
2 changes: 1 addition & 1 deletion plugins/coinpay/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[module]
id = "coinpay"
name = "CoinPay — DID, payments, escrow, reputation"
version = "0.2.42"
version = "0.2.43"
kind = "service"
category = "applications"
description = "Decentralized identifiers, wallet linking, escrow, signed receipts, and worker reputation. The trust spine of the c0mpute network."
Expand Down
2 changes: 1 addition & 1 deletion plugins/crawl/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[module]
id = "crawl"
name = "Crawl — distributed web fetching"
version = "0.2.42"
version = "0.2.43"
kind = "workload"
category = "data"
description = "Decentralized web crawling and page-rendering pool. Static fetches and JS-rendered pages, robots-aware, WARC-capable."
Expand Down
2 changes: 1 addition & 1 deletion plugins/ctv-ads/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[module]
id = "ctv-ads"
name = "CTV Ads — Connected TV ad marketplace"
version = "0.2.42"
version = "0.2.43"
kind = "service"
category = "applications"
description = "Decentralised Connected TV advertising on the c0mpute network. VAST 4.x endpoint, OpenRTB real-time auction, cryptographically verified impressions, CoinPay settlement. Supports Roku, Fire TV, Apple TV, Smart TVs, and FAST channels. Live-stream integration for ad-monetised broadcasts."
Expand Down
2 changes: 1 addition & 1 deletion plugins/diffusion/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[module]
id = "diffusion"
name = "Diffusion — image generation"
version = "0.2.42"
version = "0.2.43"
kind = "workload"
category = "ai"
description = "Decentralized image generation (Stable Diffusion, SDXL, Flux) on consumer/prosumer GPUs."
Expand Down
2 changes: 1 addition & 1 deletion plugins/embed/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[module]
id = "embed"
name = "Embeddings — vector generation"
version = "0.2.42"
version = "0.2.43"
kind = "workload"
category = "ai"
description = "Bulk text-embedding generation (sentence-transformers, BGE, Nomic) with CPU fallback and optional GPU acceleration."
Expand Down
2 changes: 1 addition & 1 deletion plugins/gameserver/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[module]
id = "gameserver"
name = "Game server — Minecraft / Factorio / Valheim"
version = "0.2.42"
version = "0.2.43"
kind = "workload"
category = "infrastructure"
description = "Continuous-reservation hosting for game servers. Multi-replica placement, persistent world state on c0mpute storage, proof-of-serve settlement."
Expand Down
2 changes: 1 addition & 1 deletion plugins/hosting/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[module]
id = "hosting"
name = "Hosting — censorship-resistant static sites"
version = "0.2.42"
version = "0.2.43"
kind = "workload"
category = "data"
description = "Static-site hosting with multi-replica placement, mutable naming, epoch settlement, and slashable proof-of-serve. See DIP-0015."
Expand Down
2 changes: 1 addition & 1 deletion plugins/infernet/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[module]
id = "infernet"
name = "Infernet Protocol — AI inference"
version = "0.2.42"
version = "0.2.43"
kind = "workload"
category = "ai"
description = "Decentralized AI inference workloads on c0mpute. Runs models on consumer/prosumer GPUs with model-hash and runtime-image verification. Also trains and serves temporal policies (CfC/LTC liquid networks, GRU baseline) on CPU or GPU."
Expand Down
2 changes: 1 addition & 1 deletion plugins/live-stream/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
[module]
id = "live-stream"
name = "Live Stream — p2p HLS live streaming"
version = "0.2.42"
version = "0.2.43"
kind = "service"
category = "media"
description = "Decentralized live video streaming via BitTorrent-style HLS segment swarming. Broadcaster pushes RTMP/SRT; c0mpute nodes swarm segments to viewers. No central CDN. Censorship-resistant. Per-GB micropayments via CoinPay."
Expand Down
2 changes: 1 addition & 1 deletion plugins/ocr/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[module]
id = "ocr"
name = "OCR — document text extraction"
version = "0.2.42"
version = "0.2.43"
kind = "workload"
category = "ai"
description = "Decentralized OCR for PDFs and scanned documents (Tesseract, PaddleOCR, docTR) with CPU or GPU runners."
Expand Down
2 changes: 1 addition & 1 deletion plugins/podcast-ads/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[module]
id = "podcast-ads"
name = "Podcast Ads — audio ad marketplace"
version = "0.2.42"
version = "0.2.43"
kind = "service"
category = "applications"
description = "Decentralised audio advertising for c0mpute-hosted podcasts. DAAST 1.0 endpoint, dynamic ad insertion, Podcasting 2.0 <podcast:value> revenue splits, and CoinPay settlement. Publishers sell ad slots; advertisers run campaigns — zero platform cut beyond protocol split."
Expand Down
2 changes: 1 addition & 1 deletion plugins/podcasting/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[module]
id = "podcasting"
name = "Podcasting — p2p podcast publishing"
version = "0.2.42"
version = "0.2.43"
kind = "service"
category = "media"
description = "Censorship-resistant podcast hosting on the c0mpute network. Upload episodes, stream live shows, auto-transcribe, and monetise via CoinPay subscriptions, pay-per-episode, value-for-value, and audio ads — with zero platform cut. RSS 2.0 + Podcasting 2.0 compatible with all major podcast apps."
Expand Down
Loading
Loading