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

Revert some changes from #1881 #3533

Closed
jaekwon opened this issue Jan 16, 2025 · 0 comments · Fixed by #3534
Closed

Revert some changes from #1881 #3533

jaekwon opened this issue Jan 16, 2025 · 0 comments · Fixed by #3534
Assignees
Labels
🐞 bug Something isn't working security Security-sensitive issue

Comments

@jaekwon
Copy link
Contributor

jaekwon commented Jan 16, 2025

As per the Oak audit report #20250110-OAK-07 (internal for now), there is a bug introduced via the moving of the condition in balance.

+       if balance >= -1 {
+               return node
+       }

is moved above, but this causes the tree to lean, and not correctly balance.

Further, we should revert the formatting changes to preserve the if/else condition so that it matches the original indentation, and match closely what is already well proven in the iavl implementation.

@jaekwon jaekwon added the 🐞 bug Something isn't working label Jan 16, 2025
@Kouteki Kouteki moved this from Triage to In Progress in 🧙‍♂️gno.land core team Jan 17, 2025
@thehowl thehowl added this to the 🚀 Mainnet beta launch milestone Jan 20, 2025
@thehowl thehowl added the security Security-sensitive issue label Jan 20, 2025
thehowl pushed a commit that referenced this issue Jan 20, 2025
# Description

closes #3533 

Changed only the `node.gno` files to before #1881, but kept the
implementation of the `TraverseInRange` function that was modified in
#3393.
@github-project-automation github-project-automation bot moved this from In Progress to Done in 🧙‍♂️gno.land core team Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working security Security-sensitive issue
Projects
Development

Successfully merging a pull request may close this issue.

3 participants