Documentation Coston2 demo
Coston2 demo
What the owner has run on Flare's Coston2 testnet, and what he has not. Registry v1, the earlier demo, was run on 22 and 23 November 2026. The signed-path driver for registry v2 is built and has not yet been run by the owner.
For what the v1 contracts hold right now, see Network status.
The runs so far#
From the project's facts file, as at 23 November 2026. Every run used invented data.
| Date | Run by | Contracts | What happened |
|---|---|---|---|
| 22 November 2026 | The owner | Registry v1 | Registry v1 and the mock vault deployed. With no record, the vault answered NO_RECORD. |
| 22 November 2026 | The owner | Registry v1 | Pass path: the test machine (no enclave) signed PASS, the registry read PASS and fresh, and a draw of 250000 went through. |
| 22 November 2026 | The owner | Registry v1 | Fail path: the test machine signed FAIL (coverage below the threshold), canDraw answered FAILED, and a draw reverts with ProofFailed. |
| 22 November 2026 | The owner | Registry v1 | Repayment proof: one XRP Ledger testnet payment of 100000 drops was proven through the Flare Data Connector and credited once to an invented loan. A second try was refused with AlreadyCredited. |
| 23 November 2026 | The owner | Registry v1 | Stale path, run 1: a same-day PASS replaced the FAIL, read as fresh, and canDraw answered OK. Run 2 (the same record read as stale after 00:00 UTC on 24 November, with no transaction in between) is pending. |
| 23 November 2026 | The runner | Registry v1 | The runner deployed its own v1 registry and vault and ran three scenarios with unsigned records (a swapped unit, a swap explained, a capture made before the inspection). Each draw was refused as expected. State of its public feed at 15:05 UTC. |
Stale path: run 1 is done 2026-11-23; run 2 is pending. Until run 2 is recorded, the stale path has not been shown on Coston2.
The signed-path driver#
Built, not yet run by the owner. coston2-v2.sh has been checked offline with stand-in tools, and on 23 November 2026 against a local development chain with the real contracts. Nothing has been run on Coston2. Signing and sending from a keystore with a password file were not exercised: the local run used unlocked test accounts.
One command, run by the owner:
./coston2-v2.sh --demo
What it does, in this order:
- Makes an invented job with the inspector kit, or takes one with
--job <job-folder>. It builds the job with the issue time set to the time of the chain's latest block, and prints the record digest. - Asks for the keystore password of each account, once.
- Signs the digest with
cast wallet sign --account <inspector account>, files the signature withinspect sign, and requiresinspect verify --require-signature --key-id <address>to hold. If it does not hold, nothing is sent. - Deploys
ProofRegistryV2and reads back that the code on chain is the code it compiled. - Deploys
LoanVaultV2for the job's facility and reads its settings back. - Asks the registry for the digest of the record and compares it with the kit's. Simulates
submit. If the registry would refuse the record, nothing is submitted. Then it sendssubmit. - Reads back the registry and the vault.
- If the vault allows it, sends a small
drawfrom the borrower account, then arepayof the same amount. Both are mocks: no token or value moves. - Writes what it did into the job folder, with a block to paste into the deployment record by hand.
With the defaults that is five transactions: two deployments, the submit, the draw and the repay. There is no Flare fee on this path. On a local chain the five took about 3.45 million gas together.
| Account flag | Default | What the account does |
|---|---|---|
--account <name> | coston2-test | Deploys both contracts and relays the record. Anyone may relay a signed record |
--inspector-account <name> | The --account | Signs the record digest. Its address is the key the vault pins |
--lender-account <name> | The --account | The vault's lender. Opened only to read its address |
--borrower-account <name> | The --account | Sends the draw and the repay |
With the defaults one address plays all four roles, and the script says so. That shows the mechanics, not a separation of roles. The demo job's facility is fac-demo-0001 and its inspector id is DEMO-not-an-inspector.
Run again, it skips what is finished and goes on from where it stopped. One exception: a deployment whose receipt was lost is deployed again, and the first copy stays on chain unused. ./coston2-v2.sh --revocation-digest [address] prints the digest that revokes a key and the command that signs it, and sends nothing. See Keys.
A signature shows who issued the record and that it was not changed. It does not show that the facts are true. Flare Confidential Compute has no part in this path yet.
Registry v1, the earlier demo shown on Coston2#
The rest of this page is the v1 demo as it was run: the registry, the vault and the extension, wired together, with a passing result that opened the vault and a failing one that shut it. Registry v1 has an owner and one submitter, and its records carry no inspector signature.
How the v1 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 registry's owner can still change the submitter again.
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 with the machine’s key.
- Anyone fetches the 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 registry v1. That registry takes records from this contract and from nobody else.
The stages#
The owner ran 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 v1 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 test 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 test machine signed FAIL with reason 4. The registry read FAIL and the next draw was refused with ProofFailed |
Those signatures are the test machine's. No inspector signed anything in the v1 demo.
On 23 November 2026 the stale path was started with a record valid only until the end of that day. Run 1: a same-day PASS replaced the FAIL, read as fresh, and the vault answered that a draw was allowed. No draw was made. Run 2 reads the same record after 00:00 UTC on 24 November, with no transaction in between, and expects it to read as stale.
Posting an inspection job, v1#
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 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. This driver was checked offline and had not been run on Coston2 when its notes were written.
What it cost#
Test funds only, from the Coston2 faucet. The first day cost about 7 C2FLR, most of it Flare's registration and availability fees. Starting a new test machine and the first run of the stale path cost about 1.1 C2FLR.
Limits of the v1 demo#
- No enclave. The machine is a test machine. Its operator can read the coverage file and holds the machine's signing key.
- No inspector signature. Registry v1 stores what its submitter posts. The machine compares the record with the coverage file and checks nothing else.
- An owner key. The registry's owner can change the submitter at any time.
- One wallet plays several roles. The inspector, the provisioner and the borrower are all the owner's test wallet.
- Open registration is a snapshot. That an outside developer can register an extension on Coston2 was true on the day it was checked.