Skip to content

Verify a signed record

This content is not available in your language yet.

Every decision, order, broker reply, fill with itemized charges, and control-plane change is written to an append-only hash chain on your machine (geometer-markets-attest/1). You — or a chartered accountant, partner, or external reviewer — can verify that record offline without trusting Geometer.

Each (account_id, mode) pair (live, paper, or backtest) maintains its own isolated directory under <data_dir>/records/<account_id>/<mode>/:

records/default/live/
├── manifest.json # chain header: version, chain_id, account_id, mode, signer_pub_key
├── segments/
│ ├── 2026-04-06.jsonl # UTC-date-partitioned canonical JSON lines (strict contiguous seq)
│ └── 2026-04-07.jsonl
├── checkpoints.jsonl # Ed25519-signed checkpoints (daily close, stop switch, limits edit)
└── anchors/
├── checkpoint-1.ots # OpenTimestamps proof for checkpoint_seq 1
└── checkpoint-2.ots

The chain_id is a domain-separated SHA-256 digest of account_id and mode committed into every entry hash, preventing paper entries from ever being spliced into a live record or entries from one account being spliced into another.

Kind What it captures
decision Every pre-trade risk check (approved or refused), decision_id, limits_version, limits_hash, refusal_codes, order parameters, and charge preview.
order Every broker lifecycle step (sent, modified, cancelled, broker_ack, broker_rejected, outcome_unknown, reconciled), guard tag, and exact outgoing source_ip.
fill Every executed fill (guard order or outside order) with itemized charges (brokerage, stt, exchange_txn, sebi_fee, stamp_duty, gst, total), rate_card_version, and net_value.
cash_flow Non-trade ledger cash movements (deposit, withdrawal, dividend, interest, other_charge, settlement).
stop_switch Every engage, escalation, or human re-arm with scope, target, prev_mode, new_mode, actor, and reason.
limits_change Every activation or edit of limits.json with new_limits_version, new_limits_hash, actor, and changed_fields.
session_event Broker authentication lifecycle (login, logout_daily, logout_manual, expired, login_failed).
address_change Static egress IP setup, rotation, IST week key, whether an override was used, and broker probe outcome.
outside_order Orders discovered on the broker’s order book not placed through the Order Guard, and action taken (flagged, counted_in_limits, tripped_stop_switch).

Secrets (broker API secrets, access tokens, local guard keys, and private signing keys) never enter any record entry.

Every entry uses strict canonical JSON (sorted keys, zero whitespace, exact base-10 decimal strings, no floating-point numbers, no null, unknown fields rejected) and is fsynced to disk before an order is dispatched to the broker.

During geometer-markets init, a dedicated Ed25519 signing key pair is generated on your host and stored encrypted at rest. Its full 64-character hex public key (signer_pub_key) is printed at setup and included on every evening report.

The guard signs a checkpoint in checkpoints.jsonl:

  • Automatically at daily close (16:05 IST, including zero-entry heartbeats on quiet days)
  • Immediately after every stop_switch, limits_change, address_change, or key_rotation
  • On clean shutdown
  • On manual request via geometer-markets record checkpoint

Each checkpoint links to the previous checkpoint’s hash, commits to from_seq, to_seq, entry_count, and head_hash, and is verified with strict RFC 8032 non-malleable Ed25519 checks. Signed key rotation (reason: "key_rotation" carrying next_signer_pub_key) lets you rotate signing keys while preserving an unbroken chain of custody.

In live mode, OpenTimestamps anchoring is enabled by default (record.ots_anchor: true; off by default in paper and backtest).

  • Hash-only privacy: only the 32-byte checkpoint_hash is submitted to public OpenTimestamps calendar servers. Zero order details, symbols, P&L figures, account IDs, or IP addresses leave your machine.
  • Non-blocking: OTS submission and upgrades run asynchronously so calendar downtime never interferes with trading.
  • Explicit anchor states reported by verify:
    • ANCHORED_VERIFIED: .ots proof evaluates cleanly from checkpoint_hash to a verified Bitcoin block header (--check-bitcoin or --bitcoin-headers).
    • ANCHORED_UNVERIFIED_HEADERS: .ots proof structurally matches a Bitcoin block height and merkle root, checked completely offline without Bitcoin headers.
    • PENDING: calendar attestation recorded, awaiting Bitcoin block upgrade.

If you disable OTS anchoring (record.ots_anchor: false), both the evening report and verify explicitly report anchored: false.

Verify offline with geometer-markets verify

Section titled “Verify offline with geometer-markets verify”

Verify either a local record directory or an exported .tar.gz bundle (bundles are stream-verified directly in memory with zero disk extraction, path allowlists, and decompression limits against archive bombs):

Terminal window
# Verify a local record directory offline
geometer-markets verify ./records/default/live
# Pin the full 64-hex Ed25519 public key from your setup or evening report
geometer-markets verify ./audit-bundle.tar.gz \
--expect-key <64-hex-signer-pub-key>
# Verify an anchored checkpoint against a known sequence and head hash
geometer-markets verify ./audit-bundle.tar.gz \
--expect-key <64-hex-signer-pub-key> \
--expect-anchor 42:<64-hex-head-hash> \
--require-anchored

Useful flags and exit codes:

  • --allow-uncheckpointed-tail: by default, verify fails (exit 1) if entries exist after the last signed checkpoint or if checkpoints.jsonl is empty (preventing silent checkpoint-stripping attacks). Pass --allow-uncheckpointed-tail during mid-day operational checks to inspect entries written before the 16:05 IST checkpoint; the verifier prints the exact uncheckpointed range clearly.
  • --expect-initial-key / --expect-active-key / --expect-key: requires a full 256-bit (64-hex) public key (truncated key IDs are rejected).
  • Exit codes: 0 = verified clean; 1 = integrity or tamper failure (prints exact failing seq or checkpoint_seq and code); 2 = usage, I/O, or unsupported format error.

Independent public verifier (geometer-verify/markets/)

Section titled “Independent public verifier (geometer-verify/markets/)”

The exact same dependency-free Go verifier module is published open source under Apache-2.0 at GeometerLabs/geometer-verify (markets/).

Anyone — a tax adviser, partner, or external auditor — can build the public verifier directly from source and verify your exported bundle with zero reliance on Geometer’s binary or servers.

After market close, geometer-markets report summarizes the day’s chain in plain English as local HTML and JSON (and optionally sends it via your own SMTP settings):

  • Trades executed and net P&L after itemized charges (with the dated rate-card version)
  • Limits utilization and every refused order with its reason
  • Outside orders detected on the broker’s order book
  • Static IP address used on outgoing orders
  • Full 64-hex signer_pub_key, latest checkpoint sequence, and chain verification status
  • When the Execution & Fee Audit (tca) add-on is enabled, arrival-price implementation shortfall and broker contract-note fee reconciliation tables embedded directly in the report (see Opt-in modules and Guard Console)