File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed
tools-and-tests/tools/src/main/java/org/hiero/block/tools/blocks/model/hashing Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 77 * Interface for a binary Merkle tree hasher using SHA-384 hashes.
88 *
99 * <p>Implementations of this interface compute Merkle tree root hashes following the
10- * Block & State Merkle Tree Design specification. The design uses domain-separated
10+ * Block and State Merkle Tree Design specification. The design uses domain-separated
1111 * hashing with the following prefix scheme:
1212 *
1313 * <ul>
Original file line number Diff line number Diff line change 77import java .util .Objects ;
88
99/**
10- * Utility methods for Merkle tree hashing following the Block & State Merkle Tree Design.
10+ * Utility methods for Merkle tree hashing following the Block and State Merkle Tree Design.
1111 *
1212 * <p>This class provides domain-separated hashing for Merkle tree nodes using SHA-384.
1313 * Domain separation is achieved through single-byte prefixes that ensure leaf hashes
Original file line number Diff line number Diff line change 1717/**
1818 * A full in-memory Merkle tree hasher that stores all nodes, enabling Merkle path generation.
1919 *
20- * <p>This implementation follows the Streaming Binary Merkle Tree algorithm from the Block & State
20+ * <p>This implementation follows the Streaming Binary Merkle Tree algorithm from the Block and State
2121 * Merkle Tree Design specification, but additionally retains all leaf and internal node hashes.
2222 * This allows the generation of Merkle proofs (paths) for any leaf in the tree.
2323 *
2424 * <h2>Comparison with StreamingHasher</h2>
2525 * <table border="1">
26+ * <caption>Comparison of StreamingHasher and InMemoryTreeHasher</caption>
2627 * <tr><th>Aspect</th><th>StreamingHasher</th><th>InMemoryTreeHasher</th></tr>
2728 * <tr><td>Memory</td><td>O(log n)</td><td>O(n)</td></tr>
2829 * <tr><td>Merkle paths</td><td>Not supported</td><td>Supported</td></tr>
Original file line number Diff line number Diff line change 1616/**
1717 * A memory-efficient Merkle tree hasher that computes root hashes in a streaming fashion.
1818 *
19- * <p>This implementation follows the Streaming Binary Merkle Tree algorithm from the Block & State
19+ * <p>This implementation follows the Streaming Binary Merkle Tree algorithm from the Block and State
2020 * Merkle Tree Design specification. It supports adding leaves one at a time and computes the root
2121 * hash without storing the entire tree in memory.
2222 *
You can’t perform that action at this time.
0 commit comments