Add an UnbalancedMerkleTree primitive

The reasoning for it is documented with itself. The plan is to use it within
our header for committing to the DAG (allowing one header per epoch, yet
logarithmic proofs for any header within the epoch), the transactions
commitment (allowing logarithmic proofs of a transaction within a block,
without padding), and the events commitment (allowing logarithmic proofs of
unique events within a block, despite events not having a unique ID inherent).

This also defines transaction hashes and performs the necessary modifications
for transactions to be unique.
This commit is contained in:
Luke Parker
2025-03-04 04:00:05 -05:00
parent b92ac4a15b
commit df2ae10d2f
7 changed files with 334 additions and 11 deletions

1
Cargo.lock generated
View File

@@ -8827,6 +8827,7 @@ dependencies = [
"ciphersuite",
"dkg",
"parity-scale-codec",
"rand_core",
"sp-core",
"zeroize",
]