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: EoA pattern recognition #463

Merged
merged 1 commit into from
Jan 7, 2025
Merged

fix: EoA pattern recognition #463

merged 1 commit into from
Jan 7, 2025

Conversation

gballet
Copy link
Member

@gballet gballet commented Jan 7, 2025

I realized that the "EoA pattern recognition" had been re-enabled, and that the test fix I pushed in master was actually the wrong fix.

The reason for the tests failing, is that the leaf pattern hasn't been changed to "Nyota" in that test, while the encoding code did. So I updated the test to make sure that it was testing the right pattern.

There is another issue: no check was made to ensure that the version were 0. Which means that any LeafNode that had only slot 0 and 1 set, with slot 1 being the EmptyHash, would be considered an EoA and encoded as such... but if version, code size and the reserved space was non-zero, it would not be saved while being serialized! This is a very rare occurrence, but definitely a bug.

@gballet gballet added the bug Something isn't working label Jan 7, 2025
@gballet gballet merged commit 33b8a50 into master Jan 7, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants