diff --git a/app/upgrades/v20/upgrades.go b/app/upgrades/v20/upgrades.go index 9c01d7fa03..c2d1547227 100644 --- a/app/upgrades/v20/upgrades.go +++ b/app/upgrades/v20/upgrades.go @@ -1,6 +1,8 @@ package v20 import ( + "time" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -83,8 +85,43 @@ func MigrateICSOutstandingDowntime(ctx sdk.Context, ck ccvconsumerkeeper.Keeper) } // Migrates ICS Params to add the new RetryDelayParam +// Because RetryDelayPeriod isn't in the store yet, we can't call +// ck.GetConsumerParams(ctx) and modify the RetryDelayPeriod, +// as calling ck.GetConsumerParams(ctx) will panic if the param isn't in the store. +// Instead, we get the DefaultParams and modify each value to +// their value directly before the v20 upgrade func MigrateICSParams(ctx sdk.Context, ck ccvconsumerkeeper.Keeper) { - params := ck.GetConsumerParams(ctx) + // Get default consumer params and set the new RetryDelayPeriod + params := ccvtypes.DefaultParams() params.RetryDelayPeriod = ccvtypes.DefaultRetryDelayPeriod + // Modify to the correct params values + params.Enabled = true + params.BlocksPerDistributionTransmission = 1000 + params.DistributionTransmissionChannel = "channel-0" + params.ProviderFeePoolAddrStr = "cosmos1ap0mh6xzfn8943urr84q6ae7zfnar48am2erhd" + params.CcvTimeoutPeriod = time.Second * 2419200 + params.TransferTimeoutPeriod = time.Second * 3600 + params.ConsumerRedistributionFraction = "0.85" + params.HistoricalEntries = 10000 + params.UnbondingPeriod = time.Second * 1209600 + params.SoftOptOutThreshold = "0.05" + params.RewardDenoms = []string{ + "stucmdx", + "stuatom", + "staevmos", + "stinj", + "stujuno", + "stuosmo", + "stuluna", + "stusomm", + "stustars", + "stuumee", + "ustrd", + "stadydx", + "stutia", + "stadym", + } + params.ProviderRewardDenoms = []string{} + // Set the new params ck.SetParams(ctx, params) } diff --git a/dockernet/src/register_host.sh b/dockernet/src/register_host.sh index fc7252ddc4..09b23ac44d 100644 --- a/dockernet/src/register_host.sh +++ b/dockernet/src/register_host.sh @@ -31,7 +31,7 @@ fi echo "$CHAIN - Registering host zone..." $STRIDE_MAIN_CMD tx stakeibc register-host-zone \ $CONNECTION $HOST_DENOM $ADDRESS_PREFIX $IBC_DENOM $CHANNEL 1 $LSM_ENABLED $COMMUNITY_POOL_TREASURY_ADDRESS \ - --gas 1000000 --from $STRIDE_ADMIN_ACCT --home $DOCKERNET_HOME/state/stride1 -y | TRIM_TX + --gas 2000000 --from $STRIDE_ADMIN_ACCT --home $DOCKERNET_HOME/state/stride1 -y | TRIM_TX sleep 10 # Build array of validators of the form: diff --git a/dockernet/start_network.sh b/dockernet/start_network.sh index 9cd6c36093..831b5137ec 100755 --- a/dockernet/start_network.sh +++ b/dockernet/start_network.sh @@ -57,8 +57,6 @@ done # Start each chain, create the transfer channels and start the relayers -# For dydx, sleep before and after the relayers are setup to get it some time to startup -# since it's a computationally expensive chain bash $SRC/start_chain.sh bash $SRC/start_relayers.sh diff --git a/x/stakeibc/keeper/reward_converter.go b/x/stakeibc/keeper/reward_converter.go index d4b9dfe5a9..c9793f5515 100644 --- a/x/stakeibc/keeper/reward_converter.go +++ b/x/stakeibc/keeper/reward_converter.go @@ -34,12 +34,6 @@ type ForwardMetadata struct { Retries int64 `json:"retries"` } -type FeeInfo struct { - RebateAmount sdkmath.Int - StrideFeeAmount sdkmath.Int - ReinvestAmount sdkmath.Int -} - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // The goal of this code is to allow certain reward token types to be automatically traded into other types // This happens before the rest of the staking, allocation, distribution etc. would continue as normal