Repository navigation
List c0mpute hosting nodes: ?hosting=1 filter, badge, host-a-site docs - #5
Merged
Merged
Conversation
Reads the c0mpute block a c0mpute node adds to its OpenDisk descriptor (peer_id, roles, accepts.hosting, hosting price) and: - ?hosting=1 on /disks and /api/v1/disks lists only c0mpute hosting nodes - rows carry c0mpute_hosting, c0mpute_peer_id, hosting_per_gib_month - a 'c0mpute hosting' badge and hosting price in the list, a block on the disk page, a Kind filter, and a 'Host a site on these disks' docs section pointing at c0mpute hosting publish --disks auto d1sks stays discovery only: placement, proofs and payment are p2p. 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.
c0mpute nodes with the hosting role now say so in their OpenDisk descriptor (
accepts.hosting: true,c0mpute.roles,c0mpute.hosting { price_per_gib_month, max_gib }, companion PR in profullstack/c0mputefeat/hosting-marketplace).c0mpute hosting publish --disks autopicks paid hosts from this listing.This PR makes d1sks show them:
src/opendisk.js:c0mputeOf(doc)reads the c0mpute block (peer id must look like a base58 libp2p id),isC0mputeHosting,wantsHosting;validate()normalisesaccepts.hostingandc0mpute.src/disks.js:?hosting=1(alsotrue,c0mpute) lists only disks with a c0mpute peer id plusaccepts.hostingor thehostingrole. Rows gainc0mpute_hosting,c0mpute_peer_id,hosting_per_gib_month.hostingparameter in the table).d1sks stays discovery only. Placement, proof-of-storage challenges and payment are peer to peer in c0mpute, and a site keeps being served if d1sks is down.
Tests:
bun testgives 19 pass. New unit tests cover the c0mpute block, the role-or-flag rule, rejecting a bad peer id or a missing block, and?hostingparsing. A new API case (needsDATABASE_URL) lists a hosting disk through?hosting=1&country=PT, checks the row fields and checks that the HTML shows the badge. I ran it against a throwaway postgres:16 container: 19 pass, 97 expects.bun run lintis clean.Not deployed.
🤖 Generated with Claude Code