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: saturate gas taken from stack #915

Merged
merged 3 commits into from
Sep 6, 2024
Merged

fix: saturate gas taken from stack #915

merged 3 commits into from
Sep 6, 2024

Conversation

enitrat
Copy link
Collaborator

@enitrat enitrat commented Sep 6, 2024

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Resolves: #914

What is the new behavior?

  • Saturates the gas taken from the stack to MAX_U128 so that, if the gas is passed with a very big value, the execution doesn't throw an error here. The actual gas passed to the call will depend on the min(gas_left, gas_param), and since gas_left is a u128, it's safe to saturate

Does this introduce a breaking change?

  • Yes
  • No

This change is Reviewable

@enitrat enitrat merged commit ad32fc0 into main Sep 6, 2024
4 checks passed
@enitrat enitrat deleted the fix/saturage-gas-stack branch September 6, 2024 15:25
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.

bug: gas values taken from the stack should be a u256s
1 participant