Skip to content

Commit

Permalink
set bech32prefix for provider to cosmos
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed Jan 17, 2024
1 parent 47d3a9c commit 1ce3a93
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion cmd/interchain-security-pd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func main() {
appparams.SetAddressPrefixes("provider")
appparams.SetAddressPrefixes("cosmos")
rootCmd := cmd.NewRootCmd()
if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil {
switch e := err.(type) {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ func (tr TestConfig) addChainToGorelayer(

var accountPrefix string
if ChainId == ChainID("provi") {
accountPrefix = "provider"
accountPrefix = "cosmos"
} else {
accountPrefix = "consumer"
}
Expand Down Expand Up @@ -788,7 +788,7 @@ func (tr TestConfig) addChainToHermes(

var accountPrefix string
if ChainId == ChainID("provi") {
accountPrefix = "provider"
accountPrefix = "cosmos"
} else {
accountPrefix = "consumer"
}
Expand Down
72 changes: 36 additions & 36 deletions tests/e2e/config.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/e2e/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ func (tr TestConfig) getValPower(chain ChainID, validator ValidatorID) uint {

for _, val := range valset.Validators {
if chain == ChainID("provi") {
// use binary with Bech32Prefix set to "provider"
// use binary with Bech32Prefix set to "cosmos"
if val.Address != tr.validatorConfigs[validator].ValconsAddress {
continue
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/testnet-scripts/fork-consumer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ event_source = { mode = 'push', url = 'ws://$CONS_CHAIN_PREFIX.252:26658/websock
[[chains]]
id = "provi"
account_prefix = "provider"
account_prefix = "cosmos"
clock_drift = "5s"
gas_multiplier = 1.1
grpc_addr = "tcp://$PROV_CHAIN_PREFIX.4:9091"
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/tracehandler_testdata/consumer-double-sign.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@
"Rewards": null,
"ConsumerChains": null,
"AssignedKeys": {
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -160,10 +160,10 @@
"ConsumerChains": null,
"AssignedKeys": {
"bob": "",
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/tracehandler_testdata/democracy.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@
"Rewards": null,
"ConsumerChains": null,
"AssignedKeys": {
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -160,10 +160,10 @@
"ConsumerChains": null,
"AssignedKeys": {
"bob": "",
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/tracehandler_testdata/democracyRewardsSteps.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@
"Rewards": null,
"ConsumerChains": null,
"AssignedKeys": {
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -160,10 +160,10 @@
"ConsumerChains": null,
"AssignedKeys": {
"bob": "",
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down
20 changes: 10 additions & 10 deletions tests/e2e/tracehandler_testdata/happyPath.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@
"Rewards": null,
"ConsumerChains": null,
"AssignedKeys": {
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -160,10 +160,10 @@
"ConsumerChains": null,
"AssignedKeys": {
"bob": "",
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -472,11 +472,11 @@
"ConsumerChains": null,
"AssignedKeys": {
"bob": "consumervalcons1uuec3cjxajv5te08p220usrjhkfhg9wyref26m",
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"bob": "providervalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6kle6ya5u",
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"bob": "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39",
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -527,11 +527,11 @@
"ConsumerChains": null,
"AssignedKeys": {
"bob": "consumervalcons1uuec3cjxajv5te08p220usrjhkfhg9wyref26m",
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"bob": "providervalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6kle6ya5u",
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"bob": "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39",
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down
16 changes: 8 additions & 8 deletions tests/e2e/tracehandler_testdata/multipleConsumers.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@
"Rewards": null,
"ConsumerChains": null,
"AssignedKeys": {
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -160,10 +160,10 @@
"ConsumerChains": null,
"AssignedKeys": {
"bob": "",
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -380,10 +380,10 @@
"Rewards": null,
"ConsumerChains": null,
"AssignedKeys": {
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -425,10 +425,10 @@
"ConsumerChains": null,
"AssignedKeys": {
"bob": "",
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/tracehandler_testdata/shorthappy.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@
"Rewards": null,
"ConsumerChains": null,
"AssignedKeys": {
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -160,10 +160,10 @@
"ConsumerChains": null,
"AssignedKeys": {
"bob": "",
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/tracehandler_testdata/slashThrottle.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@
"Rewards": null,
"ConsumerChains": null,
"AssignedKeys": {
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down Expand Up @@ -160,10 +160,10 @@
"ConsumerChains": null,
"AssignedKeys": {
"bob": "",
"carol": "providervalcons1kswr5sq599365kcjmhgufevfps9njf43c2pag0"
"carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"
},
"ProviderKeys": {
"carol": "providervalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayrkt0fr"
"carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"
},
"ConsumerPendingPacketQueueSize": null,
"RegisteredConsumerRewardDenoms": null,
Expand Down
6 changes: 3 additions & 3 deletions x/ccv/consumer/keeper/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestParams(t *testing.T) {
require.Equal(t, expParams, params)

newParams := ccv.NewParams(false, 1000,
"channel-2", "provider19pe9pg5dv9k5fzgzmsrgnw9rl9asf7ddeeglea",
"channel-2", "cosmos19pe9pg5dv9k5fzgzmsrgnw9rl9asf7ddwhu7lm",
7*24*time.Hour, 25*time.Hour, "0.5", 500, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}, 2*time.Hour)
consumerKeeper.SetParams(ctx, newParams)
params = consumerKeeper.GetConsumerParams(ctx)
Expand All @@ -52,10 +52,10 @@ func TestParams(t *testing.T) {
gotChan := consumerKeeper.GetDistributionTransmissionChannel(ctx)
require.Equal(t, gotChan, "channel-7")

consumerKeeper.SetProviderFeePoolAddrStr(ctx, "provider1dkas8mu4kyhl5jrh4nzvm65qz588hy9q0vmxem")
consumerKeeper.SetProviderFeePoolAddrStr(ctx, "cosmos1dkas8mu4kyhl5jrh4nzvm65qz588hy9qcz08la")
gotAddr := consumerKeeper.
GetProviderFeePoolAddrStr(ctx)
require.Equal(t, gotAddr, "provider1dkas8mu4kyhl5jrh4nzvm65qz588hy9q0vmxem")
require.Equal(t, gotAddr, "cosmos1dkas8mu4kyhl5jrh4nzvm65qz588hy9qcz08la")

consumerKeeper.SetUnbondingPeriod(ctx, time.Hour*24*10)
storedUnbondingPeriod := consumerKeeper.GetUnbondingPeriod(ctx)
Expand Down

0 comments on commit 1ce3a93

Please sign in to comment.