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 changes on failed pcall() #199

Merged
merged 35 commits into from
May 17, 2024
Merged

revert changes on failed pcall() #199

merged 35 commits into from
May 17, 2024

Conversation

kroggen
Copy link
Member

@kroggen kroggen commented May 8, 2023

This PR changes/updates the behavior of both pcall or xpcall functions

When the called function fails, it will:

  • Discard events emitted by the called functions and contracts
  • Rollback the contract state (state variables, nonce, balance, sql db)

@kroggen kroggen linked an issue May 8, 2023 that may be closed by this pull request
@kroggen kroggen added V4 To be released on hardfork V4 check hardfork Run sync test with the PR labels Jul 7, 2023
@kroggen
Copy link
Member Author

kroggen commented Jul 18, 2023

TODO:

  • add tests (vm_dummy and integration test)
  • include xpcall()

@kroggen kroggen changed the base branch from develop to topic/hardfork-v4 October 6, 2023 04:14
@kroggen kroggen removed the check hardfork Run sync test with the PR label Nov 9, 2023
@kroggen kroggen changed the title V4: discard events from failed pcall() revert changes on failed pcall() Nov 16, 2023
Copy link
Member

@hayarobi hayarobi left a comment

Choose a reason for hiding this comment

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

lgtm

@kroggen kroggen merged commit f201a47 into topic/hardfork-v4 May 17, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V4 To be released on hardfork V4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discard events from failed protected calls
3 participants