Expand description
The verifier’s hasher: one BLAKE3 lane for every record in flight.
§The problem
Besides the chain steps, checking a signature takes 29 BLAKE3 compressions, in three independent strands:
| Strand | Compressions | Depends on |
|---|---|---|
| A: digest, then Merkle levels 0..6 | 1 + 7, one after the other | the loaded record |
| C0: commitment chunk 0 (blocks 0..15), then the parent | 16 + 1 | all chain ends; the parent also needs C1 |
| C1: commitment chunk 1 (blocks 16..19) | 4 | all chain ends |
Inside a strand every compression needs the one before it, 33 cycles earlier. One record alone would leave the lane idle most of the time.
§The idea: interleave many records
The lane accepts one compression per clock from any record. Every clock the scheduler looks at all 64 contexts, finds the strands whose next compression may start, and issues the oldest record’s (C0 before C1 before A within a record). With about 20 records in flight the lane is busy 29 out of every 35 cycles, which matches the chain lanes’ 35-cycle period.
cycle t t+1 t+2 t+3 t+4 t+32 t+33
pick ──▶ read header/CV RAMs, ──▶ ··· ─▶ build the block ─▶ BLAKE3 ─··─▶ result ─▶ CV write,
(ctx, ask chains for row (row arrives) 28 stages compare,
strand) digits§Storage per context
| RAM | Rows | Written by |
|---|---|---|
| header | 0 digest block pk_hash ‖ nonce ‖ message; 1 sib0 ‖ pk_hash; 2 sib1 ‖ sib2; 3 sib3 ‖ sib4; 4 sib5 ‖ sib6 | the loader |
| check | root ‖ pk_hash (the two values results are compared with) | the loader |
| CV m, CV 0, CV 1 | the running chaining value of strands A, C0, C1 | results |
§Results
- The digest’s 64 output bytes become the 68 digits (low 2 bits of each
byte, then the base-4 checksum
Σ(3 − d)), sent to the chain block. - Merkle level 6’s output is compared with the commitment’s root.
- The parent’s output is compared with
pk_hash.
A context is HasherOutput::done after both comparisons; its two
answers are HasherOutput::merkle_ok and HasherOutput::chains_ok.
Structs§
- Check
Write - The two values a context’s results are compared with.
- Hasher
Input - Inputs of the hasher.
- Hasher
Output - Outputs of the hasher.
- Header
Write - One header-RAM row write (
ctx·8 + row). - Loaded
- A record is fully loaded: strand A may start.
- Verify
Hasher - The hasher: one BLAKE3 lane, its scheduler, and the per-context RAMs.
Functions§
- digits_
kernel - The 68 digits of a digest output: low 2 bits of bytes 0..64, then the
base-4 checksum
Σ (3 − d)=192 − Σ d, least significant digit first. - first_
set_ kernel - Lowest set bit of 64, as
(found, index), in two levels of eight. - index_
bit_ kernel - Bit
levelof a 7-bit key index (the side of the running hash). - oldest_
first_ kernel - First set bit at or after
start(wrapping), as(found, index). - verify_
hasher_ kernel - The hasher’s logic.