snarkVM
snarkVM copied to clipboard
[Proposal] Update `finalize_root` derivation
Motivation
This PR explores a new method of deriving the finalize root. Instead of using FinalizeOperations to create a tree and find the root, we use the FinalizeStore atomic_write_batch instead. We simply hash it to construct the new finalize_root (which can be renamed as it is no longer a root).
The finalize root is now derived when VM::speculate or VM::finalize is called, instead of being derived from the FinalizeOperation state in Transactions, which means we can safely remove FinalizeOperations entirely if desired.
Note: The FinalizeOperations have not been removed in this proposal, but will be removed if we decide to go down this route.
TODO: Resample genesis block
gm