core-rs-albatross
core-rs-albatross copied to clipboard
Create tests that make sure ZKP keys stay compatible
The ZKP circuits require very specific serialization of the MacroBlock
.
In particular, it assumes the body is hashed as hash(pk_tree_root || body_bytes)
, where body_bytes
is 64 bytes long.
The header is hashed as hash(network || version || block_number || intermediate_header_bytes || body_hash || history_root)
where intermediate_header_bytes
is exactly 4+8+32+32+32+96+32+32=268 bytes long.
We should create tests that make sure we don't change these constraints by accident.