You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Identified as part of this EPIC: celestiaorg/celestia-app#1296.
When adding data items to the tree, their hash is not directly calculated. Instead, every time we need to access the leaf hashes, we have to compare the number of data items added so far (which can be found in the leaves field of NamespaceMerkleTree) with the leaf hashes (which are stored in the leafHashes field of the same struct). For example, see the computeRoot() method and computeLeafHashesIfNecessary() function.
This can make debugging and code maintenance more challenging.
Acceptance criteria
To simplify the process, it would be better to hash the data items immediately after they are pushed. We can address this issue by implementing this feature in the Push method and refactoring the other parts of the code as necessary.
The text was updated successfully, but these errors were encountered:
## Overview
Closes#108 and #143
## Checklist
- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [x] Linked issues closed with keywords
Problem
Identified as part of this EPIC: celestiaorg/celestia-app#1296.
When adding data items to the tree, their hash is not directly calculated. Instead, every time we need to access the leaf hashes, we have to compare the number of data items added so far (which can be found in the
leaves
field ofNamespaceMerkleTree
) with the leaf hashes (which are stored in theleafHashes
field of the same struct). For example, see the computeRoot() method and computeLeafHashesIfNecessary() function.This can make debugging and code maintenance more challenging.
Acceptance criteria
To simplify the process, it would be better to hash the data items immediately after they are pushed. We can address this issue by implementing this feature in the
Push
method and refactoring the other parts of the code as necessary.The text was updated successfully, but these errors were encountered: