Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

139 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TOON Compute

A decentralized compute marketplace built on TOON. Providers sell leases on workloads, tenants buy them over TOON payment channels, the TOON relay carries discovery, and the TOON store holds image bytes.

Formerly "TOON Network". Renamed on 2026-10-15 so that "the TOON network" means only the payment network (brand architecture). The repository name, the spec's file name and the toon.network event label are identifiers and keep their names. ADRs written before the rename keep the old name.

This repository is the protocol: the spec, the glossary and the decisions. The code lives in the repositories below.

TL;DR

TOON is paid HTTP. An ordinary HTTP app sits behind a connector, which collects a flat price per route over an ILP payment channel and hands the app a request that is already paid for. Every write is a paid packet. Reads are free: a relay serves plain Nostr over wss://, and asking a connector what it sells costs nothing.

The roles:

  • A Provider runs workloads on hardware it controls and publishes a Provider Profile, its Listings and its Liveness to its Relay Set. Together those are the Provider Directory.
  • A Tenant is whoever holds a lease's Continuation Token. It has no published identity and signs nothing. People act as tenants through the Console.
  • A Workload Gateway fronts a workload at a stable hostname and follows it to whichever provider is running it. It is optional.
  • A relay is a Nostr relay you pay to write to. It carries the Provider Directory and the Image Registry.
  • A store puts bytes on Arweave for a fee. Image blobs live there as Blob Records and their parts.
  • A gas station pays the on-chain gas for a payer that holds none.
  • A connector terminates payment in front of each of these. Connectors peer with each other, so a payer with one channel to a hub reaches every route behind it. A packet reaches its app directly or through any number of hops.

A spawn, which starts a lease and buys its first Lease Interval (spec §6.2):

sequenceDiagram
    participant T as Tenant (console)
    participant R as Relay
    participant C as Provider's connector
    participant P as Provider app
    participant S as Store / OCI registry
    T->>R: read Profile, Listings, Liveness (free)
    T->>C: sealed spawn packet, paid at the listing's price
    C->>P: plain HTTP POST, already paid
    P->>R: read the Image Registry entry or Blob Records
    P->>S: fetch the image's blobs, checked by digest
    P->>P: start the workload
    P-->>C: access details (host, SSH port, ports)
    C-->>T: sealed answer
    Note over T,C: each Extension pays for one more Lease Interval.<br/>When the payments stop, the lease expires.
Loading

Everything runs on a devnet today, with mock USDC. See Networks.

The stack

Every repository below is public under toon-protocol.

Repository What it is Who runs it Published
connector The paid reverse proxy every TOON app sits behind: it collects the price, settles it on chain and forwards plain HTTP Everyone who runs a TOON app Image ghcr.io/toon-protocol/connector
relay A Nostr relay with paid writes and free NIP-01 reads Relay operators Image ghcr.io/toon-protocol/relay, npm @toon-protocol/relay
store Paid Arweave blob storage (NIP-90 kind:5094) Store operators Image ghcr.io/toon-protocol/store
gas-station Pays Solana fees and relays EVM meta-transactions for a payer with no gas Gas station operators Image ghcr.io/toon-protocol/gas-station
provider The provider app (a hard fork of Paygress), its directory publisher, and the bundle that deploys them Providers Nothing yet. The deploy bundle builds the images on the box
gateway The Workload Gateway Gateway operators (optional) Nothing yet. The deploy bundle builds the image on the box
console The local app an Account uses to find providers, fund its payment channels and manage its workloads Tenants, on their own machine Nothing yet. Run it from a checkout
toon-client The payer side: seals a request, pays it over a channel and returns the answer, from Node.js or the toon CLI Anyone paying a route, and the console npm @toon-protocol/client
infra The local sandbox (the whole network in one docker compose) and the public devnet's docs Developers Nothing. It is run from a checkout

I want to…

I want to… Go to
Use the network: find a provider, fund a channel, spawn a workload console
Run a provider Run a provider
Run a Workload Gateway Run a gateway. A provider does not need one
See what my node earned, and redeem it The connector's dashboard at /dashboard on its edge shows claims and channels; redeeming is a signed write to its operator surface (POST /channels/:id/redeem-latest), which the dashboard does not make. A guided toon-provider redeem is planned (ADR 0029)
Run the whole network on my machine infra sandbox/: make setup && make up && make smoke
See what is live on the devnet infra docs/devnet.md, or node sandbox/scripts/devnet-status.mjs in a clone of infra. Every check it makes is free
Pay a TOON route from code toon-client
Put my own app behind a connector connector, then the sandbox's Build your own TOON app
Implement a tenant client or another provider The spec and the wire fixtures, which node docs/spec/fixtures/check.mjs checks with no dependencies

Networks

Devnet is the only network. Nothing runs on mainnet yet.

The devnet settles on Base Sepolia and Solana devnet, in a mock USDC that anybody can draw from the faucet. Nothing earned or spent on it is real money. The faucet gives no native gas: devnet SOL and Base Sepolia ETH come from elsewhere (devnet.md says where).

Service ILP address Endpoint
Faucet (mock USDC) https://faucet.devnet.toonprotocol.dev
Relay g.toon.relay https://proxy.relay.devnet.toonprotocol.dev (paid writes), wss://relay-ws.devnet.toonprotocol.dev (free reads)
Store g.toon.store https://proxy.ario.devnet.toonprotocol.dev
Gas station g.toon.gas https://proxy.gas.devnet.toonprotocol.dev
Provider g.toon.provider https://proxy.provider.devnet.toonprotocol.dev
Workload Gateway g.toon.workload-gateway https://proxy.gateway.devnet.toonprotocol.dev, serving <label>.gw.devnet.toonprotocol.dev

Ask any of them what it sells, for free:

npx @toon-protocol/client describe https://proxy.provider.devnet.toonprotocol.dev

Reference

  • Spec: docs/spec/toon-network-v1.md, a draft. It covers what a provider must publish, accept and do, and the Workload Gateway and relay write edge besides.
  • Glossary: CONTEXT.md. Its terms are normative, in the spec and in the code.
  • Decisions: docs/adr/. Where the spec and an ADR disagree, the ADR wins.
  • Wire fixtures: docs/spec/fixtures/, golden files generated by the provider's wire tests.
  • Issues: GitHub Issues on this repository hold the specs and the tickets that span the stack. See docs/agents/issue-tracker.md for the conventions.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors