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

Ibc query support #439

Merged
merged 4 commits into from
Mar 9, 2021
Merged

Ibc query support #439

merged 4 commits into from
Mar 9, 2021

Conversation

ethanfrey
Copy link
Member

Closes #434

Code "complete", but needs testing

The IbcQuery.Channels variant doesn't seem to match what we can get from the IBC Keeper (we cannot filter by port). This will be very expensive to call.

Let us reconsider what we want to do here. We can still modify the queries we expose to the contracts (remove or adjust them). CosmWasm is still in -alpha2, so we can change types.

@ethanfrey ethanfrey requested a review from alpe as a code owner March 4, 2021 21:14
@codecov
Copy link

codecov bot commented Mar 4, 2021

Codecov Report

Merging #439 (9ce450a) into master (d51a1b8) will decrease coverage by 0.85%.
The diff coverage is 26.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #439      +/-   ##
==========================================
- Coverage   55.44%   54.58%   -0.86%     
==========================================
  Files          39       39              
  Lines        4080     4109      +29     
==========================================
- Hits         2262     2243      -19     
- Misses       1627     1671      +44     
- Partials      191      195       +4     
Impacted Files Coverage Δ
x/wasm/internal/keeper/query_plugins.go 59.74% <9.80%> (-13.77%) ⬇️
x/wasm/internal/keeper/keeper.go 87.06% <100.00%> (-0.87%) ⬇️
x/wasm/internal/keeper/relay.go 100.00% <100.00%> (ø)

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.

Minor comments only. Looks good 🌻

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

ethanfrey commented Mar 5, 2021

I'd like to make a few changes to the query types as mentioned above. Do you think those are good?

  • Remove the port argument to Channels query (as we basically ignore it, filtering could be done just as easy in wasm). (Keep it there and fake sdk side, future versions may provide better queries)
  • Include full channel info in the list query (we have it all)
  • Remove the Counterparty Version info from the ChannelInfo

@alpe
Copy link
Contributor

alpe commented Mar 7, 2021

I'd like to make a few changes to the query types as mentioned above. Do you think those are good?

  • Remove the port argument to Channels query (as we basically ignore it, filtering could be done just as easy in wasm). (Keep it there and fake sdk side, future versions may provide better queries)
    👌
  • Include full channel info in the list query (we have it all)
    👌 Can save further queries
  • Remove the Counterparty Version info from the ChannelInfo
    🙅 We need it during IBC handshake. Maybe we make it a pointer type to communicate that it is not always set.

@ethanfrey ethanfrey merged commit 8d9ed87 into master Mar 9, 2021
@ethanfrey ethanfrey deleted the ibc-query-support branch March 9, 2021 22:50
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 IBCQuery support
2 participants