Skip to main content

Audit any auction

Status: Testnet.

Command line

What it does (crates/sealforge-chain/src/audit.rs scan_incoming, sealforge_auditor::audit_chain):
  1. Trial-decrypts every compact block in range with the UIVK, for both the Orchard and Ironwood pools.
  2. Fetches each matching transaction and decrypts value, output index and memo.
  3. Reclassifies every payment with sealforge_core::selection and recomputes with compute_result.
  4. Compares clearing price, volume, valid bid count, winner count, Merkle root and every per-bid outcome.
  5. Checks the escrow (sealforge_auditor::check_escrow_result, sealforge_scan::escrow_address): the UIVK receives at exactly the published escrow_ua, and every trustee’s Ed25519 attestation over that address verifies.
Exit code 1 on any mismatch. Auctions that ran before trustee signatures existed (testnet KE5DFF4PDA and K7GHHBC4GP) have none to check, so audit them with --allow-unattested: every other check still runs. The website shows a neutral note for such auctions once bidding is over, and the full warning for any auction still taking bids. Sample output and the tamper test (a result edited to hide a bid and claim a lower price is caught, with exit code 1): evidence/audit-rescan.md.

In the browser

On /audit/<CODE>, Rescan the chain in my browser runs the same sealforge-scan and sealforge-auditor compiled to WebAssembly. Blocks come over gRPC-web from a lightwallet endpoint the auditor types in. Nothing but the result being checked comes from sealForge. The older quick check (payments_from_published) only checks that the published list is self-consistent. It doesn’t detect an omitted bid, and the page says so.

The escrow address, before you bid

Each trustee rebuilds the escrow address from its own share of the FROST group key and signs it. The auction page checks those signatures in your browser (check_escrow_view, WebAssembly) and shows “All 3 trustees signed this address” with each trustee’s key. It only says so when exactly trustee slots 1, 2 and 3 are listed, each with a different key, and all three signed this auction, slot and address; a shorter list, a repeated key or a missing signature fails. Every payment, reveal and QR code gets its address from the same check, and it fails closed: unless every signature verifies for exactly the address shown, nothing can be paid, and a bid prepared earlier can only be paid or revealed to the address saved on its receipt. The coordinator publishes the trustee list, so a coordinator that invented all three trustees could sign for them. Two things cover that: each trustee runs sealforge trustee check <CODE> once the auction opens, which confirms the public page shows the address it signed and its own key (and trustee sign refuses to co-sign otherwise); and trustees post their keys somewhere the coordinator doesn’t control, so bidders can compare them or pin them with --trustee-key. A coordinator that shows trustees one page and bidders another isn’t caught by the trustee check. Comparing keys from the trustees’ own channels is what catches it.

As a bidder

Load your receipt on /verify. The WASM auditor (verify_receipt) recomputes your leaf, checks the Merkle proof against the published root, and shows your outcome and refund plan. Tests: winning_receipt_is_included_with_its_refund_plan, losing_and_unknown_receipts, tampered_root_breaks_inclusion.

Testnet record

Both auctions ran on public Zcash testnet through the hosted instance, in sealed-reveal mode, uniform price. Full tables (heights, txids, signer pairs, per-wallet end balances, fees) live in the evidence files. They are not copied here. Both used test-network-only settings (SF_MIN_WINDOW_BLOCKS, SF_REFUND_DELAY_SECS) so they’d fit in about an hour. Both were run from one machine holding all three trustee keystores (scripts/testnet-demo.sh), which defeats the threshold and is acceptable only on test networks. Trustee aliases in the evidence are labels for those keystores.

Regtest

  • Full auction on a local chain (Zebra + Zaino regtest, real binaries): evidence/regtest-e2e.md. Deposit mode, 4 bids, close, publish, receipt check, refund planning.
  • FROST spike: the first 2-of-3 FROST escrow spend mined on regtest, txid 8367e1c6ca8ef305678a7179faf3d161647f90da40bb5462ecc6dc6275ec016f (docs/spikes/frost-pczt.md).

Reproducibility

CI

.github/workflows/ci.yml, on every push to main and every pull request:

Test inventory

Generated from test-runner output by scripts/test-inventory.sh into evidence/test-inventory.md, the single source for counts and names. Don’t hand-count. Adversarial tests worth reading first: Not covered by an automated test: the testnet runs themselves (recorded as evidence), the embed widget, and anything ShieldRamp beyond the score.