Commit graph

9 commits

Author SHA1 Message Date
Krushimir
8b1593f0ba
refactor: folder structure (#397) 2025-03-15 17:13:58 -07:00
Krushimir
cd0821961d
test: adds property-based testing and fuzzing for SMT (#385)
* Adds concurrent proptests
* Adds fuzzing for SMT
* fix: concurrent mutations without mutated entries
* fix: key sorting
2025-03-10 11:51:16 -07:00
polydez
7ee6d7fb93
feat: add support for hashmaps in Smt and SimpleSmt (#363) 2025-01-02 10:23:12 -08:00
Bobbin Threadbare
e4373e54c9
chore: update lockfile 2024-12-28 16:38:54 -08:00
Bobbin Threadbare
ef3183fc0b
chore: minor benchmark fixes 2024-12-24 01:12:51 -08:00
b151773b0d
feat: implement concurrent Smt construction (#341)
* merkle: add parent() helper function on NodeIndex
* smt: add pairs_to_leaf() to trait
* smt: add sorted_pairs_to_leaves() and test for it
* smt: implement single subtree-8 hashing, w/ benchmarks & tests

This will be composed into depth-8-subtree-based computation of entire
sparse Merkle trees.

* merkle: add a benchmark for constructing 256-balanced trees

This is intended for comparison with the benchmarks from the previous
commit. This benchmark represents the theoretical perfect-efficiency
performance we could possibly (but impractically) get for computing
depth-8 sparse Merkle subtrees.

* smt: test that SparseMerkleTree::build_subtree() is composable

* smt: test that subtree logic can correctly construct an entire tree

This commit ensures that `SparseMerkleTree::build_subtree()` can
correctly compose into building an entire sparse Merkle tree, without
yet getting into potential complications concurrency introduces.

* smt: implement test for basic parallelized subtree computation w/ rayon

Building on the previous commit, this commit implements a test proving
that `SparseMerkleTree::build_subtree()` can be composed into itself not
just concurrently, but in parallel, without issue.

* smt: add from_raw_parts() to trait interface

This commit adds a new required method to the SparseMerkleTree trait,
to allow generic construction from pre-computed parts.

This will be used to add a generic version of `with_entries()` in a
later commit.

* smt: add parallel constructors to Smt and SimpleSmt

What the previous few commits have been leading up to: SparseMerkleTree
now has a function to construct the tree from existing data in parallel.
This is significantly faster than the singlethreaded equivalent.
Benchmarks incoming!

---------

Co-authored-by: krushimir <krushimir@reilabs.co>
Co-authored-by: krushimir <kresimir.grofelnik@reilabs.io>
2024-12-04 10:54:41 -08:00
Paul-Henry Kajfasz
2e74028fd4
Updated makefile 2024-08-21 14:11:17 +01:00
Paul-Henry Kajfasz
4cb6bed428
Updated changelog + added release to no-std 2024-08-19 14:37:58 +01:00
Paul-Henry Kajfasz
ad0f472708
Updated Makefile and Readme 2024-08-16 15:07:27 -07:00