-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for subtree root verification (#260)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. --> ## Overview Closes #256 I added this change here so that we have a reference implementation of the algorithm that we will implement in Solidity. Also, adds a method to generate the subtree roots, which didn't exist before and will be needed during proof generation in Celestia-node. The codecov missing coverage complaints are for conditions that are checked twice in different contexts. So there is no way to bypass the first check to arrive at the second check. So, I guess they're fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added subtree root computation functionality to the Namespaced Merkle Tree (NMT). - Introduced new validation methods for subtree root inclusion in NMT. - **Tests** - Added comprehensive tests for subtree root computation and verification in the Namespaced Merkle Tree. - Introduced helper functions for enhanced verification capabilities. - Added edge case handling for various scenarios in the NMT proof system. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
4 changed files
with
1,079 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.