Skip to content
LogoLogo

2. Hashing

  • H(x) = SHA3-256(x).
  • Tagged hash: TH(tag, x) = SHA3-256(varbytes("ARRK/" ‖ tag) ‖ x).
TagUsed for
txidtransaction id (no witnesses)
wtxidtransaction id including witnesses
blockblock id (the AuxPoW commits to it, §9.6)
merkle/nodeinternal merkle nodes
sighashsignature message
spent-outputscommitment to spent outputs
pubkeykey hash in locks
multisigmultisig policy hash
assetissued asset ids
asset-authoritymint authority token id
asset-controlissuer control token id
policyspending-policy hash in POLICY locks (§4.2)
filter/item, filter, filter/headercompact-filter item mapping, filter hash, filter-header chain (§9.5)
utxo/commitmentchain-state commitment over the LtHash (§9.7)
snapshotsnapshot file checksum (§9.7.2)
checkpoint, checkpoint/setcheckpoint signed message, signer-set id (§9.8)
cmpct/shortidcompact-block short ids (§12.4)
messagesigned messages (§3.5)
checkpoint/relayP2P relay de-duplication key (not consensus)

Merkle root over a list of 32-byte leaves:

  • An empty list → 32 zero bytes. One leaf → that leaf.
  • Otherwise, pair the leaves left to right, node = TH("merkle/node", left ‖ right). An unpaired last element is promoted unchanged (never duplicated). Repeat until one hash remains.