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

Submsg and replies #441

Merged
merged 15 commits into from
Mar 10, 2021
Merged

Submsg and replies #441

merged 15 commits into from
Mar 10, 2021

Conversation

ethanfrey
Copy link
Member

@ethanfrey ethanfrey commented Mar 5, 2021

Closes #421

  • Add private method to call reply entry point
  • Wrote logic to dispatch submessages
  • Dispatch submessages from all (non-ibc) entrypoints (see note below)
  • Test submessage handling via reflect contract
    • no gas limit, success
    • no gas limit, failure
    • no gas limit, out-of-gas panic
    • gas limit, success
    • gas limit, failure
    • gas limit, consume all gas
    • Instantiate Contract, get address from reply.Data

Note: we will need to update again after CosmWasm/cosmwasm#822 to add support for submessages in the ibc callbacks

@ethanfrey ethanfrey added this to the v0.16.0 milestone Mar 5, 2021
@ethanfrey ethanfrey requested a review from alpe as a code owner March 5, 2021 22:25
@ethanfrey ethanfrey marked this pull request as draft March 5, 2021 22:26
@codecov
Copy link

codecov bot commented Mar 5, 2021

Codecov Report

Merging #441 (00e99b8) into master (8d9ed87) will increase coverage by 0.65%.
The diff coverage is 82.60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #441      +/-   ##
==========================================
+ Coverage   54.90%   55.56%   +0.65%     
==========================================
  Files          39       39              
  Lines        4218     4305      +87     
==========================================
+ Hits         2316     2392      +76     
- Misses       1706     1712       +6     
- Partials      196      201       +5     
Impacted Files Coverage Δ
x/wasm/internal/keeper/handler_plugin.go 76.19% <66.66%> (+1.08%) ⬆️
x/wasm/internal/keeper/keeper.go 86.24% <84.21%> (-0.33%) ⬇️
x/wasm/internal/keeper/relay.go 100.00% <100.00%> (ø)

@ethanfrey ethanfrey marked this pull request as ready for review March 5, 2021 23:17
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.

Some quick feedback on the questions. No time for a proper review yet.

x/wasm/internal/keeper/keeper.go Outdated Show resolved Hide resolved
x/wasm/internal/keeper/keeper.go Outdated Show resolved Hide resolved
x/wasm/internal/keeper/keeper.go Outdated Show resolved Hide resolved
x/wasm/internal/keeper/keeper.go Outdated Show resolved Hide resolved
x/wasm/internal/keeper/keeper.go Show resolved Hide resolved
x/wasm/internal/keeper/keeper.go Show resolved Hide resolved
x/wasm/internal/keeper/keeper.go Outdated Show resolved Hide resolved
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.

Good 🎸
Only the data payload may become an issue.

x/wasm/internal/keeper/submsg_test.go Show resolved Hide resolved
x/wasm/internal/keeper/submsg_test.go Outdated Show resolved Hide resolved
x/wasm/internal/keeper/submsg_test.go Outdated Show resolved Hide resolved
x/wasm/internal/keeper/submsg_test.go Show resolved Hide resolved
@ethanfrey
Copy link
Member Author

Okay, I addressed all the comments and added a bug fix and test.

Rebased on master (to include pinned contract metering) and please feel free to merge if it looks better now.

@alpe alpe merged commit 78d5581 into master Mar 10, 2021
@alpe alpe deleted the submsg-and-replies branch March 10, 2021 08:46
@alpe
Copy link
Contributor

alpe commented Mar 10, 2021

Awesome feature, Thanks 💐

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.

Add support for submessages/callback
2 participants