> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sealforge.auction/llms.txt
> Use this file to discover all available pages before exploring further.

# Verification and evidence

> How to audit any auction from the chain, the testnet record, reproducibility, CI and the test inventory.

## Audit any auction

Status: `Testnet`.

### Command line

```bash theme={null}
cargo build --release -p sealforge-auditor
./target/release/sealforge-audit \
  --published https://<coordinator>/v1/auctions/<CODE>/result \
  --endpoint https://<a lightwalletd you choose>:443
```

| Flag | Meaning (`crates/sealforge-auditor/src/main.rs`) |
| - | - |
| `--published` | The published result, as a URL or a file |
| `--endpoint` | Any lightwalletd-compatible gRPC server (Zaino, lightwalletd). Env `SF_ZAINO_URL` |
| `--ivk` | Check against a UIVK you got elsewhere, instead of the one in the result |
| `--from`, `--to` | Override the scan range. Default: the published `scan_from_height..scan_to_height`. Widen it to look for bids outside the range the coordinator scanned |
| `--trustee-key SLOT=HEX` | A trustee's key for this auction, as the trustee gave it to you (they get it from `sealforge trustee check`). Repeat per trustee. A published key that differs fails the audit |
| `--allow-unattested` | Don't fail when no trustee attestations are published (auctions from before they existed) |
| `--json` | Machine-readable report |

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](https://github.com/Udoka-AM/sealForge/blob/main/docs/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.

| Auction | Shape | Evidence |
| - | - | - |
| `KE5DFF4PDA` "Genesis Pass" | 7 sealed bids, 4 units | [evidence/testnet-genesis.md](https://github.com/Udoka-AM/sealForge/blob/main/docs/evidence/testnet-genesis.md): open/close/reveal heights, refund and payout txids with signer pairs, every wallet's end balance, escrow fees, CLI and browser audits |
| `K7GHHBC4GP` "Community Pass" | 25 sealed bids, 10 units | [evidence/test-run.md §The 25-bid auction](https://github.com/Udoka-AM/sealForge/blob/main/docs/evidence/test-run.md#the-25-bid-auction-k7ghhbc4gp): timeline, 5 refund transactions and the payout, signer pairs, spot-checked wallets, CLI audit |

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](https://github.com/Udoka-AM/sealForge/blob/main/docs/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](https://github.com/Udoka-AM/sealForge/blob/main/docs/spikes/frost-pczt.md)).

## Reproducibility

| What | How |
| - | - |
| Local chain | `scripts/regtest.sh up <dev-wallet-UA>` (Zebra + Zaino), `scripts/regtest.sh envoy` (gRPC-web), `scripts/regtest.sh mine N`. See `infra/regtest/README.md` |
| Your own auction | [QUICKSTART.md](https://github.com/Udoka-AM/sealForge/blob/main/docs/QUICKSTART.md), starting from `examples/auction.toml` |
| A whole testnet auction with simulated bidders and trustees | `scripts/testnet-demo.sh <plan.conf>` (plan format at the top of the script). Test networks only |
| Test vectors | `cargo run -p sealforge-core --example vectors` ([Appendix](https://docs.sealforge.auction/appendix/test-vectors.md)) |
| Linkability figures | `cargo run -p sealforge-linkability --release -- --out docs/evidence` |
| Test inventory and counts | `DATABASE_URL=… scripts/test-inventory.sh` |

### CI

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

| Job | Steps |
| - | - |
| `rust` | `cargo fmt --all --check`; `cargo clippy --workspace --all-targets -- -D warnings`; `cargo test --workspace` (Postgres 16 service); `cargo check -p sealforge-auditor --target wasm32-unknown-unknown --no-default-features --features wasm` |
| `wasm` | Build auditor, signer, scanner and wallet WASM from source; upload them for comparison with the committed copies |
| `migrations` | Apply every migration to a fresh Postgres 16, then load `seed/dev.sql` |
| `web` | `pnpm install --frozen-lockfile`; `pnpm lint`; `pnpm typecheck`; `pnpm test`; `pnpm build` |

## Test inventory

Generated from test-runner output by `scripts/test-inventory.sh` into [evidence/test-inventory.md](https://github.com/Udoka-AM/sealForge/blob/main/docs/evidence/test-inventory.md), the single source for counts and names. Don't hand-count.

Adversarial tests worth reading first:

| Property | Test | Where |
| - | - | - |
| One trustee can't sign | `one_trustee_cannot_sign_alone` | `crates/sealforge-escrow/src/signing.rs` |
| Every 2-of-3 subset produces a consensus-valid `SpendAuth` signature (checked with reddsa 0.6.1) | `two_of_three_produces_consensus_valid_spend_auth_signatures` | `crates/sealforge-escrow/src/signing.rs` |
| A forged DKG package, a one-signer package, concurrent joins/completions/signing | `three_trustees_run_the_dkg_through_the_coordinator` | `crates/sealforge-cli/tests/dkg_e2e.rs` |
| Swapped escrow address, replayed or invented trustee signatures | `a_swapped_address_fails_every_trustee`, `signatures_are_bound_to_the_auction_and_slot`, `pinned_keys_catch_invented_trustees`; end to end in `three_trustees_run_the_dkg_through_the_coordinator` | `crates/sealforge-auditor/src/escrow.rs`, `crates/sealforge-cli/tests/dkg_e2e.rs` |
| A viewing key for another escrow | `another_escrow_s_viewing_key_does_not` | `crates/sealforge-scan/tests/escrow_address.rs` |
| Hidden bid or inflated volume | `inflated_volume_or_hidden_bid_is_caught` | `crates/sealforge-auditor/src/lib.rs` |
| Rewritten refunds or outcomes | `rewritten_outcome_is_caught` | `crates/sealforge-auditor/src/lib.rs` |
| Suppressed reveal | `a_suppressed_reveal_is_caught` | `crates/sealforge-auditor/src/lib.rs` |
| Tampered root, foreign leaf, padding passed off as a bid | `tampered_root_breaks_inclusion`, `tampering_fails`, `padding_cannot_be_proven_as_a_bid` | auditor; `crates/sealforge-core/src/merkle.rs` |
| Duplicate commitment can't displace the original | `earliest_duplicate_commitment_wins_regardless_of_order` | `crates/sealforge-core/src/selection.rs` |
| Replayed or stale API requests | `rejects_bad_signatures_and_stale_timestamps`, `organiser_registration_requires_invite_and_rejects_replays` | `crates/sealforge-coordinator/tests/api.rs` |
| Organisers can't touch each other's auctions | `organisers_cannot_touch_each_others_auctions` | `crates/sealforge-coordinator/tests/api.rs` |
| Wallet refuses chain gaps and reorgs | `scanning_follows_the_chain_and_refuses_gaps_and_reorgs` | `crates/sealforge-wallet/src/lib.rs` |
| Rust/TS byte parity | `vectors_match_the_checked_in_file`, TS "shared vectors file" | `crates/sealforge-core/tests/vectors.rs`, `packages/bid/src/bid.test.ts` |

Not covered by an automated test: the testnet runs themselves (recorded as evidence), the embed widget, and anything ShieldRamp beyond the score.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.