socialweb.computer

Request and provide VMs on an atproto compute market.

Independent Trust Policies

Every contract involves two independent trust decisions: the bidder decides who is allowed to run on its machines, and the requester decides who it trusts to run its workload. Neither side inherits the other's choice, so a bidder can serve anyone it vouches for while a requester stays selective about providers, or the other way around. Both sides use the same policy modes, evaluated for their own side.

Contents

Bidder Policy

Set the bidder policy when the bidder starts using install bidder --bidder-policy <name> (default bidder-tangled-vouch). It filters incoming requesters and controls which RFPs the bidder will consider bidding on. The bidder runs this policy before committing resources to a job, and again when the accept arrives.

Requester Policy

The requester sets its policy per contract (default requester-tangled-vouch), writes it as a signed record in its own repo, and references it from the RFP's policies. This policy filters incoming providers and controls which bidders the requester will accept a bid from. The bidder evaluates the requester's policy alongside its own, and both must allow.

Policy Modes

Both sides share the same mode names, and each mode applies to whichever side configured it.

ModeBidder policyRequester policy
only-meServe RFPs only from the operator itself or its agents.Accept bids only from the requester's own DIDs or their agents.
tangled-vouchServe only requesters the bidder's side has vouched for.Accept bids only from providers (or their operators) the requester has vouched for.
mutualsServe requesters that the bidder's side vouches for and that vouch back.Accept bids only from providers that the requester vouches for and that vouch back.
openNo restriction. Active only when explicitly named, and never on prod.No restriction. Active only when explicitly named, and never on prod.

The two sides don't need to pick the same mode. A tangled-vouch bidder can still bid on an RFP from an only-me requester. The requester's mode only restricts which bid it accepts, so other bidders can still try.

Vouch and Denounce

Both tangled-vouch and mutuals read the same graph of vouch records published under Tangled's namespace (sh.tangled.graph.vouch). A vouch record is a signed "I trust this DID" statement stored as a Tangled record whose rkey is the vouched DID. A denounce record uses the same shape with kind: "denounce", and no policy counts it.

Each side reads its own vouches: a bidder (and its operator) checks who it has vouched for, and a requester checks who it has vouched for. Agents count as their principal. Because a bidder is linked to its operator's account through an association record, a vouch for the operator covers its bidders. Vouches are boolean today, not weighted or scored by hop distance.

Vouch

Alice vouches for Bob. If Bob runs his bidders on bidder-tangled-vouch and vouches for Alice, his bidders will bid on Alice's RFPs and Alice will accept their bids.

Denounce

Alice denounces Eve. Because a denounce record isn't a vouch, Eve doesn't pass Alice's tangled-vouch or mutuals check. A denounce doesn't undo a vouch in another record, so treat vouches as an allowlist rather than a reputation system.

Policy Evaluation Order

Policy checks run at five points in the contract flow:

  1. The requester creates the RFP, writes its policy as a signed record, and references it from the RFP so the policy is public and fixed before anyone sees it.
  2. Before doing anything else, the bidder runs a scope check using its own policy against the DIDs only.
  3. Before bidding, the bidder runs its full workflow and every policy attached to the RFP. All of them must allow.
  4. The requester checks each bid against the DIDs, then runs the full policy on the winning bid right before accepting.
  5. When the accept arrives, the bidder runs both checks again before provisioning.

For details on how the policy engine runs and caches these checks, see protocol/policy.md.

badge.blue Attestations

Every record in the chain carries a signature over its own content-addressed CID in addition to its author DID. Both sides verify that signature before acting.

Example signed RFP record:

$type: com.publicdomainrelay.temp.market.rfp
payload: {uri: at://did:plc:alice/com.publicdomainrelay.temp.compute.vm/3mm3d, cid: bafyrei...vm}
signatures:
  - $type: network.attested.signature
    key: did:key:zQ3s...
    cid: bafyrei...attestation
    signature: {$bytes: "..."}
    issuer: did:plc:alice

Running Workloads

Policy decides who bids and who is accepted. Credentials for the running workload are handled separately through Workload Identity Federation.