~ knotless Search/
↑↓ move↵ open⇧↵ all results

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0
63 lines · 3.3 KB Raw History

How it works

A spec and its implementation for atproto accounts to request and advertise compute. It is for you if you run an organization and want decentralized identity to give your members, and their workloads and agents, access to your compute.

The flow is: Request For Proposal -> Bid -> Accept -> Receipt. Each step is a signed record in its author's own atproto repo; the other side reads it from the firehose, a Jetstream, or the XRPC call that names it.

sequenceDiagram
    autonumber
    actor Alice as Alice (requester)
    actor Bob as Bob's bidder

    Alice->>Alice: compute.vm (cpus, mem, disk, cloud-init user_data) + market.rfp
    Alice->>Bob: discover (market.offering, market.heartbeat), submitRfp
    Note over Bob: policy: does Bob vouch for Alice?
    Bob->>Bob: market.bids.free + market.bid
    Bob->>Alice: submitBid
    Note over Alice: policy: does Alice vouch for Bob?
    Alice->>Alice: market.accept
    Alice->>Bob: submitAccept
    Note over Bob: capacity, then provision the VM
    Bob->>Bob: market.receipt, then market.event (vm.hostKeys, vm.onNetwork)
    Bob->>Alice: submitEvent
    Note over Alice: Held: ssh over iroh
    Alice->>Alice: compute.events.vm.delete + market.event
    Bob->>Bob: compute.events.vm.terminated + market.event

Who is who

actorisexample
requesteran atproto account that requests a VMaliceoa.bsky.social
bidder operatoran account that owns biddersbobvmbuilder.bsky.social
biddera host that provides VMs; its own DID, an agent of its operator (ident.link)did:plc:2l2wdry77c7jtucbslstagkj
guestthe VM; it holds no repo key: its bidder signs its events-
guest requestera requester inside a requested VM, an agent of its requester for that contractCI requesting a staging network
release accountpublishes the release channelssocialweb.computer

Who serves whom

A bidder bids only for requesters its operator vouches for (sh.tangled.graph.vouch), and a requester accepts only bidders it vouches for, directly or through the bidder's operator: the default policy tangled-vouch on both sides. Agents count as their principal, up to 100 levels of ident.link associations. Requesters find bidders through relays (every repo with a market.offering and a fresh heartbeat), never from a pinned list.

What reaches the guest

The VM boots from the compute.vm's cloud-init user_data; nothing else starts a guest. The requester reaches it over iroh (every guest), and per tunnel over https (opentunnel) or WebRTC. Secrets never go into user_data: the guest fetches them from the requester with a workload identity token its bidder issues.

More