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: Initialize the new app with a deep SMT instead of populating the empty SMT #267

Conversation

Manav-Aggarwal
Copy link
Member

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

Description

Currently, when a new baseapp is set from the contents of a fraudproof, when setting key/value pairs in the store of the baseapp, we start with an empty SMT with no predefined root. However, we must start with a deep SMT with a predefined root taken from the given fraudproof. This lets the new app's substore hashes to be the same.

Right now, since we load the key/value pairs on an empty SMT we don't get the same root as the pre-state root of a challenged transaction.

Closes: #266


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 title Introduce new option to setSubstoreWithRoots Initialize the new app with a deep SMT instead of populating the empty SMT on startup Aug 20, 2022
@Manav-Aggarwal Manav-Aggarwal self-assigned this Aug 20, 2022
@Manav-Aggarwal Manav-Aggarwal changed the title Initialize the new app with a deep SMT instead of populating the empty SMT on startup feat: Initialize the new app with a deep SMT instead of populating the empty SMT on startup Aug 20, 2022
@Manav-Aggarwal Manav-Aggarwal marked this pull request as ready for review August 20, 2022 16:38
@Manav-Aggarwal Manav-Aggarwal changed the title feat: Initialize the new app with a deep SMT instead of populating the empty SMT on startup feat: Initialize the new app with a deep SMT instead of populating the empty SMT Aug 20, 2022
@Manav-Aggarwal Manav-Aggarwal force-pushed the manav/modify_new_apps_using_deepsmt branch from f479416 to 677bdf4 Compare August 22, 2022 17:40
@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
C: Cevmos Changes related to the cevmos branches C:Store
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initialize the new app with a deep SMT instead of populating the empty SMT
2 participants