-
Luke Champine authored
Due to padding, revising a Merkle root causes problems if the new data is not a multiple of 64 (the segment size). For example, if two revisions are made, each adding 32 bytes, the result is two leaves: [32/64] + [32/64] -> Merkle root But when it comes time to create the storage proof, the data will be read contiguously, resulting in just one leaf: [64/64] -> Merkle root The easiest way to address this is to pad the revision data to the segment size. A more robust solution would remove this restriction, perhaps by reading into multiple Merkle trees. Fortunately, neither of these solutions break compatibility.
e3a79623Luke Champine authoredDue to padding, revising a Merkle root causes problems if the new data is not a multiple of 64 (the segment size). For example, if two revisions are made, each adding 32 bytes, the result is two leaves: [32/64] + [32/64] -> Merkle root But when it comes time to create the storage proof, the data will be read contiguously, resulting in just one leaf: [64/64] -> Merkle root The easiest way to address this is to pad the revision data to the segment size. A more robust solution would remove this restriction, perhaps by reading into multiple Merkle trees. Fortunately, neither of these solutions break compatibility.
Loading