Header chain
The witness appends Zcash block headers to the program. A header is accepted only if its previous hash equals the hash of the last accepted header and its proof of work meets the target encoded in its bits field. The program keeps the most recent four thousand and ninety six headers in a ring and discards older ones. A memo is acted on only once the header of its block has been accepted and at least twelve headers have been accepted after it.
The witness is anonymous and keyless. Anyone can submit a header. A wrong header is rejected and costs the submitter the transaction fee. There is no reward for being the witness beyond the program continuing to work.
Zcash tip
| field | value |
|---|---|
| height | |
| tip hash | |
| tip time utc |
Header ring
Header fields
| field | offset | size | meaning |
|---|---|---|---|
| version | 0 | 4 | block version |
| prev hash | 4 | 32 | hash of the previous header |
| merkle root | 36 | 32 | root of the transaction tree |
| final sapling root | 68 | 32 | sapling commitment tree root |
| time | 100 | 4 | unix time |
| bits | 104 | 4 | encoded target |
| nonce | 108 | 32 | equihash nonce |
| solution | 140 | 1344 | equihash solution with its length prefix |