Repository navigation
Every node is a disk provider, listed on d1sks by signed heartbeat; v0.2.95 - #199
Merged
Merged
Conversation
…heartbeat; v0.2.95 Storage and hosting are on for every node unless turned off: an explicit roles list (config.toml or --roles) no longer drops them. Opt-outs: [storage] enabled = false / --no-storage / C0MPUTE_STORAGE=0, [hosting] enabled = false / --no-hosting / C0MPUTE_HOSTING=0. Private mode adds nothing. [storage] root now defaults, so a partial [storage] section parses. Every storage node lists its disk on d1sks, NAT'd or not: a payload (c0mpute.disk.announce/1: marketplace host, peer id, key, ts, expires_in, origin, OpenDisk descriptor with c0mpute.addrs and reachable) signed with the node's libp2p ed25519 identity, POSTed to /api/v1/disks/announce 20 s after start and every 5 min, expiring 20 min after the last one. Replaces the origin-only listing (which needed a public https gateway.announce). Opt out with [storage] list_on_d1sks = false or C0MPUTE_D1SKS=0; private mode never lists. Optional [storage] country / C0MPUTE_COUNTRY. hosting publish --disks auto joins the hosting gossip first and ranks d1sks disks live on gossip first, then fresh reachable, fresh NAT'd, stale; then price, standing, space. hosting disks shows reach, last heartbeat and, with --live, gossip liveness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan13 finding(s) HIGH/CRITICAL: 1 | MEDIUM: 8 | LOW: 4
Snippets are redacted; ThreatCrush never prints matched credential material. |
ralyodio
added a commit
that referenced
this pull request
Nov 9, 2026
…#205) Every node hosts by default since #199, including busy production boxes, and the only guard was the 5 GiB hosting budget: dev2 runs ~6 c0mpute processes that now all host, on a 1.8 TiB disk with 20 GiB free. replicate() now refuses a copy unless max(10 GiB, 5% of the disk, capped at 50 GiB) stays free. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Anthony: "all nodes should be disk providers too by default. can be disabled". Until now a node whose
config.tomllistedroles = [...]lost storage/hosting if they were missing from the list, and a disk was only listed on d1sks whengateway.announcewas a public https origin, so d1sks listed exactly 1 disk (dev2).What
Disk provider by default (
config.rs,worker start)storageandhostingjoin every node's roles, even whenroles/--roleslists others (Config::apply_disk_provider_defaults, applied on load and after CLI flags).[storage] enabled = false/--no-storage/C0MPUTE_STORAGE=0;[hosting] enabled = false/--no-hosting/C0MPUTE_HOSTING=0. Turning one off also removes it from an explicit list.[storage] rootnow has a default, so[storage]\nenabled = falseparses.worker startsay the node is a disk provider and how to opt out.Signed d1sks listing, NAT or not (
opendisk.rs,supervisor.rs){payload, signature}to<d1sks>/api/v1/disks/announce20 s after start and every 5 min (plus jitter). Payloadc0mpute.disk.announce/1: marketplace host, peer id,ed25519:key, ts,expires_in1200, optional https origin, and the OpenDisk descriptor withc0mpute.addrs(up to 8, public first) andc0mpute.reachable(https,direct,c0mpute). Signed with the worker's libp2p identity (checked to match the running peer id).register+ daily re-submit. Opt out:[storage] list_on_d1sks = falseorC0MPUTE_D1SKS=0. Optional[storage] country/C0MPUTE_COUNTRY.Picking hosts (
hosting/market.rs,hosting/mod.rs, CLI)HostDiskcarriesreachable,heartbeat_age_secs(from d1sksheartbeat_age_s) andlive. Ranking tier: live on the hosting gossip, then fresh and reachable (or origin-polled), then fresh behind NAT, then stale (heartbeat older than 15 min); then price, standing, space, peer id.hosting publish --disks ...starts the hosting service first and listens to the gossip (up to 70 s) to mark live hosts before choosing.hosting disksprints REACH and SEEN columns;--livealso joins the gossip and marks which listed disks are announcing right now.d1sks side (verification, rate limits, expiry, NAT display): profullstack/d1sks.com#6, merged and deployed.
Tests
enabled = falseopts out even from an explicit list; private mode adds nothing and never lists;list_on_d1sks = falsealone.opendisk::signed_listingis a fixture in d1skstest/announce.test.jsand verifies there.cargo test -p c0mpute-core --lib: 384 pass (two libp2p timing tests,registry_observes_advertised_capabilitiesandend_to_end_sealed_paid_delivery, failed once under box load and pass on rerun; untouched here).🤖 Generated with Claude Code