This repository has been archived by the owner on May 11, 2023. It is now read-only.
Fix: Remove hashing from leaf keys in SMT Node #69
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current SMT implementation hashes keys provided by calls to
update
anddelete
. The SMT spec mandates leaves use the raw 32 byte key input, rather than the hash of the key input. This means clients are able to decide on the algorithm that produces 32 byte keys.This behaviour is an artifact of the Celestia SMT implementation. Both the Celestia implementation and the Fuel implementation are moving towards an SMT interface that takes in 32 byte keys for
update
anddelete
functions.In this PR, I am changing the internal SMT node structure so that leaves are constructed using raw 32 byte keys. The WIP SMT PR has been similarly modified to expose the correct
update
anddelete
interface using 32 byte keys. I am also including minor changes to the Node structure from the SMT PR in this PR.