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 last iteration in sequential opcode #2479

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

AurelienFT
Copy link
Contributor

@AurelienFT AurelienFT commented Dec 6, 2024

Fixes #2022

Previously the read and write of the last key of the contract state was creating error because of multiple bad checks of limits. Also the key was increase in all case at the end of the loop causing the increase() to fail on overflow even if there is values to be inserted left.

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

@AurelienFT AurelienFT marked this pull request as ready for review December 6, 2024 17:16
@AurelienFT AurelienFT requested a review from a team December 6, 2024 17:16
Copy link
Collaborator

@xgreenx xgreenx left a comment

Choose a reason for hiding this comment

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

We also have contract_state_remove_range that has the same problem=)

crates/storage/src/vm_storage.rs Outdated Show resolved Hide resolved
tests/tests/vm_storage.rs Outdated Show resolved Hide resolved
@AurelienFT AurelienFT requested a review from a team December 6, 2024 20:50
xgreenx
xgreenx previously approved these changes Dec 7, 2024
@AurelienFT AurelienFT requested a review from a team December 10, 2024 09:48
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.

Sequential opcodes return an error when touching the last storage key
2 participants