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

Experimental IBC integration into wasmd #261

Closed
wants to merge 4 commits into from

Conversation

alpe
Copy link
Member

@alpe alpe commented Aug 25, 2020

Interblockchain Communication Protocol (IBC)

IBC is one of the key features for the cosmos hub. With the wasm smart contract module we can even go one step further and want to provide dynamic IBC:

... the idea of using a smart contract or VM platform to deploy new contracts that support new protocols, all on an existing chain without having to wait for chain upgrades.

With this PR we share an early version to integrate and evaluate the technology. This code is not intended to be merged into master as it is, now. There are some shortcuts integrated like registration of mock contracts in Go for controls within go testing and fast feedback. All interfaces and methods should be considered WIP and unstable for now.
The Cosmos-sdk is still under development.

Within this branch we present:

  • our spec for IBC integration into wasmd x/wasm/IBC.md
  • dynamic port allocation for contracts x/wasm/internal/keeper/ibc.go
  • dynamic routing of IBC packets/ acknowledgements to contracts x/wasm/ibc.go
  • first version of new cosmwasm IBC interfaces and messages for contracts x/wasm/internal/keeper/cosmwasm
  • a mock contract that sends ping pong IBC packets Complete IBC Mock testing #255 x/wasm/relay_pingpong_test.go
  • a mock contract that plays the receiving side in an ics-20 transfer x/wasm/relay_test.go
  • a mock contract that plays the sending side in an ics-20 transfer x/wasm/relay_test.go
  • wasmd setup and extensions to the ibc-testing package x/wasm/ibc-testing

Discussed but not completed:

@alpe alpe mentioned this pull request Aug 25, 2020
@codecov
Copy link

codecov bot commented Aug 28, 2020

Codecov Report

Merging #261 into 0.10_to_cosmos-stargate_ce9c2b2 will decrease coverage by 0.19%.
The diff coverage is 17.82%.

Impacted file tree graph

@@                         Coverage Diff                         @@
##           0.10_to_cosmos-stargate_ce9c2b2     #261      +/-   ##
===================================================================
- Coverage                            17.68%   17.48%   -0.20%     
===================================================================
  Files                                   32       36       +4     
  Lines                                10593    11516     +923     
===================================================================
+ Hits                                  1873     2014     +141     
- Misses                                8636     9403     +767     
- Partials                                84       99      +15     
Impacted Files Coverage Δ
app/integration/test_common.go 0.00% <0.00%> (ø)
x/wasm/internal/types/codec.go 44.44% <0.00%> (-2.62%) ⬇️
x/wasm/internal/types/msg.pb.go 0.58% <ø> (ø)
x/wasm/internal/types/types.pb.go 0.73% <0.00%> (-0.02%) ⬇️
x/wasm/module.go 59.18% <0.00%> (+42.85%) ⬆️
x/wasm/internal/types/ibc.pb.go 1.05% <1.05%> (ø)
x/wasm/internal/types/msg.go 44.69% <8.69%> (-7.99%) ⬇️
x/wasm/internal/keeper/ibc.go 9.37% <9.37%> (ø)
app/export.go 7.59% <23.07%> (ø)
x/wasm/internal/keeper/handler_plugin.go 56.47% <26.74%> (-17.28%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81b8138...f6d92b7. Read the comment docs.

@ethanfrey ethanfrey mentioned this pull request Oct 4, 2020
6 tasks
@alpe
Copy link
Member Author

alpe commented Nov 3, 2020

This was a design spike how IBC integration with wasm contracts may look like. I am closing this for now as it would require quite some effort to rebase the branch on to top of our current master. Anybody watching this: we will have a proper implementation in the future based on the learning from this spike.

@alpe alpe closed this Nov 3, 2020
@cyborgshead
Copy link

@alpe Thanks for the updates.

This was a design spike how IBC integration with wasm contracts may look like. I am closing this for now as it would require quite some effort to rebase the branch on to top of our current master. Anybody watching this: we will have a proper implementation in the future based on the learning from this spike.

@alpe alpe deleted the stargate_ibc_eval branch September 15, 2021 11:51
zemyblue pushed a commit to Finschia/wasmd that referenced this pull request Jan 2, 2023
zemyblue pushed a commit to Finschia/wasmd that referenced this pull request Jan 2, 2023
…ster

* remotes/gaia/master: (38 commits)
  Merge PR CosmWasm#259: Bump SDK master commit
  Exec go mod tidy (CosmWasm#267)
  Merge PR CosmWasm#265: add version v2.0.5 to CHANGELOG
  Fix broken link in delegator guide (CosmWasm#262)
  docs: removed redundant readme.md (CosmWasm#261)
  Merge PR CosmWasm#258: Bump github.com/spf13/viper from 1.6.1 to 1.6.2
  Merge PR CosmWasm#250: Docs-update
  Merge PR CosmWasm#256: Bump github.com/pkg/errors from 0.9.0 to 0.9.1
  Merge PR CosmWasm#255: Bump github.com/pkg/errors from 0.8.1 to 0.9.0
  Merge PR CosmWasm#253: Bump SDK master commit
  Merge PR CosmWasm#252: v2.0.4 Changelog
  Merge PR CosmWasm#249: docker image build and upload for release tags
  Merge PR CosmWasm#247: Update SDK Commit & Update CLI Doc
  Merge PR CosmWasm#246: Update Archive page with explorers
  Merge PR CosmWasm#245: archives
  Bump SDK commit to the latest master (CosmWasm#239)
  Merge PR CosmWasm#215: Update simulation tests
  Update join-mainnet.md (CosmWasm#229)
  Incorporate SDK's latest changes (CosmWasm#227)
  Merge PR CosmWasm#221: Hide unnecessarily exported function to better coverage report
  ...
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.

3 participants