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

Filter empty values in Smt::with_entries #383

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

PhilippGackstatter
Copy link
Contributor

@PhilippGackstatter PhilippGackstatter commented Feb 18, 2025

Describe your changes

The partial_smt_root_mismatch_on_empty_values test passes key-value pairs to Smt::with_entries where some of the values are EMPTY_WORD. This causes a panic in the concurrent subtree computation of the Smt on current next, e.g.: https://github.com/0xPolygonMiden/crypto/actions/runs/13387187735/job/37386455081#step:4:500.

One fix is to make the test not pass empty values, which is actually unnecessary, since it's the default value. However, I think with_entries shouldn't panic when empty values are passed, so I fixed that instead by filtering them out early in the process.

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

@bobbinth bobbinth merged commit d0e9ead into next Feb 18, 2025
15 checks passed
@bobbinth bobbinth deleted the pgackst-filter-empty-values-smt branch February 18, 2025 10:18
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