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(wasm): x/wasm stargate migration #131

Merged
merged 885 commits into from
Apr 26, 2021

Conversation

brew0722
Copy link
Contributor

Description

Closes: #113

Following the team branch rule, I created pr again after pushing to origin.
#127 (comment)

About the features we customized the cosmwasm

The x/wasm in lbm-sdk/v2 was merged based on 0.12.0-0.1.0(line/cosmwasm and line/wasmvm).
So this merge includes some of our features included in 0.12.0-0.1.0, but there are some features that are excluded.
Contents modified after 0.12.0-0.1.0 will be additionally ported as soon as this PR is completed.

Included:

  • CustomQuerier & CustomEncoder
    to use when token/collection migration is complete.

Excluded:

  • Token/Collection Querier/Encoder
    Token/Collection modules has not yet been migrated. so disabled.
  • linkwasmd/cli_test
    tests/ used as the base code below has not been migrated.
    And since the above Token/Collection feature was disabled and couldn't be tested, don't need it now.

Other Modifications when migration

Added

  • LegacyStore and LegacyPrefixIterator
    line/wasmvm depends on tendermint/tm-db, and when calling the API, it takes over the store.
    (Instantiate, Execute, Query, Migration)
    However, in lbm-sdk/v2 it uses line/tm-db/v2, there are some fixes, such as removing Domain() chore: bump up tm-db and remove Domain() call #118.
    It is possible to solve wasmvm look at line/tm-db/v2, but I need modifications in the single repository as possible.
    So, I implemented that class to use Iterator, which reimplemented the Domain receiver method, and used it only in wasmvm.

Changed

  • Added legacy style path to protobuf script.
    x/wasm still uses the old path method (x/wasm/internals/), and various *.pb files are also located here.
    However, cosmos-sdk 0.42.0 has been implemented to re-located all in proto/.
    Can move it self, but considering that it will be fixed in the next cosmwasm update, I responded to the path via W/A.

  • updated linkwasmd


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • 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
  • Review Codecov Report in the comment section below once CI passes

ethanfrey and others added 30 commits October 6, 2020 08:54
Increment x/wasm error codes by 1
Return raw stored bytes for raw queries
Better calculation of Delegation data
Test WasmQuery::Raw with missing data
Jiyong Ha added 4 commits April 13, 2021 22:22
The tests/, which is the basis of the cli test, has not been ported.
And Our modifications, such as encoder of tokens and collections,
became unnecessary, so cli tests meaningless.
@brew0722 brew0722 added this to the Initail ebony milestone Apr 19, 2021
@brew0722 brew0722 self-assigned this Apr 19, 2021
@brew0722 brew0722 mentioned this pull request Apr 19, 2021
9 tasks
Copy link
Contributor

@shiki-tak shiki-tak left a comment

Choose a reason for hiding this comment

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

LGTM

@whylee259 whylee259 changed the title feat: x/wasm stargate migration feat(wasm): x/wasm stargate migration Apr 23, 2021
@brew0722 brew0722 merged commit fe9c41e into v2/develop Apr 26, 2021
brew0722 pushed a commit that referenced this pull request Apr 26, 2021
* Cleanup ContractInfo type

* Add admin to contract instanciation

* Add cli commands for new TX

* Add rest support for new TX

* Update changelog

* Make optional admin flag for better UX

* Add flag to not accidentally clear admin on update
@brew0722 brew0722 deleted the brew0722/v2/feat/merge-wasmd-0.16.0-alpha1 branch April 27, 2021 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

migrate lbm-sdk/v2 to wasmd 0.16.0-alpha1(Stargate)