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

feat: Export minimal pre-execution state from a fraudulent block instead of a post-execution state #260

Conversation

Manav-Aggarwal
Copy link
Member

@Manav-Aggarwal Manav-Aggarwal commented Aug 11, 2022

Description

We'd like to be able to revert to a previous state of a cosmos-sdk baseapp and use logs from a trace to filter down to the minimal set of state needed in a fraudproof.

Parts covered from the cycle of a fraudproof:

Optimint Full Node (Producer of fraudproof)
3. The cosmos-sdk will simply execute the fraudulent block while logging all the states touched by the transaction. Then, it will revert to a previous state again, and then snapshot the state while using the contents of the log to filter down to the minimal set of state needed. This minimial snapshot will be packaged as a fraudproof and passed back to optimint.

Parent issue: #245

Builds on top of: #250

Closes: #257


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@Manav-Aggarwal Manav-Aggarwal changed the base branch from v0.46.0-with-smt to manav/add-fraudproof-generation-mode August 11, 2022 17:13
@Manav-Aggarwal Manav-Aggarwal changed the title Manav/export fraudproof with pre execution state feat: Export minimal pre-execution state from a fraudulent block instead of a post-execution state Aug 11, 2022
@Manav-Aggarwal Manav-Aggarwal force-pushed the manav/add-fraudproof-generation-mode branch from 8500a19 to ce43a38 Compare August 12, 2022 01:28
@Manav-Aggarwal Manav-Aggarwal force-pushed the manav/export_fraudproof_with_pre-execution_state branch from 3e41e52 to 7769288 Compare August 12, 2022 01:29
@Manav-Aggarwal Manav-Aggarwal force-pushed the manav/export_fraudproof_with_pre-execution_state branch from 6b8f37d to b326ae6 Compare August 12, 2022 01:44
@Manav-Aggarwal Manav-Aggarwal self-assigned this Aug 12, 2022
@Manav-Aggarwal Manav-Aggarwal added C: Cevmos Changes related to the cevmos branches block-fraud-proofs Block Fraud Proofs (Generation and verification) labels Aug 12, 2022
@Manav-Aggarwal Manav-Aggarwal marked this pull request as ready for review August 12, 2022 02:22
Copy link

@jbowen93 jbowen93 left a comment

Choose a reason for hiding this comment

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

untested approval

@Manav-Aggarwal
Copy link
Member Author

everything is moved to cosmos-sdk-rollmint repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block-fraud-proofs Block Fraud Proofs (Generation and verification) C: Cevmos Changes related to the cevmos branches C:Store
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export minimal pre-execution state from a fraudulent block instead of a post-execution state
2 participants