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(node): Take 'wait' syscall into account in calculate_gas_info #3609

Merged
merged 6 commits into from
Dec 26, 2023

Conversation

gshep
Copy link
Member

@gshep gshep commented Dec 20, 2023

gr_wait syscall greedily consumes all available gas. So when the gas value can be divided by waitlist cost without remainder calculate_gas_info will return incorrect info.

Test case - https://github.com/gear-tech/gear/actions/runs/7274019037

@gear-tech/dev

@gshep gshep added A1-inprogress Issue is in progress or PR draft is not ready to be reviewed D2-node Gear Node C0-bug Something isn't working labels Dec 20, 2023
@gshep gshep self-assigned this Dec 20, 2023
@gshep gshep added A0-pleasereview PR is ready to be reviewed by the team and removed A1-inprogress Issue is in progress or PR draft is not ready to be reviewed labels Dec 20, 2023
pallets/gear/src/runtime_api.rs Outdated Show resolved Hide resolved
@gshep gshep requested a review from breathx December 25, 2023 11:10
@gshep gshep requested a review from breathx December 25, 2023 11:57
@gshep gshep merged commit ebdc352 into master Dec 26, 2023
11 checks passed
@gshep gshep deleted the gshep/calculate_gas_wait branch December 26, 2023 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview PR is ready to be reviewed by the team C0-bug Something isn't working D2-node Gear Node
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants