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

Add ibc stargate to vm #716

Merged
merged 10 commits into from
Jan 14, 2021
Merged

Add ibc stargate to vm #716

merged 10 commits into from
Jan 14, 2021

Conversation

ethanfrey
Copy link
Member

@ethanfrey ethanfrey commented Jan 13, 2021

Addresses #692

  • Add calls in cosmwasm_vm to execute code for all 6 ibc entry points.
  • Add test helpers for these calls

@ethanfrey ethanfrey mentioned this pull request Jan 13, 2021
7 tasks
@ethanfrey ethanfrey marked this pull request as ready for review January 13, 2021 21:04
@ethanfrey ethanfrey mentioned this pull request Jan 13, 2021
8 tasks
@ethanfrey
Copy link
Member Author

Rebasing #714 on top of this branch, so I can test it with real data. But I would like to merge these changes independent of the other contract

@ethanfrey
Copy link
Member Author

@webmaster128 this should be good to merge, unless you have any change requests.

I tested these calls in #714
I can update them later if needed

.circleci/config.yml Show resolved Hide resolved
.circleci/config.yml Show resolved Hide resolved
packages/vm/src/lib.rs Show resolved Hide resolved
Comment on lines +96 to +104
#[cfg(feature = "stargate")]
fn default_features() -> HashSet<String> {
features_from_csv("staking,stargate")
}

#[cfg(not(feature = "stargate"))]
fn default_features() -> HashSet<String> {
features_from_csv("staking")
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#[cfg(feature = "stargate")]
fn default_features() -> HashSet<String> {
features_from_csv("staking,stargate")
}
#[cfg(not(feature = "stargate"))]
fn default_features() -> HashSet<String> {
features_from_csv("staking")
}
fn default_features() -> HashSet<String> {
#[cfg(feature = "stargate")]
{
features_from_csv("staking,stargate")
}
#[cfg(not(feature = "stargate"))]
{
features_from_csv("staking")
}
}

Copy link
Member

Choose a reason for hiding this comment

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

Not very pretty but avoids any mismatch in the function signature

Copy link
Member Author

@ethanfrey ethanfrey Jan 14, 2021

Choose a reason for hiding this comment

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

They will have the same compile-time checks, and same code.
If there is a mismatch it is only detected under one cfg option. (The CI will catch any compile-time issues)

I find the current version more readable

@ethanfrey ethanfrey merged commit f77ffcf into master Jan 14, 2021
@ethanfrey ethanfrey deleted the add-ibc-stargate-to-vm branch January 14, 2021 18:37
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.

None yet

2 participants