Skip to content

Merkle batches

The gateway groups confirmed receipts into batches and appends them to a single log for its network. Each leaf input is receipt_leaf, a digest of the full receipt record: hash, gateway timestamp, network ID, sequence, and key epoch. The log uses the Merkle tree rules in RFC 9162.

A checkpoint gives the tree size, Merkle root, network ID, key epoch, and gateway timestamp. A majority of signers must sign it. Each signer checks that the new tree extends the one it last signed and saves the new state before signing an extension.

An inclusion proof shows that a specific receipt record is in a given checkpoint. A consistency proof shows that an older tree is a prefix of a newer one. Neither shows that the gateway logged every receipt or that it will keep publishing checkpoints.

Receipt confirmation does not wait for a checkpoint. Use proof bundle verification when you need to check that a receipt was logged.