Documentation Flows
Flows
The six flows of the prototype as diagrams. Under each one the same steps are written out in words.
In every diagram, filled grey boxes are steps off the chain, outlined boxes are contracts on Coston2, boxes with a double line are Flare's own network, and the tinted box is the extension's machine.
From the inspection to the loan gate#
The whole path, from a GPU answering with its serial number to a draw being allowed or refused.
The same flow in words
- The inspector reads every host of the facility with the capture script.
- The inspector kit matches the serial numbers to the collateral schedule, adds the findings and builds the report and the proof record.
- The borrower’s private coverage file goes to the extension machine, encrypted, as a direct action. It is never published.
- The inspector asks the extension’s contract for a check. Flare’s data providers relay the instruction to the machine.
- The machine compares the record with the coverage file and signs PASS or FAIL.
- Anyone submits the signed result. The contract checks the signer with FlareTeeManager and passes the record to the registry.
- The borrower asks the vault for a draw. The vault reads the registry and allows the draw only on a fresh pass.
- The lender reads the result on chain. The private inputs stay with the machine.
One inspection with the inspector kit#
What the inspector does, and which file each step produces. Details: Inspector kit.
The same flow in words
inspect newstarts the job folder: the schedule, an empty findings file, the capture script and a code for this inspection.- On each GPU host the capture script runs read-only queries and writes one file with the serial numbers, a telemetry snapshot, the time and the code.
- The capture files go into the job’s
captures/folder. The inspector enters findings infindings.json. inspect buildmatches serials to the schedule, checks each capture, rates every exception and writes the report, the proof record and the evidence index.inspect verifyrebuilds everything from the evidence files and says whether the hashes still hold.coston2-job.shposts the record to the Coston2 testnet, and refuses a job that does not verify.
A check through the extension#
Who sends what when a record is checked against the private coverage file. Details: FCC extension.
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.
What the vault checks before a draw#
The order of the vault's checks and the error each one gives. Details: Contracts.
The same flow in words
- The amount must be above zero, or the draw reverts with
ZeroAmount. - The registry must hold a record for the facility, or
ProofMissing. - The record must be inside its valid-until date, or
ProofStale. No transaction is needed for a record to go stale: the clock does it. - The result must not be FAIL, or
ProofFailed. - A PASS_WITH_EXCEPTIONS record lets a draw through only if this vault was set to allow it, or
ProofHasExceptions. - The amount must fit under the credit limit, or
CreditLimitExceeded. - Otherwise the draw goes through and the vault emits
DrawAllowedwith the record’s digest.
A repayment proven through the Flare Data Connector#
How a payment on another ledger is credited to a loan. Details: Repayment proof.
The same flow in words
- The borrower pays on the XRP Ledger testnet. The payment’s memo carries the loan’s 32-byte reference.
- The client prepares a request of type
Payment. It only reads, and handles no key. - The request and its fee go to FdcHub on Coston2.
- Flare’s data providers check the payment and agree on it in a voting round.
- After the round the proof is fetched and handed to
creditRepayment. Anyone may do this. - The ledger checks the proof with Flare’s verification contract, checks the receiving address and the reference, and credits the loan once.
- The vault counts only repayments the ledger has credited. The borrower cannot report one.
One cycle of the runner#
What the automatic container does every two hours. Details: Runner.
The same flow in words
- A timer starts a cycle every two hours, while the computer the container lives on is awake.
- The runner runs the repository’s seven test suites as they are.
- It plays the next of ten scenarios: a whole invented inspection made with the inspector kit.
- It checks that the report follows from its evidence. If not, nothing is posted.
- It posts the record to its own registry with its own test wallet. This does not pass through Flare Confidential Compute.
- It reads what its vault does with a draw, and compares that with what the scenario said should happen.
- It writes the feed and uploads it to its own Cloudflare Pages project.
- The test activity page reads that feed in your browser.