PQGrind Docs

Overview and conformance

This section is normative. An indexer conforms if, for every block from H_start onward, it produces the same set of valid mints, the same unit ledger, and the same burned count as these pages define.

Pages

Page Defines
Claim output the 13-byte OP_RETURN and how to parse it
Valid mint candidate selection and the nine ordered conditions
Score exact integer arithmetic for layer 2 and the minimum level
State transition how units are created, moved and burned
Reorganizations what happens when blocks are replaced
Constants and difficulty every issuance number (pending freeze)

Conventions

  • txid is the transaction ID as shown by Bitcoin Core and block explorers (display order), read as an unsigned big-endian 256-bit integer. Equivalently: SHA256d(non-witness serialization), byte-reversed, big-endian.
  • Integer division is floor division. No floating point anywhere in the rules.
  • Byte strings are written in hex, most significant nibble first, in the order they appear on the wire.
  • "Output k" is tx.vout[k], counting from 0.
  • MUST, MUST NOT, SHOULD as in RFC 2119.

Precedence

When this text, the whitepaper and any program disagree, this text (as frozen, with its published hash) wins. Disagreements in programs are bugs; disagreements between this text and the whitepaper are to be reported and resolved before freeze.

What the indexer does not check

The indexer does not re-verify signatures or the lock's cryptographic relation. It relies on the fact that the transaction is confirmed: Bitcoin nodes executed the script, so the witness satisfied it. The indexer checks that the script is exactly the expected template and that the witness has the expected shape. A different script that merely "looks like" the lock fails the template check.