Skip to content

Test: add unit tests for leaf_commitment and pair_root functions#514

Open
casks-mutters wants to merge 1 commit intomainfrom
casks-mutters-patch-691462
Open

Test: add unit tests for leaf_commitment and pair_root functions#514
casks-mutters wants to merge 1 commit intomainfrom
casks-mutters-patch-691462

Conversation

@casks-mutters
Copy link
Copy Markdown
Owner

Summary

Currently, there are no tests for the leaf_commitment and pair_root functions. Adding tests will help ensure the correctness of these core functions.

Proposed Changes

  • Create a new tests/ directory.
  • Add unit tests for:
    • leaf_commitment: check that the correct commitment is returned for a given slot, address, and block.
    • pair_root: verify that it correctly computes the root from two leaf values.

Motivation

  • Provides confidence that the core cryptographic functions behave as expected.
  • Helps detect regressions or incorrect changes in the future.

## Summary

Currently, there are no tests for the `leaf_commitment` and `pair_root` functions. Adding tests will help ensure the correctness of these core functions.

## Proposed Changes

- Create a new `tests/` directory.
- Add unit tests for:
  - `leaf_commitment`: check that the correct commitment is returned for a given slot, address, and block.
  - `pair_root`: verify that it correctly computes the root from two leaf values.
  
## Motivation

- Provides confidence that the core cryptographic functions behave as expected.  
- Helps detect regressions or incorrect changes in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant