Skip to content

Conversation

@Apostlex0
Copy link

@Apostlex0 Apostlex0 commented Jun 16, 2025

Description

This PR adds error handling to the Commit() function in the Verkle tree implementation. Previously, the Commit() function did not return errors, which could lead to silent failures.

Changes

  • Modified the VerkleNode interface to make Commit() return (*Point, error)
  • Updated all implementations of Commit() to properly handle and return errors
  • Updated all callers of Commit() to handle the returned error
  • Fixed test cases to properly handle errors from Commit()

Why

The original implementation did not handle potential errors during commitment computation, which could lead to:

  1. Silent failures in critical operations
  2. Inconsistent state when errors occur
  3. Difficulty in debugging issues
  4. Potential security implications

Testing

  • All tests have been updated to handle errors from Commit() and they pass

Related Issues

  • Improves error handling consistency across the codebase

@Apostlex0
Copy link
Author

Hey, @gballet could you please review the pr and see if the changes are of any help.

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