snarkVM icon indicating copy to clipboard operation
snarkVM copied to clipboard

[Proposal] Update `finalize_root` derivation

Open raychu86 opened this issue 2 years ago • 1 comments

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

raychu86 avatar Sep 08 '23 03:09 raychu86

gm

An-tol avatar Jul 14 '24 10:07 An-tol