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

Upgrade to Wasmvm 0.14.0 beta3 #487

Merged
merged 10 commits into from
Apr 13, 2021
Merged

Upgrade to Wasmvm 0.14.0 beta3 #487

merged 10 commits into from
Apr 13, 2021

Conversation

ethanfrey
Copy link
Member

@ethanfrey ethanfrey commented Apr 12, 2021

Closes #479

  • Update deps
  • Upgrade contracts
  • Add ReplyOn field to all SubMsg tests
  • Fix state tests to expect bech32 string, not base64 sdk.AccAddress
  • Update gas prices
  • Handle ReplyOn other than Always
  • Add support for BankMsg::Burn

@alpe This is working. Can you add support for BankMsg::Burn on this PR or merge this PR (if it looks good) and make that in another PR? I think you are much faster with your new handler design, I am not sure exactly where to add it properly.

@codecov
Copy link

codecov bot commented Apr 12, 2021

Codecov Report

Merging #487 (7029368) into master (f8fe581) will increase coverage by 0.23%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #487      +/-   ##
==========================================
+ Coverage   56.78%   57.01%   +0.23%     
==========================================
  Files          41       41              
  Lines        4392     4411      +19     
==========================================
+ Hits         2494     2515      +21     
- Misses       1687     1688       +1     
+ Partials      211      208       -3     
Impacted Files Coverage Δ
app/app.go 86.85% <ø> (ø)
x/wasm/keeper/handler_plugin.go 84.26% <66.66%> (-0.87%) ⬇️
x/wasm/keeper/keeper.go 86.51% <100.00%> (+0.92%) ⬆️
x/wasm/keeper/api.go 40.00% <0.00%> (-20.00%) ⬇️
x/wasm/keeper/handler_plugin_encoders.go 79.42% <0.00%> (+1.14%) ⬆️

@ethanfrey ethanfrey marked this pull request as ready for review April 12, 2021 20:15
@ethanfrey ethanfrey requested a review from alpe as a code owner April 12, 2021 20:15
Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

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

Very cool. 🏄 Please update the wasmvm version in the Dockerfile, too to be in sync.

ReplyOn: wasmvmtypes.ReplySuccess,
}
if !tc.replyOnSuccess {
subMsg.ReplyOn = wasmvmtypes.ReplyError
Copy link
Contributor

Choose a reason for hiding this comment

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

nice to have: you can avoid the if and increase readability if you replace the replyOnSuccess bool by the replyOn value. But no need to change this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to, but it requires me to use a private type in the struct... hmmmm

I made the type private to keep it a closed enum (there are only 3 public instances of it), rather than allow anyone to create new ReplyOn types.

x/wasm/keeper/submsg_test.go Show resolved Hide resolved
x/wasm/keeper/keeper.go Show resolved Hide resolved
go.sum Outdated
@@ -19,6 +19,10 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQ
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4=
github.com/CosmWasm/wasmvm v0.14.0-beta1 h1:ASqXB/2D8CEBmAI/uljRw6eEMbeKXPQtL/wZzKXZGGA=
github.com/CosmWasm/wasmvm v0.14.0-beta1/go.mod h1:Id107qllDJyJjVQQsKMOy2YYF98sqPJ2t+jX1QES40A=
github.com/CosmWasm/wasmvm v0.14.0-beta2 h1:8bLLNaxj796qUwu6UuQDbqpMV9zPpxG3lNZZbswNdOo=
github.com/CosmWasm/wasmvm v0.14.0-beta2/go.mod h1:Id107qllDJyJjVQQsKMOy2YYF98sqPJ2t+jX1QES40A=
Copy link
Contributor

Choose a reason for hiding this comment

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

next go mod tidy run will drop the beta1 +2.

@@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd
go 1.15

require (
github.com/CosmWasm/wasmvm v0.14.0-beta1
github.com/CosmWasm/wasmvm v0.14.0-beta3
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a reference in the Dockerfile that we need to update. 🕵️

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do that and go mod tidy

@alpe
Copy link
Contributor

alpe commented Apr 13, 2021

Ah, I will do a PR to this branch for BankMsg::Burn including the Dockerfile update

@ethanfrey ethanfrey merged commit 4b8d024 into master Apr 13, 2021
@ethanfrey ethanfrey deleted the wasmvm-0.14.0-beta3 branch April 13, 2021 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update wasmvm to v0.14.0-beta2
2 participants