Documentation Coston2 demo
Coston2 demo
The owner's demo on Flare's Coston2 testnet: the registry, the vault and the extension, wired together, with a passing proof that opens the vault and a failing one that shuts it.
For what the contracts hold right now, see Network status.
How the gate is wired#
Two calls make it so. InstructionSender.setRegistry(registry) makes the extension's contract pass checked records on. ProofRegistry.setSubmitter(sender) makes that contract the only address that can post. After them, the owner's own wallet can no longer post a record by hand.
The same flow in words
- The provisioner sends the coverage file to the machine as a direct action, encrypted to the machine’s key and signed.
- The inspector calls
requestVerificationwith the proof record and pays the fee. - Flare’s data providers relay the instruction. It reaches the machine only above 50 % of signing weight.
- The machine compares the record with the coverage file against the threshold (80 % in the demo) and signs the result.
- Anyone fetches the signed result from the machine’s proxy and calls
submitResult. - The contract recovers the signer and asks FlareTeeManager whether it is a machine of this extension in production.
- If so, the record goes to the registry. The registry takes records from this contract and from nobody else.
The stages#
The owner runs each stage himself, with his own test wallet. Each driver asks for the keystore password once, never sees a private key, and refuses any chain but Coston2.
| Stage | Driver | What it does |
|---|---|---|
| A | coston2-run.sh | Deploys and registers the extension, starts the test machine, wires the gate |
| B | coston2-demo.sh | The passing path and the failing path |
| C | coston2-finish.sh | The stale path, then a normal 90-day pass so the demo is left open. Run twice, about a day apart |
| Job | coston2-job.sh | Posts the record of a job folder made with the inspector kit |
What the demo showed#
On 22 November 2026, each step checked by reading the chain afterwards:
| Path | Input (invented) | What happened |
|---|---|---|
| Passing | Coverage 850 of 1,000 units, threshold 80 % | The machine signed PASS. The registry read PASS and fresh, and a draw of 250,000 went through |
| Failing | Coverage 700 of 1,000 units | The machine signed FAIL with reason 4. The registry read FAIL and the next draw was refused with ProofFailed |
The stale path was started on 23 November 2026 with a record valid only until the end of that day.
Posting an inspection job#
coston2-job.sh <job-folder> takes a job built with the inspector kit. Before it asks for the password it checks, by reading only:
inspect verifyholds, so the record follows from the evidence files in the folder.- The record is for the facility the vault is bound to.
- A PASS is still inside its valid-until date, and the record is not dated before the one on chain.
Then it sends the coverage file, asks for the check, fetches the signed result and submits it. It writes what the chain read afterwards into the job folder. A job whose result is FAIL is posted too, and shuts the vault.
What it costs#
Test funds only, from the Coston2 faucet. The first day cost about 7 C2FLR, most of it Flare's registration and availability fees. A new test machine costs about 1 C2FLR.
Limits of the demo#
- No enclave. The machine is a test machine. Its operator can read the coverage file and holds the signing key.
- One wallet plays several roles. The inspector, the provisioner and the borrower are all the owner's test wallet.
- The record is the inspector's own. Nothing on chain checks its result or its dates against anything. The machine only compares the record with the coverage file.
- Open registration is a snapshot. That an outside developer can register an extension on Coston2 was true on the day it was checked.