Open atenjin opened 2 years ago
CC @cheme
It is only to reduce proof size.
Gist of it is, if value is behind same merkle hash as the partial key of its node, then every access to the partial key will add the value in the proof and for three use case it is better to be able to only add hash of the value.
I have no trace of original discussion (on riot a long time ago), but https://github.com/paritytech/substrate/discussions/11607 goes into more details about the implementation details.
Edit: forgot to mention, but also when updating a value without reading it, this allow not having the old value in proof.
relate to #142 and substrate pr https://github.com/paritytech/substrate/pull/9732 I don't know why you design this feature, to change the leaf node from storing a normal value to a hashed node related to threshold. This change causes a migration for substrate node, but I do not understand this feature is necessary.
It seems that this feature uses one more hash to bring less cause for calculating state root? or something else?
I do not find any discuss for this. Can you explain more reason for this feature?