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

testing: e2e tests for soft opt out #857

Merged
merged 7 commits into from
Apr 19, 2023
Merged

testing: e2e tests for soft opt out #857

merged 7 commits into from
Apr 19, 2023

Conversation

shaspitz
Copy link
Contributor

Description

Adds e2e tests validating #765

Linked issues

Closes #849

Type of change

If you've checked more than one of the first three boxes, consider splitting this PR into multiple PRs!

  • Feature: Changes and/or adds code behavior, irrelevant to bug fixes
  • Fix: Changes and/or adds code behavior, specifically to fix a bug
  • Refactor: Changes existing code style, naming, structure, etc.
  • Testing: Adds testing
  • Docs: Adds documentation

Regression tests

Existing happy path steps are still there

New behavior tests

Two new steps functions were added, stepsRedelegateForOptOut and stepsDowntimeWithOptOut.

Versioning Implications

If the above box is checked, which version should be bumped?

  • MAJOR: Consensus breaking changes to both the provider and consumers(s), including updates/breaking changes to IBC communication between provider and consumer(s)
  • MINOR: Consensus breaking changes which affect either only the provider or only the consumer(s)
  • PATCH: Non consensus breaking changes

Targeting

Please select one of the following:

  • This PR is only relevant to main
  • This PR is relevant to main, and should also be back-ported to ____ (ex: v1.0.0 and v1.1.0)
  • This PR is only relevant to ____ (ex: v1.0.0, v1.1.0, and v1.2.0)

@shaspitz shaspitz marked this pull request as ready for review April 17, 2023 22:55
@shaspitz
Copy link
Contributor Author

shaspitz commented Apr 17, 2023

@mpoke lets chat tomorrow about whether this PR validates that the default value of "0.05" is indeed used as the default value for SoftOptOutThreshold on the consumer

@mpoke
Copy link
Contributor

mpoke commented Apr 18, 2023

@mpoke lets chat tomorrow about whether this PR validates that the default value of "0.05" is indeed used as the default value for SoftOptOutThreshold on the consumer

I don't think it does. IIUC, both the consumer and provider in the tests are running the same version of ICS, the one where the provider sets the SoftOptOutThreshold to 0.05. Could you try to run the same test, but with ICS v1.1 on the provider?

@shaspitz
Copy link
Contributor Author

@mpoke GAIA_TAG=v9.0.2 make test-gaia-e2e-short-tagged fails but this is expected. For features that we get out quickly like this, consumers will need to manually mutate the genesis JSON queried from provider to have the proper parameter set. Stride is doing this manual mutation as well

@shaspitz
Copy link
Contributor Author

@mpoke with bfa4f1c, GAIA_TAG=v9.0.2 make test-gaia-e2e-short-tagged now passes 🚀. Instructions will need to be relayed to Neutron that they'll need to add soft_opt_out_threshold = \"0.05\" to the appropriate section of their genesis JSON

Copy link
Contributor

@MSalopek MSalopek left a comment

Choose a reason for hiding this comment

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

Approved!

I like that it's in happy path so we have an A/B test confirming that both downtime jailing scenarios work as expected.

// soft opt-out threshold to 0.05 in the consumer genesis to ensure that the
// consumer binary doesn't panic. Sdk requires that all params are set to valid
// values from the genesis file.
genesisChanges: ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0.05\"",
Copy link
Contributor

Choose a reason for hiding this comment

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

No biggie, but couldn't this be 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

0 is a valid value for that param, but setting it to 0 would make the test fail (just confirmed) and wouldn't validate the feature. It'd essentially mean 0% of validator set is allowed to opt out

Copy link
Contributor

@jtremback jtremback left a comment

Choose a reason for hiding this comment

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

Approved, with one minor comment

@shaspitz shaspitz merged commit 6089b61 into main Apr 19, 2023
@shaspitz shaspitz deleted the opt-out-e2e branch April 19, 2023 16: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.

Soft opt out - finish testing
4 participants