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

feat!: deprecate soft opt-out #1964

Merged
merged 13 commits into from
Jun 25, 2024
18 changes: 8 additions & 10 deletions tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,13 @@ func (tr *TestConfig) startConsumerChain(
) {
fmt.Println("Starting consumer chain ", action.ConsumerChain)

// Note that Soft Opt-Out has been deprecated. Nevertheless, the parameter still exists and is expected to be set
// because the SDK requires that all params are set to valid values in the genesis file.
action.GenesisChanges = action.GenesisChanges + ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0\""

consumerGenesis := ".app_state.ccvconsumer = " + tr.getConsumerGenesis(action.ProviderChain, action.ConsumerChain, target)
consumerGenesisChanges := tr.chainConfigs[action.ConsumerChain].GenesisChanges
if consumerGenesisChanges != "" {
consumerGenesis = consumerGenesis + " | " + consumerGenesisChanges + " | " + action.GenesisChanges
consumerGenesis = consumerGenesis + " | " + consumerGenesisChanges
}
if action.GenesisChanges != "" {
consumerGenesis = consumerGenesis + " | " + action.GenesisChanges
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was added here and in changeoverChain because If action.GenesisChanges was the empty string, consumerGenesis would end with | and as a result the jq transformation here would fail.

}

tr.startChain(StartChainAction{
Expand Down Expand Up @@ -842,14 +841,13 @@ func (tr TestConfig) changeoverChain(
log.Fatal(err, "\n", string(bz))
}

// Note that Soft Opt-Out has been deprecated. Nevertheless, the parameter still exists and is expected to be set
// because the SDK requires that all params are set to valid values in the genesis file.
action.GenesisChanges = action.GenesisChanges + ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0\""

consumerGenesis := ".app_state.ccvconsumer = " + string(bz)
consumerGenesisChanges := tr.chainConfigs[action.SovereignChain].GenesisChanges
if consumerGenesisChanges != "" {
consumerGenesis = consumerGenesis + " | " + consumerGenesisChanges + " | " + action.GenesisChanges
consumerGenesis = consumerGenesis + " | " + consumerGenesisChanges
}
if action.GenesisChanges != "" {
consumerGenesis = consumerGenesis + " | " + action.GenesisChanges
}

tr.startChangeover(ChangeoverChainAction{
Expand Down
Loading