Skip to main content

Module hash

Module hash 

Source
Expand description

State hashing (see docs/kernel-protocol.md). The hash covers the kernel’s own bookkeeping and the user state together, so a re-fold that diverges in either is caught.

Constants§

STATE_HASH_PREFIX
Domain separator, so a state hash can never collide with any other sha256 we take.

Functions§

sha256_hex
Lowercase hex sha256 of bytes.
state_hash
sha256("vlo1\0" + canon(kernel_state) + "\0" + canon(state)), lowercase hex.