Commit graph

848 commits

Author SHA1 Message Date
6b6686afae move new tests to smt/tests.rs 2024-11-15 12:20:47 -07:00
093f7b6ab7 add news item for smt parallel subtree construction 2024-11-15 12:20:32 -07:00
004d494c7f smt: add benchmarks for parallel construction 2024-11-15 12:20:32 -07:00
1c4fa71f75 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!
2024-11-15 12:20:31 -07:00
47c7999232 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.
2024-11-15 12:18:55 -07:00
686d344485 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.
2024-11-15 12:18:53 -07:00
db7bf26faf 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.
2024-11-15 12:14:34 -07:00
890dbdc54e smt: test that SparseMerkleTree::build_subtree() is composable 2024-11-15 12:09:39 -07:00
fd92777b81 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.
2024-11-15 12:04:23 -07:00
e684d61942 smt: implement single subtree-8 hashing, w/ benchmarks & tests
This will be composed into depth-8-subtree-based computation of entire
sparse Merkle trees.
2024-11-15 12:04:22 -07:00
3e5b86f727 smt: add sorted_pairs_to_leaves() and test for it 2024-11-15 12:01:30 -07:00
393e5f4986 add news commit 2024-11-14 19:49:17 -07:00
ebc975f308 add news item for smt parallel subtree construction 2024-11-14 19:48:50 -07:00
814d7cfa2d add benchmarks for parallel construction 2024-11-14 19:44:39 -07:00
20a2350174 smt: add benchmarks for parallel construction 2024-11-14 19:44:26 -07:00
2d0bcbb5d9 add with_entries_par() commit 2024-11-14 19:02:50 -07:00
b184d301e4 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!
2024-11-14 19:01:58 -07:00
764a713b9b add from_raw_parts() commit 2024-11-14 17:58:14 -07:00
9f0245b8da 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.
2024-11-14 17:49:52 -07:00
6d678bd26e add test_multithreaded_subtrees() commit 2024-11-14 16:48:02 -07:00
5cc527fd26 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.
2024-11-14 16:46:28 -07:00
753c372886 add Box<dyn Iterator> comment to sorted_pairs_to_leaves() commit 2024-11-14 16:06:37 -07:00
1b32285fc2 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.
2024-11-14 16:06:17 -07:00
04cef48555 smt: test that SparseMerkleTree::build_subtree() is composable 2024-11-14 16:06:17 -07:00
a126ff9767 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.
2024-11-14 16:06:17 -07:00
baaf2b4caa smt: implement single subtree-8 hashing, w/ benchmarks & tests
This will be composed into depth-8-subtree-based computation of entire
sparse Merkle trees.
2024-11-14 16:06:17 -07:00
d4f1ccf396 smt: add sorted_pairs_to_leaves() and test for it 2024-11-14 16:06:17 -07:00
bb1424e5c4 add test_singlethreaded_subtree commit 2024-11-14 16:05:05 -07:00
29ee02fa56 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.
2024-11-14 16:00:58 -07:00
e47f3ab7bc smt: test that SparseMerkleTree::build_subtree() is composable 2024-11-14 15:59:29 -07:00
7cffe4743d add test_two_subtrees() commit 2024-11-14 15:38:24 -07:00
df5d7f26d0 smt: test that SparseMerkleTree::build_subtree() is composable 2024-11-14 15:37:37 -07:00
ecd679c647 remove FIXME from single-subtree commit 2024-11-14 15:34:27 -07:00
ae191003a5 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.
2024-11-14 15:34:16 -07:00
1b1c4ccedb smt: implement single subtree-8 hashing, w/ benchmarks & tests
This will be composed into depth-8-subtree-based computation of entire
sparse Merkle trees.
2024-11-14 15:34:16 -07:00
baf1916b6e add comments/docs to sorted_pairs_to_leaves commit 2024-11-14 15:33:48 -07:00
9cdf160bb0 smt: add sorted_pairs_to_leaves() and test for it 2024-11-14 15:33:08 -07:00
b3260c261e 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.
2024-11-14 15:33:08 -07:00
df37bc7fa1 smt: implement single subtree-8 hashing, w/ benchmarks & tests
This will be composed into depth-8-subtree-based computation of entire
sparse Merkle trees.
2024-11-14 15:33:08 -07:00
ecfc89a66c single-subtree commit: change magic PAIR_COUNT to be COLS_PER_SUBTREE in test 2024-11-14 15:03:20 -07:00
c6034c6565 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.
2024-11-14 15:02:55 -07:00
543436c9d6 smt: implement single subtree-8 hashing, w/ benchmarks & tests
This will be composed into depth-8-subtree-based computation of entire
sparse Merkle trees.
2024-11-14 15:02:51 -07:00
d57fc21f5b add balanced Merkle benchmark 2024-11-14 14:47:15 -07:00
7513cfe040 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.
2024-11-14 14:45:26 -07:00
f6e245d2ad I forgot to include the benchmark file in the last commit 2024-11-14 14:04:28 -07:00
46857174c6 smt: implement single subtree-8 hashing, w/ benchmarks & tests
This will be composed into depth-8-subtree-based computation of entire
sparse Merkle trees.
2024-11-14 14:04:15 -07:00
d825a3f593 add single subtree8 commit 2024-11-14 13:54:58 -07:00
acfb432e90 smt: implement single subtree-8 hashing, w/ benchmarks & tests
This will be composed into depth-8-subtree-based computation of entire
sparse Merkle trees.
2024-11-14 13:53:00 -07:00
4f22d3830d re-init as cleanup 2024-11-13 15:33:12 -07:00
46f951b0f1 smt: add sorted_pairs_to_leaves() and test for it 2024-11-13 15:32:48 -07:00