Expand description
Hashing helpers.
Block hashes are double-SHA256 over the serialized header (the convention Equihash ASICs and pool software assume). Everything else — txids, Merkle nodes, addresses — uses Blake2b-256 with a domain-separating personalization. Both are conservative against Grover-style quantum speedups at 256 bits.
Functions§
- address_
hash - Address derivation: full Blake2b-256 of the public key. 32 bytes keeps a post-quantum security margin (Grover leaves ~128 bits of preimage resistance).
- blake2b_
256 - General-purpose consensus hash (txids, sighashes).
- blake2b_
256_ personal - Blake2b-256 with the given 16-byte-max personalization.
- blake2b_
256_ raw - Un-personalized Blake2b-256 — byte-identical to the VM’s
BLAKE2Bopcode. Used to derive BLOCK-20 balance-storage keys (H(0x01 ‖ address)) from native code so the native AMM and the token contract share the same slots. - display_
hash - Display convention for block hashes / txids: reversed hex, like Bitcoin, so low-target hashes show their leading zeros.
- sha256d
- Double-SHA256 — the block (header) hash.