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

EN-7957/Gas lock in system vm #2412

Merged
merged 4 commits into from Oct 30, 2020
Merged

Conversation

sasurobert
Copy link
Contributor

Implemented gas lock mechanism in system vm

@camilbancioiu camilbancioiu self-requested a review October 28, 2020 13:25
@raduchis raduchis self-requested a review October 29, 2020 08:08
// Arwen does when executing an async call
gasToDeduct := s.asyncCallStepCost + gasToLock
if input.GasProvided <= gasToDeduct {
return 0, vm.ErrNotEnoughGas
Copy link
Contributor

Choose a reason for hiding this comment

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

the lockedgas would be refunded to the user. In this case, although the asyncCall will not happen, the gas for the gasToLock is taken?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it would have failed in the sender part first. this is only extra protection.

@sasurobert sasurobert removed the request for review from camilbancioiu October 30, 2020 09:05
@sasurobert sasurobert merged commit b842f3c into feat/esdt-relayed-arwen Oct 30, 2020
@sasurobert sasurobert deleted the get-lock-system-VM branch October 30, 2020 11:04
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.

None yet

3 participants