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

Wasmvm upgrade 557 #559

Merged
merged 12 commits into from
Jul 26, 2021
Merged

Wasmvm upgrade 557 #559

merged 12 commits into from
Jul 26, 2021

Conversation

ethanfrey
Copy link
Member

@ethanfrey ethanfrey commented Jul 21, 2021

Closes #557

Currently tested versions:

  • Contracts: cosmwasm v0.16.-rc4
  • Engine: wasmvm v0.16.0-rc2

Work done:

  • Update wasmd and test contracts
  • Lots of changes to the IbcChannel*Msg types
  • CounterPartyVersion is no longer in IbcChannel but in some of those messages
  • Change standard contract_address event attribute (for wasm type) to _contract_address.
  • Enforce the contract cannot return any _* attributes and thus conflict with any special "trusted" attributes from the runtime.
  • Handle custom events from IbcBasicResponse and IbcReceiveResponse (not just attributes)

@codecov
Copy link

codecov bot commented Jul 21, 2021

Codecov Report

Merging #559 (0b93b3b) into master (2d2dcac) will decrease coverage by 0.05%.
The diff coverage is 73.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #559      +/-   ##
==========================================
- Coverage   59.61%   59.55%   -0.06%     
==========================================
  Files          45       45              
  Lines        5220     5242      +22     
==========================================
+ Hits         3112     3122      +10     
- Misses       1884     1891       +7     
- Partials      224      229       +5     
Impacted Files Coverage Δ
x/wasm/keeper/relay.go 88.67% <63.63%> (-11.33%) ⬇️
x/wasm/ibc.go 62.04% <100.00%> (-0.55%) ⬇️
x/wasm/keeper/events.go 100.00% <100.00%> (ø)
x/wasm/keeper/query_plugins.go 78.44% <100.00%> (-0.08%) ⬇️

@ethanfrey ethanfrey marked this pull request as ready for review July 22, 2021 08:25
@ethanfrey ethanfrey requested a review from alpe as a code owner July 22, 2021 08:25
Comment on lines +54 to +55
// FIXME: do we want to error here on invalid events
// and reserve all _* keys for our use (not contract)
Copy link
Member

Choose a reason for hiding this comment

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

We do!

Copy link
Member

Choose a reason for hiding this comment

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

Same for the min length check in newCustomEvents above. Why silently ignore events with invalid type length?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was Alex's choice.
I left a message on the v0.15.0 upgrade PR to that effect. (See #548 (comment) )

I would make that change in a separate PR as it is unrelated to v0.16.0. But good not to miss it.

Copy link
Member

Choose a reason for hiding this comment

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

Could you create a ticket for those two places? Then we can merge here.

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 added #560 for this. Will take on it in this next week

@@ -60,8 +76,20 @@ func (k Keeper) OnConnectChannel(
env := types.NewEnv(ctx, contractAddr)
querier := k.newQueryHandler(ctx, contractAddr)

msg := wasmvmtypes.IBCChannelConnectMsg{}
if counterpartyVersion == "" {
Copy link

Choose a reason for hiding this comment

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

I don't really know this codebase, but would it be possible to rely on something more meaningful for this?

if msgConfirm {
    // ..
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question, captured in #561

@uint
Copy link

uint commented Jul 22, 2021

LGTM outside of my one comment!

@ethanfrey ethanfrey merged commit 86d96fd into master Jul 26, 2021
@ethanfrey ethanfrey deleted the wasmvm_upgrade_557 branch July 26, 2021 16:48
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 to wasmvm / cosmwasm 0.16
3 participants