Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Safe handling of empty Jellyfish Merkle Tree initialization #1763

Closed
wants to merge 2 commits into from

Conversation

crStiv
Copy link

@crStiv crStiv commented Jan 30, 2025

This commit improves the handling of empty Jellyfish Merkle Trees (JMT) in the prover storage implementation:

  • Adds proper version checking for empty trees
  • Prevents unexpected empty roots in non-zero versions
  • Improves error handling with context
  • Optimizes root hash retrieval
  • Adds better error messages

This change ensures safe operation with snapshots by properly validating tree state
and version numbers during initialization.

Resolves TODO: "Fix this before introducing snapshots!"

@crStiv crStiv requested a review from eyusufatik as a code owner January 30, 2025 03:37
@auto-assign auto-assign bot requested a review from ercecan January 30, 2025 03:37
@eyusufatik
Copy link
Member

closing PR as bot activity

@eyusufatik eyusufatik closed this Jan 30, 2025
@crStiv
Copy link
Author

crStiv commented Jan 30, 2025

closing PR as bot activity

I provided some help to your project, and youclosed my pr, ok that's no problem. But I just wonder why do you consider my activity as bot's?

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.

2 participants