Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Roll back CommitStateDB after failing to execute handler in evm module #677

Merged
merged 8 commits into from
Jan 8, 2021

Conversation

summerpro
Copy link
Contributor

Closes: #668 #669

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@summerpro
Copy link
Contributor Author

summerpro commented Dec 29, 2020

This solution can only solve #668 and #669, but cannot solve #667. The final solution needs to be discussed.

@fedekunze
Copy link
Contributor

It's ok for me to use this as a short term approach. I think we might want to set everything to store instead of keeping "dirty" arrays/maps. This would be a large refactor of the evm module but it also will increase the performance as we won't need to iterate over the dirty entries during EndBlock

Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

Thanks @summerpro! Could you add a test case to ensure this is not broken in the future?

x/evm/handler.go Outdated Show resolved Hide resolved
@summerpro
Copy link
Contributor Author

It's ok for me to use this as a short term approach. I think we might want to set everything to store instead of keeping "dirty" arrays/maps. This would be a large refactor of the evm module but it also will increase the performance as we won't need to iterate over the dirty entries during EndBlock

Yes, I agree with you, the refactored solution should be able to solve #667 #668 #669

@summerpro
Copy link
Contributor Author

summerpro commented Dec 29, 2020

Thanks @summerpro! Could you add a test case to ensure this is not broken in the future?

You're welcome. Ok i will add it tomorrow

@summerpro summerpro marked this pull request as draft December 30, 2020 06:52
@summerpro summerpro requested a review from fedekunze December 31, 2020 06:05
@summerpro summerpro marked this pull request as ready for review December 31, 2020 06:06
@summerpro
Copy link
Contributor Author

@fedekunze Can this pr be merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad data may be generated due to insufficient gas during the execution of evm transactions
2 participants