Skip to main content

PACK_HISTORY

Constant PACK_HISTORY 

Source
pub const PACK_HISTORY: usize = _; // 1usize
Expand description

Earlier keys’ pk_nonces kept for the commitment prefix.

A key’s chain ends leave the chain engine END_DELAY cycles after its chains start. With Haraka (62 cycles) that is still the key’s own period; with SHA-512 chains (248 cycles) three periods later, when newer keys are already being fed. The packer picks the nonce by the key’s age.

The formula counts how many whole periods the chain engine spans, plus one. Haraka: 62 / 68 + 1 = 1. BLAKE3: 86 / 68 + 1 = 2. SHA-512: 248 / 68 + 1 = 4. Each entry is one 16-byte register, so this is cheap.