Repository navigation
Self-hosting MVP: services on users' computers, verified by agreement, credited in TRI (off-chain first), everything decided in .t27 #1756
Description
The owner, 2026-10-10 (translated):
- move everything into one repository and one service managed through
.t27, based on trios; - ideally, an app that runs services on other people's computers instead of a hosting provider. That is decentralized hosting on users' machines, paid in TRI for proof of work / proof of compute, so we stop paying for the hosting of the services we need;
- build an MVP of self-hosting.
What already exists (read before building)
- Pull-based remote executors.
trios-bee-runner-1/2already pull work from the Queen, hold leases and report back. That is most of a host agent. - A leased link between nodes.
specs/queen/netlink.t27, fix(queen): PgLink made safe before its first caller - node incarnations, a fenced lease on its own thread, mail acknowledged after it is handled (Closes #1714) #1724, has node incarnations, 20 s leases with 5 s beats, and fencing. The actor runtime already runs across nodes on it. - A remote job runner. t27c
bench-agent(t27#8153) runs silicon jobs on a machine next to a board, after an approval comment. - Proof by agreement. Signed corpus receipts and the three-way decision replay (t27#8317) already decide "did two runs produce the same result".
- The proof format. gHashTag/tri-net's DePIN Compute arm defines the proof payload
(model_hash, input_hash, output_hash, ops), settled throughMiningPool.claimReward(). - TRI as it stands, from gHashTag/golden-chain-international
FACTS.md§6, verbatim facts:TriTokenlives on Base Sepolia (testnet only). 100% of the supply is locked inMiningPool, and the ownership of both contracts is renounced.- A token leaves the pool only as a reward for a verified compute proof from a registered chip, on a 4-year halving curve.
- Any promise of token income for hardware or compute, any sale or listing, needs legal review first.
Hard constraints, so the MVP is honest
-
A stranger's computer can read everything a service it runs holds. Secrets (API keys, DB URLs) and client data (CRM, Telegram messages) therefore never go to a host outside the owner's trust. Three trust tiers:
- owner (the owner's own machines): any workload;
- trusted (named people): stateless services, with secrets scoped to that service;
- public (anyone): only deterministic, secret-free, PII-free jobs, whose result is checked by agreement with another host.
-
Proof of compute is solved only for deterministic jobs. k-of-n hosts run the same pinned job, the hashes of their outputs must agree, and only agreeing hosts earn credit. Long-running services get uptime proved by challenge probes; that cannot prove the work was correct, so services stay in the owner and trusted tiers.
-
TRI accrues off-chain in the MVP. The credit ledger is keyed by host key. On-chain settlement needs both a host identity the pool accepts (today the pool requires a registered chip) and the legal review FACTS.md requires. The MVP pays nothing on-chain and claims no token value.
-
Only t27. Every decision is a
.t27spec with tests, compiled to a card:- host eligibility per tier;
- placement and failover;
- lease expiry;
- quorum and agreement;
- credit per verified unit;
- the settlement threshold.
TypeScript is glue: HTTP, process control, storage.
MVP (slice 1)
- Specs (
specs/hosting/*.t27):host.t27: tiers, capacity, lease, and eligibility per workload class;placement.t27: fit, spread, k replicas, and moving work when a lease lapses;proof.t27: the receipt shape aligned with tri-net's Compute arm, the k-of-n agreement, and the verdicts;credit.t27: TRI units per verified job, the off-chain ledger rules, and the settlement threshold.
- Queen endpoints in trios, behind
TRIOS_HOSTING=on:- register a host (it holds an ed25519 key);
- beat;
- lease a job;
- post a signed receipt;
- read the public ledger.
- Host agent
trios host, which a user runs:- generates a key;
- registers and beats;
- pulls a job: a pinned OCI image digest, or
t27c test-reporton a spec at a commit, run sandboxed with no secrets; - posts the output hash and a signed receipt.
- Demo: two hosts, the owner's Mac and one other machine or process, run the same job. The Queen sees the hashes agree and credits both. A third host that tampers with the output gets no credit.
Slice 2
- A stateless service hosted on an owner-tier or trusted-tier machine, reached through a reverse tunnel to the Queen. Candidates: the STT pods gigaam and parakeet, or a static site.
- A topology
.t27that describes every service. It is the same spec the disaster-recovery template needs (Disaster recovery: back up all data off Railway and GitHub, and a template that redeploys the whole project on a new account t27#8675).
The consolidation into one repo is planned separately, because trios is public and some service code (999-multibots-telegraf) is private.
Activity
gHashTag commentedon Oct 10, 2026
Owner addition, 2026-10-10 (translated): "we need a fast loader of our service copy onto any machine, turning it into useful work."
trios-hostis one self-contained binary per platform, built withbun build --compile, at least for darwin-arm64 and linux-x64. One documented command line downloads it and runs./trios-host join; there is no committed.sh, per L7. On first run it fetches t27c and zig 0.16.0 into~/.trios-host/. Each download is checked against a sha256 pin, and the pins are data inspecs/hosting/toolchain.t27.t27c test-reporton one spec at a pinned t27 commit. This is the work the paid labs do now; per today's inventory, t27b-lab costs about $210 and t27c-lab about $58 per 30 days.tri lab receipt). When it does, the labs can be switched off, which saves about $269 per 30 days.gh release uploadfrom a build machine. A CI workflow for them would be a.ymlchange, which is owner-commit only.gHashTag commentedon Oct 10, 2026
Slice 2: the topology card is up, and the consolidation plan is filed.
specs/hosting/topology.t27is in spec(hosting): topology.t27 -- every Railway service, its source, tier and restore order (Closes #8699) t27#8708 (issue specs/hosting/topology.t27: the deployment in .t27, the source of truth for what runs where t27#8699). It holds all 59 Railway services and their sources, builds, volumes, domains, secrets (yes or no), personal data, cost and tier, plus a restore order. It is generated from the inventory of 2026-10-10, and the rules are tested: 10 tests, 42 functions.trios/deploy/services/<project>/<service>/, the order of moves, what breaks, and what "one service managed through .t27" can sanely mean.Tiers by this issue's rules, over the 44 services a restore would deploy:
The one public row of all 59 is the finished dayo64 nextpnr job.
Found on the way: the bee runners are owner-only as deployed, because each holds a database connection string. In project 999 it can only point at one of three Postgres instances, and all three hold personal data, the CRM among them. To make a runner a trusted-tier host agent, that credential has to go first.
spec(hosting): topology.t27 -- every Railway service, its source, tie…
spec(hosting): self-hosting slice 1 - who hosts, where a shard runs, …
spec(hosting): self-hosting slice 1 - who hosts, where a shard runs, …
spec(hosting): sybil.t27 -- an anchored quorum, canaries, probation, …
spec(hosting): statement.t27 -- the hosts' epoch statement, paid by k…
spec(hosting): statement.t27 -- the hosts' epoch statement, paid by k…
feat(hosting): self-hosting slice 1 - /hosting endpoints, the trios-h…
spec(hosting): feed.t27 -- the network feeds itself: which master hea…
hosting: the trios app's hosting panel as a card, specs/hosting/panel…
hosting: panel.t27 names its events EVENT_ and says whether the key f…
feat(hosting): slice 2a - the Queen feeds the network itself: master …