Skip to content
Warrantv0.1

Testnet

Trace anchoring against Rialo testnet works. Settlement does not go through it.

Anchoring a trace onchain is real and running against testnet — the anchor binds the record, not the money.

{
  "to": "released",
  "payload_hash": "b1946ac92492d2347c6235b4d2611184",
  "chain_ref": "rialo:testnet#19189427"
}

What anchoring actually does

Every trace row has a payload_hash, a SHA-256 over its contents. recordTrace creates a marker account onchain whose address is derived from that hash:

address = sha256("warrant.trace.marker.v1|" + payloadHash)

Two properties follow, and both are the point:

  • Publicly verifiable. Anyone holding a trace can recompute the address and look it up. They do not need access to our database to check that the record they were given is the record that was anchored.
  • Idempotent through the chain itself. The address is a pure function of the payload, so anchoring the same trace twice produces the same account. An "already exists" result is success, not a conflict.

verifyAnchor(payloadHash) resolves the reference back, and the console shows it on a settled warrant's trace.

What the anchor does not prove

The anchor binds the payload, and the code says so explicitly:

export const ANCHOR_STRENGTH: AnchorStrength = "payload";

It proves that this exact record existed at that block. It does not prove that funds moved, because funds do not move onchain — see contracts.

Timing

Anchoring runs after the settlement transaction commits, never inside it. Network I/O inside a database transaction would hold a lock open for the length of a chain round trip, and a slow chain would become a slow settlement.

The consequence for you: a warrant can be settled with chain_ref: null for a short window. That is normal and temporary, not a fault. The console says "not anchored" plainly rather than showing an empty field, because "not anchored" and "anchored, reference unknown" are different facts.

Reading a reference

rialo:testnet#19189427
  │       │        └── block
  │       └── network
  └── chain

Running against it

WARRANT_CHAIN=rialo
RIALO_RPC_URL=…
REX_ENDPOINT=…
RIALO_ANCHOR_SECRET_KEY=…

Default is mock, so tests stay offline and deterministic. Every test that passes against MockRex and PostgresLedger also passes against the real clients.

Raw JSON-RPC in two places

getTransaction and getSignaturesForAddress are called as raw JSON-RPC rather than through the CDK, because the CDK's parsers do not match this node build. Not a design preference — a compatibility workaround, noted here so it is not mistaken for one.

Amounts

Anchoring changes nothing about the wire format. Amounts remain integer strings of the asset's smallest unit, ^[0-9]+$.

"8400000"    8.40 USDC
8400000      rejected — a JSON number
"8.40"       rejected — not the smallest unit