diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index 9e107a4b8..27e133029 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -81,13 +81,14 @@ func CreateUpgradeHandler( func AddHourEpoch(ctx sdk.Context, k epochskeeper.Keeper) { ctx.Logger().Info("Adding hour epoch") + startTime := ctx.BlockTime().Truncate(time.Hour) hourEpoch := epochstypes.EpochInfo{ Identifier: epochstypes.HOUR_EPOCH, - StartTime: time.Time{}, + StartTime: startTime, Duration: time.Hour, CurrentEpoch: 0, - CurrentEpochStartHeight: 0, - CurrentEpochStartTime: time.Time{}, + CurrentEpochStartHeight: ctx.BlockHeight(), + CurrentEpochStartTime: startTime, EpochCountingStarted: false, } @@ -134,9 +135,12 @@ func AddRedemptionRateSafetyChecks(ctx sdk.Context, k stakeibckeeper.Keeper) { ctx.Logger().Info("Setting min/max redemption rate safety bounds on each host zone") // Set new stakeibc params - params := k.GetParams(ctx) - params.DefaultMinRedemptionRateThreshold = stakeibctypes.DefaultMinRedemptionRateThreshold - params.DefaultMaxRedemptionRateThreshold = stakeibctypes.DefaultMaxRedemptionRateThreshold + // In this case, we're using `DefaultParams` because all of our current params are the defaults + // You can verify this by hand by running `strided q stakeibc params`, and comparing the output to the values defined in params.go. + // This is a safer way of adding a new parameter that avoids having to unmarshal using the old types + // In future upgrades, if we are simply modifying parameter values (instead of adding a new parameter), + // we should read in params using GetParams, modify them, and then set them using SetParams + params := stakeibctypes.DefaultParams() k.SetParams(ctx, params) // Get default min/max redemption rate @@ -194,6 +198,8 @@ func ExecuteProp153(ctx sdk.Context, k bankkeeper.Keeper) error { // Create reward collector module account for Prop #8 func CreateRewardCollectorModuleAccount(ctx sdk.Context, k authkeeper.AccountKeeper) error { + ctx.Logger().Info("Creating reward collector module account") + rewardCollectorAddress := address.Module(stakeibctypes.RewardCollectorName, []byte(stakeibctypes.RewardCollectorName)) return utils.CreateModuleAccount(ctx, k, rewardCollectorAddress) } diff --git a/app/upgrades/v7/upgrades_test.go b/app/upgrades/v7/upgrades_test.go index 8a80ee9eb..c158374fd 100644 --- a/app/upgrades/v7/upgrades_test.go +++ b/app/upgrades/v7/upgrades_test.go @@ -29,14 +29,16 @@ var ( InitialJunoUnbondingFrequency = uint64(4) ustrd = "ustrd" ) + +// The block time here is arbitrary, but it's must start at a time that is not at an even hour +var InitialBlockTime = time.Date(2023, 1, 1, 8, 43, 0, 0, time.UTC) // January 1st 2023 at 8:43 AM +var EpochStartTime = time.Date(2023, 1, 1, 8, 00, 0, 0, time.UTC) // January 1st 2023 at 8:00 AM var ExpectedHourEpoch = epochstypes.EpochInfo{ - Identifier: epochstypes.HOUR_EPOCH, - StartTime: time.Time{}, - Duration: time.Hour, - CurrentEpoch: 0, - CurrentEpochStartHeight: 0, - CurrentEpochStartTime: time.Time{}, - EpochCountingStarted: false, + Identifier: epochstypes.HOUR_EPOCH, + Duration: time.Hour, + CurrentEpoch: 0, + StartTime: EpochStartTime, + CurrentEpochStartTime: EpochStartTime, } var ExpectedJunoUnbondingFrequency = uint64(5) var ExpectedEpochProvisions = sdk.NewDec(1_078_767_123) @@ -100,6 +102,9 @@ func (s *UpgradeTestSuite) SetupEpochs() { s.App.EpochsKeeper.SetEpochInfo(s.Ctx, epochstypes.EpochInfo{ Identifier: epochstypes.STRIDE_EPOCH, }) + + // Change the context to be a time that's not rounded on the hour + s.Ctx = s.Ctx.WithBlockTime(InitialBlockTime) } // Checks that the hour epoch has been added @@ -118,9 +123,12 @@ func (s *UpgradeTestSuite) CheckEpochsAfterUpgrade(epochStarted bool) { // If the upgrade passed an a block was incremented, the epoch should be started expectedHourEpoch := ExpectedHourEpoch if epochStarted { - expectedHourEpoch.EpochCountingStarted = true expectedHourEpoch.CurrentEpoch = 1 + expectedHourEpoch.EpochCountingStarted = true expectedHourEpoch.CurrentEpochStartHeight = DummyUpgradeHeight + } else { + expectedHourEpoch.EpochCountingStarted = false + expectedHourEpoch.CurrentEpochStartHeight = s.Ctx.BlockHeight() } actualHourEpoch, found := s.App.EpochsKeeper.GetEpochInfo(s.Ctx, epochstypes.HOUR_EPOCH) diff --git a/proto/stride/stakeibc/params.proto b/proto/stride/stakeibc/params.proto index ccf27d135..3e233f5c0 100755 --- a/proto/stride/stakeibc/params.proto +++ b/proto/stride/stakeibc/params.proto @@ -15,15 +15,8 @@ message Params { uint64 delegate_interval = 6; uint64 deposit_interval = 2; uint64 redemption_rate_interval = 3; - uint64 stride_commission = 4; - // zone_com_address stores which addresses to - // send the Stride commission too, as well as what portion - // of the fee each address is entitled to - // TODO implement this - map zone_com_address = 5; uint64 reinvest_interval = 7; - uint64 validator_rebalancing_threshold = 8; uint64 ica_timeout_nanos = 9; uint64 buffer_size = 10; uint64 ibc_timeout_blocks = 11; @@ -34,4 +27,6 @@ message Params { uint64 ibc_transfer_timeout_nanos = 16; uint64 safety_num_validators = 17; uint64 safety_max_slash_percent = 18; + + reserved 8; } \ No newline at end of file diff --git a/readme-docs/md/stakeibc_README.md b/readme-docs/md/stakeibc_README.md index 3b6e1943b..0f6239a1a 100644 --- a/readme-docs/md/stakeibc_README.md +++ b/readme-docs/md/stakeibc_README.md @@ -29,7 +29,6 @@ ReinvestInterval (default uint64 = 1) RewardsInterval (default uint64 = 1) RedemptionRateInterval (default uint64 = 1) StrideCommission (default uint64 = 10) -ValidatorRebalancingThreshold (default uint64 = 100) ICATimeoutNanos(default uint64 = 600000000000) BufferSize (default uint64 = 5) IbcTimeoutBlocks (default uint64 = 300) diff --git a/testutil/localstride/state-export/scripts/compare_before_after_state.py b/testutil/localstride/state-export/scripts/compare_before_after_state.py new file mode 100644 index 000000000..de28b35e7 --- /dev/null +++ b/testutil/localstride/state-export/scripts/compare_before_after_state.py @@ -0,0 +1,96 @@ +import pandas as pd +import json + +''' + This file provides an extremely lightweight tool to compare two state exports from a "localstride" test. + + It will diff parts of state and will output any diffs that are not "expected" + + To run, please modify "BEFORE_PATH" and "AFTER_PATH" and run `python3 compare_before_after_state.py` +''' + +BEFORE_PATH = 'state_export_before_upgrade.json' +AFTER_PATH = 'state_export_after_upgrade.json' + +EXPECTED_DIFFS = [ + '/interchainquery/queries', + '/auth/accounts', + '/bank/balances', + '/bank/supply', + '/epochs/epochs', + '/staking/last_total_power', + '/staking/delegations', + '/staking/validators', + '/staking/last_validator_powers', + '/staking/unbonding_delegations', + '/gov/proposals', + '/gov/voting_params/voting_period', + '/gov/starting_proposal_id', + '/interchainaccounts/controller_genesis_state/ports', + '/slashing/missed_blocks', + '/slashing/signing_infos', + '/distribution/delegator_starting_infos', + '/distribution/previous_proposer', +] + +def compare_app_state(before_state, after_state): + before = before_state['app_state'] + after = after_state['app_state'] + equal_paths, unequal_paths = _return_equal_unequal_paths_recursively(before, after, '') + print("THE FOLLOWING STORES ARE UNEXPECTEDLY DIFFERENT - MUST INVESTIGATE") + expected_diff = [] + for p in unequal_paths: + if p in EXPECTED_DIFFS: + expected_diff.append(p) + continue + print(f"\t{p}") + print("\n\nTHE FOLLOWING STORES ARE DIFFERENT, AS EXPECTED - NO ACTION REQUIRED") + for p in expected_diff: + print(f"\t{p}") + +def _clean_path(path_list): + return [c.replace(':/', ':') for c in path_list] + +def _return_equal_unequal_paths_recursively(s1, s2, prefix): + if (type(s1) != dict) or (type(s2) != dict): + if s1 == s2: + return [prefix], [] + else: + if (type(s1) == type(s2)) and (type(s1) == list) and (len(s1) == len(s2)) and (prefix not in EXPECTED_DIFFS): + zipped_list = zip(s1, s2) + equal_paths = set() + unequal_paths = set() + for zl in zipped_list: + sub_equal, sub_unequal = _return_equal_unequal_paths_recursively(zl[0], zl[1], prefix + ':') + equal_paths.update(sub_equal) + unequal_paths.update(sub_unequal) + return _clean_path(list(equal_paths)), _clean_path(list(unequal_paths)) + return [], [prefix] + equal_paths = [] + unequal_paths = [] + s1_keys = set(s1.keys()) + s2_keys = set(s2.keys()) + inter_keys = s1_keys.intersection(s2_keys) + s1_unequal = s1_keys.difference(s2_keys) + s2_unequal = s2_keys.difference(s1_keys) + for joint_key in inter_keys: + sub_equal, sub_unequal = _return_equal_unequal_paths_recursively(s1[joint_key], s2[joint_key], prefix + f'/{joint_key}') + equal_paths.extend(sub_equal) + unequal_paths.extend(sub_unequal) + for s1_key in s1_unequal: + unequal_paths.append(prefix + f'/{s1_key} - MISSING') + for s2_key in s2_unequal: + unequal_paths.append(prefix + f'/{s2_key} - ADDED') + + return equal_paths, unequal_paths + +def main(): + with open(BEFORE_PATH) as f: + before_state = json.load(f) + with open(AFTER_PATH) as f: + after_state = json.load(f) + + compare_app_state(before_state, after_state) + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/testutil/localstride/state-export/scripts/submit_upgrade.sh b/testutil/localstride/state-export/scripts/submit_upgrade.sh index 22475d9f8..4d6756365 100644 --- a/testutil/localstride/state-export/scripts/submit_upgrade.sh +++ b/testutil/localstride/state-export/scripts/submit_upgrade.sh @@ -25,7 +25,7 @@ STRIDE_MAIN_CMD="docker-compose -f ${SCRIPT_DIR}/../docker-compose.yml exec -it printf "PROPOSAL\n" $STRIDE_MAIN_CMD tx gov submit-legacy-proposal software-upgrade $upgrade_name \ - --title $upgrade_name --description "upgrade" \ + --title $upgrade_name --description "upgrade" --upgrade-info "test" --no-validate \ --upgrade-height $upgrade_height --from val -y | TRIM_TX sleep 5 @@ -35,7 +35,7 @@ $STRIDE_MAIN_CMD query gov proposal $proposal_id sleep 5 printf "\nDEPOSIT\n" -$STRIDE_MAIN_CMD tx gov deposit $proposal_id 10000001ustrd --from val -y | TRIM_TX +$STRIDE_MAIN_CMD tx gov deposit $proposal_id 20000000001ustrd --from val -y | TRIM_TX sleep 5 printf "\nDEPOSIT CONFIRMATION\n" diff --git a/x/stakeibc/README.md b/x/stakeibc/README.md index d14273502..3fcc1d3ae 100644 --- a/x/stakeibc/README.md +++ b/x/stakeibc/README.md @@ -29,7 +29,6 @@ ReinvestInterval (default uint64 = 1) RewardsInterval (default uint64 = 1) RedemptionRateInterval (default uint64 = 1) StrideCommission (default uint64 = 10) -ValidatorRebalancingThreshold (default uint64 = 100) ICATimeoutNanos(default uint64 = 600000000000) BufferSize (default uint64 = 5) IbcTimeoutBlocks (default uint64 = 300) diff --git a/x/stakeibc/keeper/msg_server_rebalance_validators.go b/x/stakeibc/keeper/msg_server_rebalance_validators.go index d8fb6001e..d9f8132dd 100644 --- a/x/stakeibc/keeper/msg_server_rebalance_validators.go +++ b/x/stakeibc/keeper/msg_server_rebalance_validators.go @@ -59,8 +59,6 @@ func (k msgServer) RebalanceValidators(goCtx context.Context, msg *types.MsgReba return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "no validator delegations found for Host Zone %s, cannot rebalance 0 delegations!", hostZone.ChainId) } - // TODO Remove ValidatorRebalancingThreshold from our params - var msgs []sdk.Msg delegationIca := hostZone.GetDelegationAccount() if delegationIca == nil || delegationIca.GetAddress() == "" { diff --git a/x/stakeibc/keeper/reward_allocation.go b/x/stakeibc/keeper/reward_allocation.go index c6562d8f2..bcdc9f2e2 100644 --- a/x/stakeibc/keeper/reward_allocation.go +++ b/x/stakeibc/keeper/reward_allocation.go @@ -33,12 +33,12 @@ func (k Keeper) LiquidStakeRewardCollectorBalance(ctx sdk.Context, msgSvr types. // liquid stake all tokens msg := types.NewMsgLiquidStake(rewardCollectorAddress.String(), token.Amount, hz.HostDenom) if err := msg.ValidateBasic(); err != nil { - k.Logger(ctx).Error("Liquid stake from reward collector address failed validate basic: %s", err.Error()) + k.Logger(ctx).Error(fmt.Sprintf("Liquid stake from reward collector address failed validate basic: %s", err.Error())) continue } _, err = msgSvr.LiquidStake(ctx, msg) if err != nil { - k.Logger(ctx).Error("Can't liquid stake %s for hostzone %s", token.String(), hz.ChainId) + k.Logger(ctx).Error(fmt.Sprintf("Failed to liquid stake %s for hostzone %s: %s", token.String(), hz.ChainId, err.Error())) continue } k.Logger(ctx).Info(fmt.Sprintf("Liquid staked %s for hostzone %s's accrued rewards", token.String(), hz.ChainId)) diff --git a/x/stakeibc/types/params.go b/x/stakeibc/types/params.go index b1d000a3e..581e1743b 100644 --- a/x/stakeibc/types/params.go +++ b/x/stakeibc/types/params.go @@ -16,18 +16,17 @@ var ( DefaultRewardsInterval uint64 = 1 DefaultRedemptionRateInterval uint64 = 1 // you apparently cannot safely encode floats, so we make commission / 100 - DefaultStrideCommission uint64 = 10 - DefaultValidatorRebalancingThreshold uint64 = 100 // divide by 10,000, so 100 = 1% - DefaultICATimeoutNanos uint64 = 600000000000 - DefaultBufferSize uint64 = 5 // 1/5=20% of the epoch - DefaultIbcTimeoutBlocks uint64 = 300 // 300 blocks ~= 30 minutes - DefaultFeeTransferTimeoutNanos uint64 = 1800000000000 // 30 minutes - DefaultMinRedemptionRateThreshold uint64 = 90 // divide by 100, so 90 = 0.9 - DefaultMaxRedemptionRateThreshold uint64 = 150 // divide by 100, so 150 = 1.5 - DefaultMaxStakeICACallsPerEpoch uint64 = 100 - DefaultIBCTransferTimeoutNanos uint64 = 1800000000000 // 30 minutes - DefaultSafetyNumValidators uint64 = 35 - DefaultSafetyMaxSlashPercent uint64 = 10 + DefaultStrideCommission uint64 = 10 + DefaultICATimeoutNanos uint64 = 600000000000 + DefaultBufferSize uint64 = 5 // 1/5=20% of the epoch + DefaultIbcTimeoutBlocks uint64 = 300 // 300 blocks ~= 30 minutes + DefaultFeeTransferTimeoutNanos uint64 = 1800000000000 // 30 minutes + DefaultMinRedemptionRateThreshold uint64 = 90 // divide by 100, so 90 = 0.9 + DefaultMaxRedemptionRateThreshold uint64 = 150 // divide by 100, so 150 = 1.5 + DefaultMaxStakeICACallsPerEpoch uint64 = 100 + DefaultIBCTransferTimeoutNanos uint64 = 1800000000000 // 30 minutes + DefaultSafetyNumValidators uint64 = 35 + DefaultSafetyMaxSlashPercent uint64 = 10 // KeyDepositInterval is store's key for the DepositInterval option KeyDepositInterval = []byte("DepositInterval") @@ -36,7 +35,6 @@ var ( KeyRewardsInterval = []byte("RewardsInterval") KeyRedemptionRateInterval = []byte("RedemptionRateInterval") KeyStrideCommission = []byte("StrideCommission") - KeyValidatorRebalancingThreshold = []byte("ValidatorRebalancingThreshold") KeyICATimeoutNanos = []byte("ICATimeoutNanos") KeyFeeTransferTimeoutNanos = []byte("FeeTransferTimeoutNanos") KeyBufferSize = []byte("BufferSize") @@ -66,7 +64,6 @@ func NewParams( redemptionRateInterval uint64, strideCommission uint64, reinvestInterval uint64, - validatorRebalancingThreshold uint64, icaTimeoutNanos uint64, bufferSize uint64, ibcTimeoutBlocks uint64, @@ -85,7 +82,6 @@ func NewParams( RedemptionRateInterval: redemptionRateInterval, StrideCommission: strideCommission, ReinvestInterval: reinvestInterval, - ValidatorRebalancingThreshold: validatorRebalancingThreshold, IcaTimeoutNanos: icaTimeoutNanos, BufferSize: bufferSize, IbcTimeoutBlocks: ibcTimeoutBlocks, @@ -108,7 +104,6 @@ func DefaultParams() Params { DefaultRedemptionRateInterval, DefaultStrideCommission, DefaultReinvestInterval, - DefaultValidatorRebalancingThreshold, DefaultICATimeoutNanos, DefaultBufferSize, DefaultIbcTimeoutBlocks, @@ -131,7 +126,6 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyRedemptionRateInterval, &p.RedemptionRateInterval, isPositive), paramtypes.NewParamSetPair(KeyStrideCommission, &p.StrideCommission, isCommission), paramtypes.NewParamSetPair(KeyReinvestInterval, &p.ReinvestInterval, isPositive), - paramtypes.NewParamSetPair(KeyValidatorRebalancingThreshold, &p.ValidatorRebalancingThreshold, isThreshold), paramtypes.NewParamSetPair(KeyICATimeoutNanos, &p.IcaTimeoutNanos, isPositive), paramtypes.NewParamSetPair(KeyBufferSize, &p.BufferSize, isPositive), paramtypes.NewParamSetPair(KeyIbcTimeoutBlocks, &p.IbcTimeoutBlocks, isPositive), @@ -145,21 +139,6 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { } } -func isThreshold(i interface{}) error { - ival, ok := i.(uint64) - if !ok { - return fmt.Errorf("parameter not accepted: %T", i) - } - - if ival <= 0 { - return fmt.Errorf("parameter must be positive: %d", ival) - } - if ival > 10000 { - return fmt.Errorf("parameter must be less than 10,000: %d", ival) - } - return nil -} - func validTimeoutNanos(i interface{}) error { ival, ok := i.(uint64) if !ok { @@ -264,9 +243,6 @@ func (p Params) Validate() error { if err := isPositive(p.ReinvestInterval); err != nil { return err } - if err := isThreshold(p.ValidatorRebalancingThreshold); err != nil { - return err - } if err := isPositive(p.IcaTimeoutNanos); err != nil { return err } diff --git a/x/stakeibc/types/params.pb.go b/x/stakeibc/types/params.pb.go index 1682f9a0b..61454fdba 100644 --- a/x/stakeibc/types/params.pb.go +++ b/x/stakeibc/types/params.pb.go @@ -27,28 +27,22 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // next id: 18 type Params struct { // define epoch lengths, in stride_epochs - RewardsInterval uint64 `protobuf:"varint,1,opt,name=rewards_interval,json=rewardsInterval,proto3" json:"rewards_interval,omitempty"` - DelegateInterval uint64 `protobuf:"varint,6,opt,name=delegate_interval,json=delegateInterval,proto3" json:"delegate_interval,omitempty"` - DepositInterval uint64 `protobuf:"varint,2,opt,name=deposit_interval,json=depositInterval,proto3" json:"deposit_interval,omitempty"` - RedemptionRateInterval uint64 `protobuf:"varint,3,opt,name=redemption_rate_interval,json=redemptionRateInterval,proto3" json:"redemption_rate_interval,omitempty"` - StrideCommission uint64 `protobuf:"varint,4,opt,name=stride_commission,json=strideCommission,proto3" json:"stride_commission,omitempty"` - // zone_com_address stores which addresses to - // send the Stride commission too, as well as what portion - // of the fee each address is entitled to - // TODO implement this - ZoneComAddress map[string]string `protobuf:"bytes,5,rep,name=zone_com_address,json=zoneComAddress,proto3" json:"zone_com_address,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ReinvestInterval uint64 `protobuf:"varint,7,opt,name=reinvest_interval,json=reinvestInterval,proto3" json:"reinvest_interval,omitempty"` - ValidatorRebalancingThreshold uint64 `protobuf:"varint,8,opt,name=validator_rebalancing_threshold,json=validatorRebalancingThreshold,proto3" json:"validator_rebalancing_threshold,omitempty"` - IcaTimeoutNanos uint64 `protobuf:"varint,9,opt,name=ica_timeout_nanos,json=icaTimeoutNanos,proto3" json:"ica_timeout_nanos,omitempty"` - BufferSize uint64 `protobuf:"varint,10,opt,name=buffer_size,json=bufferSize,proto3" json:"buffer_size,omitempty"` - IbcTimeoutBlocks uint64 `protobuf:"varint,11,opt,name=ibc_timeout_blocks,json=ibcTimeoutBlocks,proto3" json:"ibc_timeout_blocks,omitempty"` - FeeTransferTimeoutNanos uint64 `protobuf:"varint,12,opt,name=fee_transfer_timeout_nanos,json=feeTransferTimeoutNanos,proto3" json:"fee_transfer_timeout_nanos,omitempty"` - MaxStakeIcaCallsPerEpoch uint64 `protobuf:"varint,13,opt,name=max_stake_ica_calls_per_epoch,json=maxStakeIcaCallsPerEpoch,proto3" json:"max_stake_ica_calls_per_epoch,omitempty"` - DefaultMinRedemptionRateThreshold uint64 `protobuf:"varint,14,opt,name=default_min_redemption_rate_threshold,json=defaultMinRedemptionRateThreshold,proto3" json:"default_min_redemption_rate_threshold,omitempty"` - DefaultMaxRedemptionRateThreshold uint64 `protobuf:"varint,15,opt,name=default_max_redemption_rate_threshold,json=defaultMaxRedemptionRateThreshold,proto3" json:"default_max_redemption_rate_threshold,omitempty"` - IbcTransferTimeoutNanos uint64 `protobuf:"varint,16,opt,name=ibc_transfer_timeout_nanos,json=ibcTransferTimeoutNanos,proto3" json:"ibc_transfer_timeout_nanos,omitempty"` - SafetyNumValidators uint64 `protobuf:"varint,17,opt,name=safety_num_validators,json=safetyNumValidators,proto3" json:"safety_num_validators,omitempty"` - SafetyMaxSlashPercent uint64 `protobuf:"varint,18,opt,name=safety_max_slash_percent,json=safetyMaxSlashPercent,proto3" json:"safety_max_slash_percent,omitempty"` + RewardsInterval uint64 `protobuf:"varint,1,opt,name=rewards_interval,json=rewardsInterval,proto3" json:"rewards_interval,omitempty"` + DelegateInterval uint64 `protobuf:"varint,6,opt,name=delegate_interval,json=delegateInterval,proto3" json:"delegate_interval,omitempty"` + DepositInterval uint64 `protobuf:"varint,2,opt,name=deposit_interval,json=depositInterval,proto3" json:"deposit_interval,omitempty"` + RedemptionRateInterval uint64 `protobuf:"varint,3,opt,name=redemption_rate_interval,json=redemptionRateInterval,proto3" json:"redemption_rate_interval,omitempty"` + StrideCommission uint64 `protobuf:"varint,4,opt,name=stride_commission,json=strideCommission,proto3" json:"stride_commission,omitempty"` + ReinvestInterval uint64 `protobuf:"varint,7,opt,name=reinvest_interval,json=reinvestInterval,proto3" json:"reinvest_interval,omitempty"` + IcaTimeoutNanos uint64 `protobuf:"varint,9,opt,name=ica_timeout_nanos,json=icaTimeoutNanos,proto3" json:"ica_timeout_nanos,omitempty"` + BufferSize uint64 `protobuf:"varint,10,opt,name=buffer_size,json=bufferSize,proto3" json:"buffer_size,omitempty"` + IbcTimeoutBlocks uint64 `protobuf:"varint,11,opt,name=ibc_timeout_blocks,json=ibcTimeoutBlocks,proto3" json:"ibc_timeout_blocks,omitempty"` + FeeTransferTimeoutNanos uint64 `protobuf:"varint,12,opt,name=fee_transfer_timeout_nanos,json=feeTransferTimeoutNanos,proto3" json:"fee_transfer_timeout_nanos,omitempty"` + MaxStakeIcaCallsPerEpoch uint64 `protobuf:"varint,13,opt,name=max_stake_ica_calls_per_epoch,json=maxStakeIcaCallsPerEpoch,proto3" json:"max_stake_ica_calls_per_epoch,omitempty"` + DefaultMinRedemptionRateThreshold uint64 `protobuf:"varint,14,opt,name=default_min_redemption_rate_threshold,json=defaultMinRedemptionRateThreshold,proto3" json:"default_min_redemption_rate_threshold,omitempty"` + DefaultMaxRedemptionRateThreshold uint64 `protobuf:"varint,15,opt,name=default_max_redemption_rate_threshold,json=defaultMaxRedemptionRateThreshold,proto3" json:"default_max_redemption_rate_threshold,omitempty"` + IbcTransferTimeoutNanos uint64 `protobuf:"varint,16,opt,name=ibc_transfer_timeout_nanos,json=ibcTransferTimeoutNanos,proto3" json:"ibc_transfer_timeout_nanos,omitempty"` + SafetyNumValidators uint64 `protobuf:"varint,17,opt,name=safety_num_validators,json=safetyNumValidators,proto3" json:"safety_num_validators,omitempty"` + SafetyMaxSlashPercent uint64 `protobuf:"varint,18,opt,name=safety_max_slash_percent,json=safetyMaxSlashPercent,proto3" json:"safety_max_slash_percent,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -118,13 +112,6 @@ func (m *Params) GetStrideCommission() uint64 { return 0 } -func (m *Params) GetZoneComAddress() map[string]string { - if m != nil { - return m.ZoneComAddress - } - return nil -} - func (m *Params) GetReinvestInterval() uint64 { if m != nil { return m.ReinvestInterval @@ -132,13 +119,6 @@ func (m *Params) GetReinvestInterval() uint64 { return 0 } -func (m *Params) GetValidatorRebalancingThreshold() uint64 { - if m != nil { - return m.ValidatorRebalancingThreshold - } - return 0 -} - func (m *Params) GetIcaTimeoutNanos() uint64 { if m != nil { return m.IcaTimeoutNanos @@ -211,55 +191,48 @@ func (m *Params) GetSafetyMaxSlashPercent() uint64 { func init() { proto.RegisterType((*Params)(nil), "stride.stakeibc.Params") - proto.RegisterMapType((map[string]string)(nil), "stride.stakeibc.Params.ZoneComAddressEntry") } func init() { proto.RegisterFile("stride/stakeibc/params.proto", fileDescriptor_5aeaab6a38c2b438) } var fileDescriptor_5aeaab6a38c2b438 = []byte{ - // 666 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0x4f, 0x4f, 0xdb, 0x3c, - 0x18, 0x6f, 0xf9, 0xf7, 0x82, 0x79, 0x5f, 0x68, 0x0d, 0xef, 0x16, 0x55, 0xa3, 0xb0, 0x49, 0x93, - 0x60, 0x6c, 0xad, 0xc6, 0x0e, 0x20, 0x38, 0x4c, 0x80, 0x98, 0x84, 0x36, 0x50, 0x95, 0xb2, 0x1d, - 0xb8, 0x58, 0x4e, 0xf2, 0xb4, 0xb5, 0x48, 0xec, 0xc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, 0x6d, 0xbd, - 0x74, 0x7d, 0x5b, 0x2f, 0xfd, 0xbc, 0xad, 0x97, 0x2e, 0x5f, 0x77, 0x99, 0xee, 0x25, 0x5e, 0xc3, - 0x17, 0x51, 0xb3, 0x6d, 0x5e, 0xd9, 0xab, 0x0f, 0xd4, 0x53, 0xcd, 0x6c, 0x8d, 0xf5, 0x77, 0x9b, - 0x83, 0x62, 0x97, 0xe9, 0x61, 0x0c, 0xca, 0x9b, 0x33, 0x4b, 0xea, 0xcd, 0xef, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xdf, 0x22, 0xed, 0xc0, 0xeb, 0x04, 0x00, 0x00, + // 567 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0xcf, 0x6e, 0xd3, 0x4c, + 0x14, 0xc5, 0x93, 0xef, 0x8b, 0x42, 0x3b, 0x05, 0x9a, 0x98, 0x7f, 0xa3, 0x08, 0x5c, 0x40, 0x42, + 0xa2, 0x14, 0x62, 0x01, 0x8b, 0x22, 0xba, 0x40, 0x6a, 0xc5, 0xa2, 0x40, 0xab, 0x28, 0x89, 0x58, + 0xb0, 0x19, 0x8d, 0xc7, 0xd7, 0xc9, 0xa8, 0xb6, 0xc7, 0x9a, 0x19, 0x07, 0xb7, 0x4f, 0xc1, 0x92, + 0x25, 0x8f, 0xc3, 0xb2, 0x4b, 0x96, 0x28, 0x79, 0x03, 0x9e, 0x00, 0x79, 0xc6, 0x71, 0x6a, 0x54, + 0xd8, 0x45, 0xe7, 0xfc, 0xee, 0xf1, 0x9d, 0x33, 0x19, 0x74, 0x57, 0x69, 0xc9, 0x03, 0xf0, 0x94, + 0xa6, 0x27, 0xc0, 0x7d, 0xe6, 0xa5, 0x54, 0xd2, 0x58, 0xf5, 0x53, 0x29, 0xb4, 0x70, 0x36, 0xad, + 0xdb, 0x5f, 0xba, 0xbd, 0x9b, 0x13, 0x31, 0x11, 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, 0xd5, 0x78, 0xd7, 0x5a, 0x5b, 0xeb, 0xac, 0xef, 0xbf, + 0xff, 0x3e, 0x77, 0x9b, 0xe7, 0x73, 0xb7, 0xf9, 0x73, 0xee, 0x36, 0xbf, 0x2c, 0xdc, 0xc6, 0xf9, + 0xc2, 0x6d, 0xfc, 0x58, 0xb8, 0x8d, 0x4f, 0xcf, 0x27, 0x5c, 0x4f, 0x33, 0xbf, 0xcf, 0x44, 0xec, + 0x8d, 0xcc, 0xdf, 0xf6, 0xd9, 0x07, 0xea, 0x2b, 0xaf, 0x7c, 0xea, 0xb3, 0x5d, 0x2f, 0x5f, 0xbd, + 0x77, 0x7d, 0x9a, 0x82, 0xf2, 0xdb, 0xe6, 0x21, 0xbf, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x0b, + 0x71, 0xa5, 0xbd, 0x0f, 0x04, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -338,11 +311,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x48 } - if m.ValidatorRebalancingThreshold != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.ValidatorRebalancingThreshold)) - i-- - dAtA[i] = 0x40 - } if m.ReinvestInterval != 0 { i = encodeVarintParams(dAtA, i, uint64(m.ReinvestInterval)) i-- @@ -353,25 +321,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - if len(m.ZoneComAddress) > 0 { - for k := range m.ZoneComAddress { - v := m.ZoneComAddress[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintParams(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintParams(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintParams(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } if m.StrideCommission != 0 { i = encodeVarintParams(dAtA, i, uint64(m.StrideCommission)) i-- @@ -424,23 +373,12 @@ func (m *Params) Size() (n int) { if m.StrideCommission != 0 { n += 1 + sovParams(uint64(m.StrideCommission)) } - if len(m.ZoneComAddress) > 0 { - for k, v := range m.ZoneComAddress { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovParams(uint64(len(k))) + 1 + len(v) + sovParams(uint64(len(v))) - n += mapEntrySize + 1 + sovParams(uint64(mapEntrySize)) - } - } if m.DelegateInterval != 0 { n += 1 + sovParams(uint64(m.DelegateInterval)) } if m.ReinvestInterval != 0 { n += 1 + sovParams(uint64(m.ReinvestInterval)) } - if m.ValidatorRebalancingThreshold != 0 { - n += 1 + sovParams(uint64(m.ValidatorRebalancingThreshold)) - } if m.IcaTimeoutNanos != 0 { n += 1 + sovParams(uint64(m.IcaTimeoutNanos)) } @@ -585,133 +523,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ZoneComAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ZoneComAddress == nil { - m.ZoneComAddress = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthParams - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthParams - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthParams - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthParams - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ZoneComAddress[mapkey] = mapvalue - iNdEx = postIndex case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DelegateInterval", wireType) @@ -750,25 +561,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorRebalancingThreshold", wireType) - } - m.ValidatorRebalancingThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidatorRebalancingThreshold |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IcaTimeoutNanos", wireType)