Skip to main content

Module encode

Module encode 

Source
Expand description

Canonical binary encoding for consensus hashing and signing.

Fixed-width integers are little-endian; variable-length byte strings are u32-length-prefixed. This encoding is what gets hashed — the JSON used for disk storage is non-consensus.

Functions§

put_bytes
put_fixed
put_i64
put_u32
put_u64