miden-crypto/src/merkle
Qyriad 31da24fff3 feat(smt): implement root-checked insertion
This commit implements SparseMerkleTree::insert_ensure_root(), a version
of SparseMerkleTree::insert() that prevents modification of the tree if
the insert turns out to not result in the correct tree root (i.e., the
transaction is not valid).

This is an initial step towards issue 222.

As a logical next step, generalizing this to validation of inserting
multiple values at once will directly enable removing Merkle tree clones
in miden-node InnerState::apply_block().

For further work, as we generalize pre-validation for mutations we will
want a separate type to represent an arbitrary set of prospective
mutations on the Merkle tree and their validity, like the `ChangeSet`
type suggested in the issue.
2024-08-27 17:36:20 -06:00
..
mmr fmt 2024-08-21 14:04:23 +01:00
partial_mt Updated Makefile and Readme 2024-08-16 15:07:27 -07:00
smt feat(smt): implement root-checked insertion 2024-08-27 17:36:20 -06:00
store Updated Makefile and Readme 2024-08-16 15:07:27 -07:00
empty_roots.rs fix: clippy warnings (#280) 2024-02-21 20:55:02 -08:00
error.rs Updated Makefile and Readme 2024-08-16 15:07:27 -07:00
index.rs fix: clippy warnings (#280) 2024-02-21 20:55:02 -08:00
merkle_tree.rs feat: migrate to new Winterfell (#315) 2024-05-12 03:09:27 +08:00
mod.rs chore: handle deprecations in winterfell 0.8.3 release 2024-03-17 16:18:23 -04:00
node.rs feat: RPX (xHash12) hash function implementation 2024-02-14 11:52:40 -08:00
path.rs chore: handle deprecations in winterfell 0.8.3 release 2024-03-17 16:18:23 -04:00