Skip to content

feat(receipts): add ledger-anchored online verification alongside offline checks #358

Description

@karagozemin

Difficulty

Hard — production engineering across multiple components; a small cleanup or test-only patch does not complete this issue.

Context

docs/LIMITATIONS.md explicitly states that receipt verification is offline-only and does not establish that a receipt matches chain state. Keep offline verification intact and add an explicit online evidence mode.

Starting points

Scope

  • Introduce an online verifier binding a receipt to network, contract, ledger and transaction/event evidence.
  • Cross-check commitments, bidder ordering, clearing outcome and settlement/refund evidence using paginated reads.
  • Distinguish internally valid, chain-confirmed, unverifiable and contradictory results.
  • Expose evidence metadata and deterministic CLI JSON/exit-code contracts.

Acceptance criteria

  • A fabricated but internally consistent receipt cannot be labeled chain-confirmed.
  • Network/contract mismatch, changed winner and omitted payout evidence fail with field-level reasons.
  • Pruned ledger history and provider outage return unverifiable, not valid or fabricated evidence.
  • Provider disagreement is visible; RPC agreement is not described as a cryptographic proof of consensus.
  • Existing offline fixtures remain valid without requiring network access.

Verification

Exercise an injected ledger adapter with canonical, tampered, missing-history and contradictory-provider fixtures; add an opt-in read-only testnet integration test with recorded ledger references.

Out of scope

Changing settlement, storing private identities, or making paid/mainnet transactions during verification.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions