Innovation Blockchain

Documentation · Coston2 testnet prototype · invented data

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.

DateRun byContractsWhat happened
22 November 2026The ownerRegistry v1Registry v1 and the mock vault deployed. With no record, the vault answered NO_RECORD.
22 November 2026The ownerRegistry v1Pass path: the test machine (no enclave) signed PASS, the registry read PASS and fresh, and a draw of 250000 went through.
22 November 2026The ownerRegistry v1Fail path: the test machine signed FAIL (coverage below the threshold), canDraw answered FAILED, and a draw reverts with ProofFailed.
22 November 2026The ownerRegistry v1Repayment 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 2026The ownerRegistry v1Stale 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 2026The runnerRegistry v1The 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:

  1. 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.
  2. Asks for the keystore password of each account, once.
  3. Signs the digest with cast wallet sign --account <inspector account>, files the signature with inspect sign, and requires inspect verify --require-signature --key-id <address> to hold. If it does not hold, nothing is sent.
  4. Deploys ProofRegistryV2 and reads back that the code on chain is the code it compiled.
  5. Deploys LoanVaultV2 for the job's facility and reads its settings back.
  6. 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 sends submit.
  7. Reads back the registry and the vault.
  8. If the vault allows it, sends a small draw from the borrower account, then a repay of the same amount. Both are mocks: no token or value moves.
  9. 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 flagDefaultWhat the account does
--account <name>coston2-testDeploys both contracts and relays the record. Anyone may relay a signed record
--inspector-account <name>The --accountSigns the record digest. Its address is the key the vault pins
--lender-account <name>The --accountThe vault's lender. Opened only to read its address
--borrower-account <name>The --accountSends 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.

A check through the Flare Confidential Compute extension (registry v1) Provisioner holds the private coverage numbers Extension machine compares the record with the coverage file Machine’s proxy serves the signed result Flare data providers relay above 50 % of signing weight Anyone fetches the result and submits it Inspector holds the proof record InstructionSender requestVerification, submitResult FlareTeeManager is the signer a machine of this extension? ProofRegistry v1 takes records from the sender contract only encrypted signs fetch request instruction relay submitResult signer? record
A check through the Flare Confidential Compute extension (registry v1). The earlier demo, as run on Coston2 against registry v1. Who sends what. The provisioner and the inspector are separate roles; in the demo both were the owner’s test wallet. The machine is a test machine with no enclave, and it checks no inspector signature.
The same flow in words
  1. The provisioner sends the coverage file to the machine as a direct action, encrypted to the machine’s key and signed.
  2. The inspector calls requestVerification with the proof record and pays the fee.
  3. Flare’s data providers relay the instruction. It reaches the machine only above 50 % of signing weight.
  4. 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.
  5. Anyone fetches the result from the machine’s proxy and calls submitResult.
  6. The contract recovers the signer and asks FlareTeeManager whether it is a machine of this extension in production.
  7. 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.

StageDriverWhat it does
Acoston2-run.shDeploys and registers the extension, starts the test machine, wires the gate
Bcoston2-demo.shThe passing path and the failing path
Ccoston2-finish.shThe stale path, then a normal 90-day pass so the demo is left open. Run twice, about a day apart
Jobcoston2-job.shPosts 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:

PathInput (invented)What happened
PassingCoverage 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
FailingCoverage 700 of 1,000 unitsThe 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:

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#