diff --git a/proto/stride/stakeibc/callbacks.proto b/proto/stride/stakeibc/callbacks.proto index ee94fcd2c7..14389226a3 100644 --- a/proto/stride/stakeibc/callbacks.proto +++ b/proto/stride/stakeibc/callbacks.proto @@ -43,14 +43,6 @@ message UndelegateCallback { repeated uint64 epoch_unbonding_record_ids = 3; } -message UndelegateHostCallback { - string amt = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - repeated SplitDelegation split_delegations = 2; -} - message RedemptionCallback { string host_zone_id = 1; repeated uint64 epoch_unbonding_record_ids = 2; diff --git a/proto/stride/stakeibc/tx.proto b/proto/stride/stakeibc/tx.proto index e3a0d795e4..93abbd8209 100644 --- a/proto/stride/stakeibc/tx.proto +++ b/proto/stride/stakeibc/tx.proto @@ -32,7 +32,6 @@ service Msg { rpc CalibrateDelegation(MsgCalibrateDelegation) returns (MsgCalibrateDelegationResponse); rpc ClearBalance(MsgClearBalance) returns (MsgClearBalanceResponse); - rpc UndelegateHost(MsgUndelegateHost) returns (MsgUndelegateHostResponse); rpc UpdateInnerRedemptionRateBounds(MsgUpdateInnerRedemptionRateBounds) returns (MsgUpdateInnerRedemptionRateBoundsResponse); rpc ResumeHostZone(MsgResumeHostZone) returns (MsgResumeHostZoneResponse); @@ -189,15 +188,6 @@ message MsgUpdateValidatorSharesExchRate { } message MsgUpdateValidatorSharesExchRateResponse {} -message MsgUndelegateHost { - string creator = 1; - string amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} -message MsgUndelegateHostResponse {} - message MsgCalibrateDelegation { string creator = 1; string chain_id = 2; diff --git a/x/stakeibc/client/cli/tx.go b/x/stakeibc/client/cli/tx.go index d821f06a5a..ef0721206b 100644 --- a/x/stakeibc/client/cli/tx.go +++ b/x/stakeibc/client/cli/tx.go @@ -37,7 +37,6 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand(CmdUpdateValidatorSharesExchRate()) cmd.AddCommand(CmdCalibrateDelegation()) cmd.AddCommand(CmdClearBalance()) - cmd.AddCommand(CmdUndelegateHost()) cmd.AddCommand(CmdUpdateInnerRedemptionRateBounds()) cmd.AddCommand(CmdResumeHostZone()) diff --git a/x/stakeibc/client/cli/tx_undelegate_host.go b/x/stakeibc/client/cli/tx_undelegate_host.go deleted file mode 100644 index ca528c131a..0000000000 --- a/x/stakeibc/client/cli/tx_undelegate_host.go +++ /dev/null @@ -1,49 +0,0 @@ -package cli - -import ( - "strconv" - - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/spf13/cobra" - - "github.com/Stride-Labs/stride/v16/x/stakeibc/types" -) - -var _ = strconv.Itoa(0) - -func CmdUndelegateHost() *cobra.Command { - cmd := &cobra.Command{ - Use: "undelegate-host [amount]", - Short: "Broadcast message undelegate-host", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argAmount, found := sdk.NewIntFromString(args[0]) - if !found { - return errorsmod.Wrap(sdkerrors.ErrInvalidType, "can not convert string to int") - } - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgUndelegateHost( - clientCtx.GetFromAddress().String(), - argAmount, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/handler.go b/x/stakeibc/handler.go index 46ab96a0af..84c68778e9 100644 --- a/x/stakeibc/handler.go +++ b/x/stakeibc/handler.go @@ -58,9 +58,6 @@ func NewMessageHandler(k keeper.Keeper) sdk.Handler { case *types.MsgUpdateValidatorSharesExchRate: res, err := msgServer.UpdateValidatorSharesExchRate(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgUndelegateHost: - res, err := msgServer.UndelegateHost(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) case *types.MsgCalibrateDelegation: res, err := msgServer.CalibrateDelegation(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) diff --git a/x/stakeibc/keeper/grpc_query_host_zone_test.go b/x/stakeibc/keeper/grpc_query_host_zone_test.go index 7e24d0c2bc..17381c1aad 100644 --- a/x/stakeibc/keeper/grpc_query_host_zone_test.go +++ b/x/stakeibc/keeper/grpc_query_host_zone_test.go @@ -20,9 +20,6 @@ func TestHostZoneQuerySingle(t *testing.T) { keeper, ctx := keepertest.StakeibcKeeper(t) wctx := sdk.WrapSDKContext(ctx) msgs := createNHostZone(keeper, ctx, 2) - for _, msg := range msgs { - t.Log(msg.ChainId) - } for _, tc := range []struct { desc string request *types.QueryGetHostZoneRequest diff --git a/x/stakeibc/keeper/icacallbacks.go b/x/stakeibc/keeper/icacallbacks.go index 6979707216..392e191c97 100644 --- a/x/stakeibc/keeper/icacallbacks.go +++ b/x/stakeibc/keeper/icacallbacks.go @@ -5,14 +5,13 @@ import ( ) const ( - ICACallbackID_Delegate = "delegate" - ICACallbackID_Claim = "claim" - ICACallbackID_Undelegate = "undelegate" - ICACallbackID_UndelegateHost = "undelegatehost" - ICACallbackID_Reinvest = "reinvest" - ICACallbackID_Redemption = "redemption" - ICACallbackID_Rebalance = "rebalance" - ICACallbackID_Detokenize = "detokenize" + ICACallbackID_Delegate = "delegate" + ICACallbackID_Claim = "claim" + ICACallbackID_Undelegate = "undelegate" + ICACallbackID_Reinvest = "reinvest" + ICACallbackID_Redemption = "redemption" + ICACallbackID_Rebalance = "rebalance" + ICACallbackID_Detokenize = "detokenize" ) func (k Keeper) Callbacks() icacallbackstypes.ModuleCallbacks { @@ -20,7 +19,6 @@ func (k Keeper) Callbacks() icacallbackstypes.ModuleCallbacks { {CallbackId: ICACallbackID_Delegate, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.DelegateCallback)}, {CallbackId: ICACallbackID_Claim, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.ClaimCallback)}, {CallbackId: ICACallbackID_Undelegate, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.UndelegateCallback)}, - {CallbackId: ICACallbackID_UndelegateHost, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.UndelegateHostCallback)}, {CallbackId: ICACallbackID_Reinvest, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.ReinvestCallback)}, {CallbackId: ICACallbackID_Redemption, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.RedemptionCallback)}, {CallbackId: ICACallbackID_Rebalance, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.RebalanceCallback)}, diff --git a/x/stakeibc/keeper/icacallbacks_undelegate.go b/x/stakeibc/keeper/icacallbacks_undelegate.go index 62b0f75fe2..a03da4c86c 100644 --- a/x/stakeibc/keeper/icacallbacks_undelegate.go +++ b/x/stakeibc/keeper/icacallbacks_undelegate.go @@ -1,7 +1,6 @@ package keeper import ( - "errors" "fmt" "time" @@ -227,86 +226,3 @@ func (k Keeper) BurnTokens(ctx sdk.Context, hostZone types.HostZone, stTokenBurn k.Logger(ctx).Info(fmt.Sprintf("Total supply %s", k.bankKeeper.GetSupply(ctx, stCoinDenom))) return nil } - -// ICA Callback after undelegating host -// -// If successful: -// * sets SetUndelegateHostPrevented -// If timeout: -// * Does nothing -// If failure: -// * Does nothing -func (k Keeper) UndelegateHostCallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *icacallbackstypes.AcknowledgementResponse, args []byte) error { - // Fetch callback args - var undelegateHostCallback types.UndelegateHostCallback - if err := proto.Unmarshal(args, &undelegateHostCallback); err != nil { - return errorsmod.Wrapf(types.ErrUnmarshalFailure, fmt.Sprintf("Unable to unmarshal undelegate host callback args: %s", err.Error())) - } - k.Logger(ctx).Info("Starting undelegate host callback for amount %v%s", undelegateHostCallback.Amt) - - // Regardless of failure/success/timeout, indicate that this ICA has completed - hostZone, found := k.GetHostZone(ctx, EvmosHostZoneChainId) - if !found { - return errorsmod.Wrapf(sdkerrors.ErrKeyNotFound, "Host zone not found: %s", EvmosHostZoneChainId) - } - for _, splitDelegation := range undelegateHostCallback.SplitDelegations { - if err := k.DecrementValidatorDelegationChangesInProgress(&hostZone, splitDelegation.Validator); err != nil { - // TODO: Revert after v14 upgrade - if errors.Is(err, types.ErrInvalidValidatorDelegationUpdates) { - k.Logger(ctx).Error(utils.LogICACallbackWithHostZone(EvmosHostZoneChainId, ICACallbackID_Undelegate, - "Invariant failed - delegation changes in progress fell below 0 for %s", splitDelegation.Validator)) - continue - } - return err - } - } - k.SetHostZone(ctx, hostZone) - - // Check for timeout (ack nil) - if ackResponse.Status == icacallbackstypes.AckResponseStatus_TIMEOUT { - k.Logger(ctx).Error("UndelegateHostCallback Timeout:", icacallbackstypes.AckResponseStatus_TIMEOUT, packet) - return nil - } - - // Check for a failed transaction (ack error) - if ackResponse.Status == icacallbackstypes.AckResponseStatus_FAILURE { - k.Logger(ctx).Error("UndelegateHostCallback failure (ack error):", icacallbackstypes.AckResponseStatus_FAILURE, packet) - return nil - } - - // Get the host zone - evmosHost, found := k.GetHostZone(ctx, EvmosHostZoneChainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "host zone %s not found", EvmosHostZoneChainId) - } - - k.Logger(ctx).Info("UndelegateHostCallback success:", icacallbackstypes.AckResponseStatus_SUCCESS, packet) - - // Update delegation balances - err := k.UpdateDelegationBalancesHost(ctx, evmosHost, undelegateHostCallback) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UndelegateCallback | %s", err.Error())) - return err - } - - k.Logger(ctx).Info("UndelegateHostCallback: SetUndelegateHostPrevented") - if err := k.SetUndelegateHostPrevented(ctx); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UndelegateHostCallback failed due to SetUndelegateHostPrevented | %s", err.Error())) - return err - } - - return nil -} - -// Decrement the delegation field on host and each validator's delegations after a successful unbonding ICA -func (k Keeper) UpdateDelegationBalancesHost(ctx sdk.Context, hostZone types.HostZone, undelegateHostCallback types.UndelegateHostCallback) error { - // Undelegate from each validator and update Evmos staked balance, if successful - for _, undelegation := range undelegateHostCallback.SplitDelegations { - err := k.AddDelegationToValidator(ctx, &hostZone, undelegation.Validator, undelegation.Amount.Neg(), ICACallbackID_UndelegateHost) - if err != nil { - return err - } - } - k.SetHostZone(ctx, hostZone) - return nil -} diff --git a/x/stakeibc/keeper/icacallbacks_undelegate_test.go b/x/stakeibc/keeper/icacallbacks_undelegate_test.go index 38a5a1f3cc..a413c56cdd 100644 --- a/x/stakeibc/keeper/icacallbacks_undelegate_test.go +++ b/x/stakeibc/keeper/icacallbacks_undelegate_test.go @@ -12,7 +12,6 @@ import ( icacallbacktypes "github.com/Stride-Labs/stride/v16/x/icacallbacks/types" recordtypes "github.com/Stride-Labs/stride/v16/x/records/types" - stakeibckeeper "github.com/Stride-Labs/stride/v16/x/stakeibc/keeper" "github.com/Stride-Labs/stride/v16/x/stakeibc/types" ) @@ -26,16 +25,6 @@ type UndelegateCallbackState struct { zoneAccountBalance sdkmath.Int } -type UndelegateCallbackHostState struct { - totalDelegations sdkmath.Int - val1Bal sdkmath.Int - val2Bal sdkmath.Int - epochNumber uint64 - completionTime time.Time - callbackArgs types.UndelegateHostCallback - zoneAccountBalance sdkmath.Int -} - type UndelegateCallbackArgs struct { packet channeltypes.Packet ackResponse *icacallbacktypes.AcknowledgementResponse @@ -50,14 +39,6 @@ type UndelegateCallbackTestCase struct { balanceToUnstake sdkmath.Int } -type UndelegateCallbackHostTestCase struct { - initialState UndelegateCallbackHostState - validArgs UndelegateCallbackArgs - val1UndelegationAmount sdkmath.Int - val2UndelegationAmount sdkmath.Int - balanceToUnstake sdkmath.Int -} - func (s *KeeperTestSuite) SetupUndelegateCallback() UndelegateCallbackTestCase { // Set up host zone and validator state totalDelegations := sdkmath.NewInt(1_000_000) @@ -161,108 +142,6 @@ func (s *KeeperTestSuite) SetupUndelegateCallback() UndelegateCallbackTestCase { } } -func (s *KeeperTestSuite) SetupUndelegateHostCallback() UndelegateCallbackHostTestCase { - // Set up host zone and validator state - totalDelegations := sdkmath.NewInt(1_000_000) - val1Bal := sdkmath.NewInt(400_000) - val2Bal := totalDelegations.Sub(val1Bal) - balanceToUnstake := sdkmath.NewInt(300_000) - val1UndelegationAmount := sdkmath.NewInt(120_000) - val2UndelegationAmount := balanceToUnstake.Sub(val1UndelegationAmount) - epochNumber := uint64(1) - val1 := types.Validator{ - Name: "val1", - Address: "val1_address", - Delegation: val1Bal, - DelegationChangesInProgress: 1, - } - val2 := types.Validator{ - Name: "val2", - Address: "val2_address", - Delegation: val2Bal, - DelegationChangesInProgress: 1, - } - depositAddress := types.NewHostZoneDepositAddress(stakeibckeeper.EvmosHostZoneChainId) - zoneAccountBalance := balanceToUnstake.Add(sdkmath.NewInt(10)) - zoneAccount := Account{ - acc: depositAddress, - stAtomBalance: sdk.NewCoin(StAtom, zoneAccountBalance), // Add a few extra tokens to make the test more robust - } - hostZone := types.HostZone{ - ChainId: stakeibckeeper.EvmosHostZoneChainId, - HostDenom: Atom, - IbcDenom: IbcAtom, - RedemptionRate: sdk.NewDec(1.0), - Validators: []*types.Validator{&val1, &val2}, - TotalDelegations: totalDelegations, - DepositAddress: depositAddress.String(), - } - s.App.StakeibcKeeper.SetHostZone(s.Ctx, hostZone) - - // Set up EpochUnbondingRecord, HostZoneUnbonding and token state - hostZoneUnbonding := recordtypes.HostZoneUnbonding{ - HostZoneId: stakeibckeeper.EvmosHostZoneChainId, - Status: recordtypes.HostZoneUnbonding_UNBONDING_QUEUE, - StTokenAmount: balanceToUnstake, - } - epochUnbondingRecord := recordtypes.EpochUnbondingRecord{ - EpochNumber: epochNumber, - HostZoneUnbondings: []*recordtypes.HostZoneUnbonding{&hostZoneUnbonding}, - } - s.App.RecordsKeeper.SetEpochUnbondingRecord(s.Ctx, epochUnbondingRecord) - - // mint stTokens to the zone account, to be burned - s.FundAccount(zoneAccount.acc, zoneAccount.stAtomBalance) - - // Mock ack response - packet := channeltypes.Packet{} - completionTime := time.Now() - msgsUndelegateResponse := &stakingtypes.MsgUndelegateResponse{CompletionTime: completionTime} - msgsUndelegateResponseBz, err := proto.Marshal(msgsUndelegateResponse) - s.Require().NoError(err, "no error expected when marshalling undelegate response") - - ackResponse := icacallbacktypes.AcknowledgementResponse{ - Status: icacallbacktypes.AckResponseStatus_SUCCESS, - MsgResponses: [][]byte{msgsUndelegateResponseBz}, - } - - // Mock callback args - val1SplitDelegation := types.SplitDelegation{ - Validator: val1.Address, - Amount: val1UndelegationAmount, - } - val2SplitDelegation := types.SplitDelegation{ - Validator: val2.Address, - Amount: val2UndelegationAmount, - } - callbackArgs := types.UndelegateHostCallback{ - Amt: balanceToUnstake, - SplitDelegations: []*types.SplitDelegation{&val1SplitDelegation, &val2SplitDelegation}, - } - callbackArgsBz, err := proto.Marshal(&callbackArgs) - s.Require().NoError(err, "callback args unmarshalled") - - return UndelegateCallbackHostTestCase{ - val1UndelegationAmount: val1UndelegationAmount, - val2UndelegationAmount: val2UndelegationAmount, - balanceToUnstake: balanceToUnstake, - initialState: UndelegateCallbackHostState{ - callbackArgs: callbackArgs, - totalDelegations: totalDelegations, - val1Bal: val1Bal, - val2Bal: val2Bal, - epochNumber: epochNumber, - completionTime: completionTime, - zoneAccountBalance: zoneAccountBalance, - }, - validArgs: UndelegateCallbackArgs{ - packet: packet, - ackResponse: &ackResponse, - args: callbackArgsBz, - }, - } -} - func (s *KeeperTestSuite) TestUndelegateCallback_Successful() { tc := s.SetupUndelegateCallback() initialState := tc.initialState @@ -578,110 +457,3 @@ func (s *KeeperTestSuite) TestBurnTokens_CouldNotSendCoinsFromAccountToModule() err := s.App.StakeibcKeeper.BurnTokens(s.Ctx, hostZone, sdkmath.NewInt(123456)) s.Require().EqualError(err, "could not send coins from account stride1755g4dkhpw73gz9h9nwhlcefc6sdf8kcmvcwrk4rxfrz8xpxxjms7savm8 to module stakeibc. err: spendable balance is smaller than 123456stcoinDNE: insufficient funds") } - -func (s *KeeperTestSuite) TestUndelegateCallbackHost_Successful() { - tc := s.SetupUndelegateHostCallback() - initialState := tc.initialState - validArgs := tc.validArgs - - // Ensure IsUndelegateHostPrevented(ctx) is not yet flipped - s.Require().False(s.App.StakeibcKeeper.IsUndelegateHostPrevented(s.Ctx)) - - // Callback - err := s.App.StakeibcKeeper.UndelegateHostCallback(s.Ctx, validArgs.packet, validArgs.ackResponse, validArgs.args) - s.Require().NoError(err, "undelegate host callback succeeds") - - // Check that total delegation has decreased on the host zone - hostZone, found := s.App.StakeibcKeeper.GetHostZone(s.Ctx, stakeibckeeper.EvmosHostZoneChainId) - s.Require().True(found) - s.Require().Equal(hostZone.TotalDelegations, initialState.totalDelegations.Sub(tc.balanceToUnstake), "total delegation has decreased on the host zone") - - // Check that Delegations on validators have decreased - s.Require().True(len(hostZone.Validators) == 2, "Expected 2 validators") - val1 := hostZone.Validators[0] - val2 := hostZone.Validators[1] - s.Require().Equal(initialState.val1Bal.Sub(tc.val1UndelegationAmount), val1.Delegation, "val1 delegation has decreased") - s.Require().Equal(initialState.val2Bal.Sub(tc.val2UndelegationAmount), val2.Delegation, "val2 delegation has decreased") - - // Check that the number of delegation changes in progress was reset to 0 - s.Require().Equal(0, int(val1.DelegationChangesInProgress), "val1 delegation changes in progress") - s.Require().Equal(0, int(val2.DelegationChangesInProgress), "val2 delegation changes in progress") - - // ensure UndelegateHostPrevented has been flipped to true - s.Require().True(s.App.StakeibcKeeper.IsUndelegateHostPrevented(s.Ctx)) -} - -func (s *KeeperTestSuite) checkStateIfUndelegateCallbackHostFailed(tc UndelegateCallbackHostTestCase) { - initialState := tc.initialState - - // Check that total delegation has NOT decreased on the host zone - hostZone, found := s.App.StakeibcKeeper.GetHostZone(s.Ctx, stakeibckeeper.EvmosHostZoneChainId) - s.Require().True(found, "host zone found") - s.Require().Equal(initialState.totalDelegations, hostZone.TotalDelegations, "total delegation has NOT decreased on the host zone") - - // Check that Delegations on validators have NOT decreased - s.Require().True(len(hostZone.Validators) == 2, "Expected 2 validators") - val1 := hostZone.Validators[0] - val2 := hostZone.Validators[1] - s.Require().Equal(initialState.val1Bal, val1.Delegation, "val1 delegation has NOT decreased") - s.Require().Equal(initialState.val2Bal, val2.Delegation, "val2 delegation has NOT decreased") - - // Check that the number of delegation changes in progress was reset - s.Require().Equal(0, int(val1.DelegationChangesInProgress), "val1 delegation changes in progress") - s.Require().Equal(0, int(val2.DelegationChangesInProgress), "val2 delegation changes in progress") - - // Check that the host zone unbonding records have not been updated - epochUnbondingRecord, found := s.App.RecordsKeeper.GetEpochUnbondingRecord(s.Ctx, initialState.epochNumber) - s.Require().True(found, "epoch unbonding record found") - s.Require().Equal(len(epochUnbondingRecord.HostZoneUnbondings), 1, "1 host zone unbonding found") - hzu := epochUnbondingRecord.HostZoneUnbondings[0] - s.Require().Equal(int64(hzu.UnbondingTime), int64(0), "completion time is NOT set on the hzu") - s.Require().Equal(hzu.Status, recordtypes.HostZoneUnbonding_UNBONDING_QUEUE, "hzu status is set to UNBONDING_QUEUE") - zoneAccount, err := sdk.AccAddressFromBech32(hostZone.DepositAddress) - s.Require().NoError(err, "zone account address is valid") - s.Require().Equal(initialState.zoneAccountBalance, s.App.BankKeeper.GetBalance(s.Ctx, zoneAccount, StAtom).Amount, "tokens are NOT burned") -} - -func (s *KeeperTestSuite) TestUndelegateCallbackHost_UndelegateCallbackTimeout() { - tc := s.SetupUndelegateHostCallback() - - // Update the ack response to indicate a timeout - invalidArgs := tc.validArgs - invalidArgs.ackResponse.Status = icacallbacktypes.AckResponseStatus_TIMEOUT - - err := s.App.StakeibcKeeper.UndelegateHostCallback(s.Ctx, invalidArgs.packet, invalidArgs.ackResponse, invalidArgs.args) - s.Require().NoError(err, "undelegate callback succeeds on timeout") - s.checkStateIfUndelegateCallbackHostFailed(tc) -} - -func (s *KeeperTestSuite) TestUndelegateCallbackHost_UndelegateCallbackErrorOnHost() { - tc := s.SetupUndelegateHostCallback() - - // an error ack means the tx failed on the host - invalidArgs := tc.validArgs - invalidArgs.ackResponse.Status = icacallbacktypes.AckResponseStatus_FAILURE - - err := s.App.StakeibcKeeper.UndelegateHostCallback(s.Ctx, invalidArgs.packet, invalidArgs.ackResponse, invalidArgs.args) - s.Require().NoError(err, "undelegate callback succeeds with error on host") - s.checkStateIfUndelegateCallbackHostFailed(tc) -} - -func (s *KeeperTestSuite) TestUndelegateCallbackHost_WrongCallbackArgs() { - tc := s.SetupUndelegateHostCallback() - - // random args should cause the callback to fail - invalidCallbackArgs := []byte("random bytes") - - err := s.App.StakeibcKeeper.UndelegateHostCallback(s.Ctx, tc.validArgs.packet, tc.validArgs.ackResponse, invalidCallbackArgs) - s.Require().EqualError(err, "Unable to unmarshal undelegate host callback args: unexpected EOF: unable to unmarshal data structure") -} - -func (s *KeeperTestSuite) TestUndelegateCallbackHost_HostNotFound() { - tc := s.SetupUndelegateHostCallback() - - // remove the host zone from the store to trigger a host not found error - s.App.StakeibcKeeper.RemoveHostZone(s.Ctx, stakeibckeeper.EvmosHostZoneChainId) - - err := s.App.StakeibcKeeper.UndelegateHostCallback(s.Ctx, tc.validArgs.packet, tc.validArgs.ackResponse, tc.validArgs.args) - s.Require().EqualError(err, "Host zone not found: evmos_9001-2: key not found") -} diff --git a/x/stakeibc/keeper/icqcallbacks_callibrate_delegation.go b/x/stakeibc/keeper/icqcallbacks_callibrate_delegation.go index 171b852ec4..660a8249b8 100644 --- a/x/stakeibc/keeper/icqcallbacks_callibrate_delegation.go +++ b/x/stakeibc/keeper/icqcallbacks_callibrate_delegation.go @@ -4,13 +4,15 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/gogoproto/proto" "github.com/Stride-Labs/stride/v16/utils" icqtypes "github.com/Stride-Labs/stride/v16/x/interchainquery/types" "github.com/Stride-Labs/stride/v16/x/stakeibc/types" ) +// CalibrationThreshold is the max amount of tokens by which a calibration can alter internal record keeping of delegations +var CalibrationThreshold = sdk.NewInt(5000) + // DelegatorSharesCallback is a callback handler for UpdateValidatorSharesExchRate queries. // // In an attempt to get the ICA's delegation amount on a given validator, we have to query: @@ -42,48 +44,12 @@ func CalibrateDelegationCallback(k Keeper, ctx sdk.Context, args []byte, query i k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Calibrate, "Query response - Delegator: %s, Validator: %s, Shares: %v", queriedDelegation.DelegatorAddress, queriedDelegation.ValidatorAddress, queriedDelegation.Shares)) - // Unmarshal the callback data containing the previous delegation to the validator (from the time the query was submitted) - var callbackData types.DelegatorSharesQueryCallback - if err := proto.Unmarshal(query.CallbackData, &callbackData); err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal delegator shares callback data") - } - // Grab the validator object from the hostZone using the address returned from the query validator, valIndex, found := GetValidatorFromAddress(hostZone.Validators, queriedDelegation.ValidatorAddress) if !found { return errorsmod.Wrapf(types.ErrValidatorNotFound, "no registered validator for address (%s)", queriedDelegation.ValidatorAddress) } - // Check if the ICQ overlapped a delegation, undelegation, or detokenization ICA - // that would have modfied the number of delegated tokens - prevInternalDelegation := callbackData.InitialValidatorDelegation - currInternalDelegation := validator.Delegation - icaOverlappedIcq, err := k.CheckDelegationChangedDuringQuery(ctx, validator, prevInternalDelegation, currInternalDelegation) - if err != nil { - return err - } - - // If the ICA/ICQ overlapped, submit a new query - if icaOverlappedIcq { - // Store the updated validator delegation amount - callbackDataBz, err := proto.Marshal(&types.DelegatorSharesQueryCallback{ - InitialValidatorDelegation: currInternalDelegation, - }) - if err != nil { - return errorsmod.Wrapf(err, "unable to marshal delegator shares callback data") - } - query.CallbackData = callbackDataBz - - if err := k.InterchainQueryKeeper.RetryICQRequest(ctx, query); err != nil { - return errorsmod.Wrapf(err, "unable to resubmit delegator shares query") - } - return nil - } - - // If there was no ICA/ICQ overlap, update the validator to indicate that the query - // is no longer in progress (which will unblock LSM liquid stakes to that validator) - validator.SlashQueryInProgress = false - // Calculate the number of tokens delegated (using the internal sharesToTokensRate) // note: truncateInt per https://github.com/cosmos/cosmos-sdk/blob/cb31043d35bad90c4daa923bb109f38fd092feda/x/staking/types/validator.go#L431 delegatedTokens := queriedDelegation.Shares.Mul(validator.SharesToTokensRate).TruncateInt() @@ -96,15 +62,23 @@ func CalibrateDelegationCallback(k Keeper, ctx sdk.Context, args []byte, query i return nil } + // if the delegation change is more than the calibration threshold constant, + // return nil so the query submission succeeds + // Note: There should be no stateful changes above this line delegationChange := validator.Delegation.Sub(delegatedTokens) + if delegationChange.Abs().GT(CalibrationThreshold) { + k.Logger(ctx).Error(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Calibrate, + "Delegation change is GT CalibrationThreshold, failing calibration callback")) + return nil + } validator.Delegation = validator.Delegation.Sub(delegationChange) hostZone.TotalDelegations = hostZone.TotalDelegations.Sub(delegationChange) - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Calibrate, - "Delegation updated to: %v", validator.Delegation)) - hostZone.Validators[valIndex] = &validator k.SetHostZone(ctx, hostZone) + k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Calibrate, + "Delegation updated to: %v", validator.Delegation)) + return nil } diff --git a/x/stakeibc/keeper/icqcallbacks_callibrate_delegation_test.go b/x/stakeibc/keeper/icqcallbacks_callibrate_delegation_test.go new file mode 100644 index 0000000000..18ae8a44f1 --- /dev/null +++ b/x/stakeibc/keeper/icqcallbacks_callibrate_delegation_test.go @@ -0,0 +1,153 @@ +package keeper_test + +import ( + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + + icqtypes "github.com/Stride-Labs/stride/v16/x/interchainquery/types" + "github.com/Stride-Labs/stride/v16/x/stakeibc/keeper" + "github.com/Stride-Labs/stride/v16/x/stakeibc/types" +) + +func (s *KeeperTestSuite) TestCalibrateDelegation_Success() { + queriedValIndex := 1 + initialTotalDelegations := sdkmath.NewInt(1_000_000) + + baseHostZone := types.HostZone{ + ChainId: HostChainId, + TotalDelegations: initialTotalDelegations, + Validators: []*types.Validator{ + {Address: "valoper1"}, // not queried + {Address: ValAddress}, // queried validator - will get overridden in each test case + }, + } + + testCases := []struct { + name string + currentDelegation sdkmath.Int + sharesInQueryResponse sdk.Dec + sharesToTokensRate sdk.Dec + expectedEndDelegation sdkmath.Int + }{ + { + // Current delegation: 10,000 tokens + // Query response: 13,334 shares * 0.75 sharesToTokens = 10,000 tokens (+0) + name: "delegation change of 0", + currentDelegation: sdkmath.NewInt(10_000), + sharesInQueryResponse: sdk.MustNewDecFromStr("13334"), + sharesToTokensRate: sdk.MustNewDecFromStr("0.75"), + expectedEndDelegation: sdkmath.NewInt(10_000), + }, + { + // Current delegation: 10,000 tokens + // Query response: 10,000 shares * 0.75 sharesToTokens = 7,500 tokens (-2,500) + name: "negative delegation change", + currentDelegation: sdkmath.NewInt(10_000), + sharesInQueryResponse: sdk.MustNewDecFromStr("10000"), + sharesToTokensRate: sdk.MustNewDecFromStr("0.75"), + expectedEndDelegation: sdkmath.NewInt(7_500), + }, + { + // Current delegation: 12,500 tokens + // Query response: 20,000 shares * 0.75 sharesToTokens = 15,000 tokens (+2,500) + name: "positive delegation change", + currentDelegation: sdkmath.NewInt(12_500), + sharesInQueryResponse: sdk.MustNewDecFromStr("20000"), + sharesToTokensRate: sdk.MustNewDecFromStr("0.75"), + expectedEndDelegation: sdkmath.NewInt(15_000), + }, + { + // Current delegation: 12,500 tokens + // Query response: 10,000 shares * 0.75 sharesToTokens = 7,500 tokens (-5,000) + name: "negative delegation change at threshold boundary", + currentDelegation: sdkmath.NewInt(12_500), + sharesInQueryResponse: sdk.MustNewDecFromStr("10000"), + sharesToTokensRate: sdk.MustNewDecFromStr("0.75"), + expectedEndDelegation: sdkmath.NewInt(7_500), + }, + { + // Current delegation: 10,000 tokens + // Query response: 20,000 shares * 0.75 sharesToTokens = 15,000 tokens (+5,000) + name: "positive delegation change at threshold boundary", + currentDelegation: sdkmath.NewInt(10_000), + sharesInQueryResponse: sdk.MustNewDecFromStr("20000"), + sharesToTokensRate: sdk.MustNewDecFromStr("0.75"), + expectedEndDelegation: sdkmath.NewInt(15_000), + }, + { + // Current delegation: 12,501 tokens + // Query response: 10,000 shares * 0.75 sharesToTokens = 7,500 tokens (-5,001) + name: "negative delegation change exceeds threshold", + currentDelegation: sdkmath.NewInt(12_501), + sharesInQueryResponse: sdk.MustNewDecFromStr("10000"), + sharesToTokensRate: sdk.MustNewDecFromStr("0.75"), + expectedEndDelegation: sdkmath.NewInt(12_501), // no change + }, + { + // Current delegation: 9,999 tokens + // Query response: 20,000 shares * 0.75 sharesToTokens = 15,000 tokens (+5,001) + name: "positive delegation change exceeds threshold", + currentDelegation: sdkmath.NewInt(9_999), + sharesInQueryResponse: sdk.MustNewDecFromStr("20000"), + sharesToTokensRate: sdk.MustNewDecFromStr("0.75"), + expectedEndDelegation: sdkmath.NewInt(9_999), // no change + }, + } + + for _, tc := range testCases { + // Define a host zone with the current parameters + hostZone := baseHostZone + hostZone.Validators[queriedValIndex] = &types.Validator{ + Address: ValAddress, + Delegation: tc.currentDelegation, + SharesToTokensRate: tc.sharesToTokensRate, + } + s.App.StakeibcKeeper.SetHostZone(s.Ctx, hostZone) + + // Mock out the query response and confirm the callback succeede + query := icqtypes.Query{ChainId: HostChainId} + queryResponse := s.CreateDelegatorSharesQueryResponse(ValAddress, tc.sharesInQueryResponse) + + err := keeper.CalibrateDelegationCallback(s.App.StakeibcKeeper, s.Ctx, queryResponse, query) + s.Require().NoError(err, "%s - no error expected during delegation callback", tc.name) + + // Fetch the updated host zone and validator + updatedHostZone, found := s.App.StakeibcKeeper.GetHostZone(s.Ctx, HostChainId) + s.Require().True(found, "%s - host zone should have been found", tc.name) + updatedValidator := updatedHostZone.Validators[queriedValIndex] + + // Confirm the delegation changes match expectations + expectedDelegationChange := tc.expectedEndDelegation.Sub(tc.currentDelegation) + expectedTotalDelegation := initialTotalDelegations.Add(expectedDelegationChange) + s.Require().Equal(tc.expectedEndDelegation.Int64(), updatedValidator.Delegation.Int64(), + "%s - validator delegation", tc.name) + s.Require().Equal(expectedTotalDelegation.Int64(), updatedHostZone.TotalDelegations.Int64(), + "%s - host zone total delegation", tc.name) + } +} + +func (s *KeeperTestSuite) TestCalibrateDelegation_Failure() { + s.App.StakeibcKeeper.SetHostZone(s.Ctx, types.HostZone{ + ChainId: HostChainId, + Validators: []*types.Validator{{Address: ValAddress}}, + }) + validQuery := icqtypes.Query{ChainId: HostChainId} + validQueryResponse := s.CreateDelegatorSharesQueryResponse(ValAddress, sdk.NewDec(1000)) + + // Atempt the callback with a missing host zone - it should fail + invalidQuery := validQuery + invalidQuery.ChainId = "" + err := keeper.CalibrateDelegationCallback(s.App.StakeibcKeeper, s.Ctx, validQueryResponse, invalidQuery) + s.Require().ErrorContains(err, "host zone not found") + + // Attempt the callback with an invalid query response - it should fail + invalidQueryResponse := []byte{1, 2, 3} + err = keeper.CalibrateDelegationCallback(s.App.StakeibcKeeper, s.Ctx, invalidQueryResponse, validQuery) + s.Require().ErrorContains(err, "unable to unmarshal delegator shares query response") + + // Attempt the callback with a non-existent validator address - it should fail + invalidQueryResponse = s.CreateDelegatorSharesQueryResponse("non-existent validator", sdk.NewDec(1000)) + err = keeper.CalibrateDelegationCallback(s.App.StakeibcKeeper, s.Ctx, invalidQueryResponse, validQuery) + s.Require().ErrorContains(err, "validator not found") +} diff --git a/x/stakeibc/keeper/icqcallbacks_delegator_shares_test.go b/x/stakeibc/keeper/icqcallbacks_delegator_shares_test.go index 7bb9efdb2e..02e96b2f93 100644 --- a/x/stakeibc/keeper/icqcallbacks_delegator_shares_test.go +++ b/x/stakeibc/keeper/icqcallbacks_delegator_shares_test.go @@ -375,3 +375,24 @@ func (s *KeeperTestSuite) TestDelegatorSharesCallback_PrecisionError() { expectedValDelegation := tc.hostZone.Validators[tc.valIndexQueried].Delegation.Add(precisionErrorTokens) s.Require().Equal(expectedValDelegation.Int64(), validator.Delegation.Int64(), "validator delegation amount") } + +func (s *KeeperTestSuite) TestCalibrateDelegationCallback_Successful() { + tc := s.SetupDelegatorSharesICQCallback() + + // Callback + err := keeper.CalibrateDelegationCallback(s.App.StakeibcKeeper, s.Ctx, tc.validArgs.callbackArgs, tc.validArgs.query) + s.Require().NoError(err, "calibrate delegation callback error") + + // Confirm the staked balance was decreased on the host + hostZone, found := s.App.StakeibcKeeper.GetHostZone(s.Ctx, HostChainId) + s.Require().True(found, "host zone found") + s.Require().Equal(tc.expectedSlashAmount.Int64(), tc.hostZone.TotalDelegations.Sub(hostZone.TotalDelegations).Int64(), "staked bal slash") + + // Confirm the validator's weight and delegation amount were not reduced + validator := hostZone.Validators[tc.valIndexQueried] + s.Require().NotEqual(tc.expectedWeight, validator.Weight, "validator weight") + s.Require().Equal(tc.expectedDelegationAmount.Int64(), validator.Delegation.Int64(), "validator delegation amount") + + // Confirm the validator query is still in progress (calibration callback does not set it false) + s.Require().True(validator.SlashQueryInProgress, "slash query in progress") +} diff --git a/x/stakeibc/keeper/msg_server_calibrate_delegation.go b/x/stakeibc/keeper/msg_server_calibrate_delegation.go index c4c965a7a7..013e49179c 100644 --- a/x/stakeibc/keeper/msg_server_calibrate_delegation.go +++ b/x/stakeibc/keeper/msg_server_calibrate_delegation.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "fmt" sdk "github.com/cosmos/cosmos-sdk/types" @@ -18,6 +19,7 @@ func (k msgServer) CalibrateDelegation(goCtx context.Context, msg *types.MsgCali } if err := k.SubmitCalibrationICQ(ctx, hostZone, msg.Valoper); err != nil { + k.Logger(ctx).Error(fmt.Sprintf("Error submitting ICQ for delegation, error : %s", err.Error())) return nil, err } diff --git a/x/stakeibc/keeper/msg_server_submit_tx.go b/x/stakeibc/keeper/msg_server_submit_tx.go index 51e02eaf7c..f1ed63cd0e 100644 --- a/x/stakeibc/keeper/msg_server_submit_tx.go +++ b/x/stakeibc/keeper/msg_server_submit_tx.go @@ -582,7 +582,9 @@ func (k Keeper) SubmitCalibrationICQ(ctx sdk.Context, hostZone types.HostZone, v if hostZone.DelegationIcaAddress == "" { return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no delegation address found for %s", hostZone.ChainId) } - validator, valIndex, found := GetValidatorFromAddress(hostZone.Validators, validatorAddress) + + // ensure the validator is in the set for this host + _, _, found := GetValidatorFromAddress(hostZone.Validators, validatorAddress) if !found { return errorsmod.Wrapf(types.ErrValidatorNotFound, "no registered validator for address (%s)", validatorAddress) } @@ -598,21 +600,6 @@ func (k Keeper) SubmitCalibrationICQ(ctx sdk.Context, hostZone types.HostZone, v } queryData := stakingtypes.GetDelegationKey(delegatorAddressBz, validatorAddressBz) - // Store the current validator's delegation in the callback data so we can determine if it changed - // while the query was in flight - callbackData := types.DelegatorSharesQueryCallback{ - InitialValidatorDelegation: validator.Delegation, - } - callbackDataBz, err := proto.Marshal(&callbackData) - if err != nil { - return errorsmod.Wrapf(err, "unable to marshal delegator shares callback data") - } - - // Update the validator to indicate that the slash query is in progress - validator.SlashQueryInProgress = true - hostZone.Validators[valIndex] = &validator - k.SetHostZone(ctx, hostZone) - // Submit delegator shares ICQ query := icqtypes.Query{ ChainId: hostZone.ChainId, @@ -621,12 +608,11 @@ func (k Keeper) SubmitCalibrationICQ(ctx sdk.Context, hostZone types.HostZone, v RequestData: queryData, CallbackModule: types.ModuleName, CallbackId: ICQCallbackID_Calibrate, - CallbackData: callbackDataBz, + CallbackData: []byte{}, TimeoutDuration: time.Hour, TimeoutPolicy: icqtypes.TimeoutPolicy_RETRY_QUERY_REQUEST, } if err := k.InterchainQueryKeeper.SubmitICQRequest(ctx, query, false); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error submitting ICQ for delegation, error : %s", err.Error())) return err } diff --git a/x/stakeibc/keeper/msg_undelegate_host.go b/x/stakeibc/keeper/msg_undelegate_host.go deleted file mode 100644 index 701df21e46..0000000000 --- a/x/stakeibc/keeper/msg_undelegate_host.go +++ /dev/null @@ -1,53 +0,0 @@ -package keeper - -import ( - "context" - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/Stride-Labs/stride/v16/x/stakeibc/types" -) - -const isUndelegateHostPreventedKey = "is-undelegate-host-prevented" - -func (k msgServer) UndelegateHost(goCtx context.Context, msg *types.MsgUndelegateHost) (*types.MsgUndelegateHostResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // undelegateHost is callable only if it has not yet been called and succeeded - if k.IsUndelegateHostPrevented(ctx) { - return nil, errorsmod.Wrapf(types.ErrUndelegateHostNotCallable, "") - } - - // Get host zone unbonding message by summing up the unbonding records - if err := k.UndelegateHostEvmos(ctx, msg.Amount); err != nil { - return nil, fmt.Errorf("Error initiating host zone unbondings for UndelegateHostEvmos %s", err.Error()) - } - - // log: issuing an undelegation to Evmos - k.Logger(ctx).Info("Issuing an undelegation to Evmos") - - return &types.MsgUndelegateHostResponse{}, nil -} - -func (k Keeper) SetUndelegateHostPrevented(ctx sdk.Context) error { - - store := ctx.KVStore(k.storeKey) - - // set the key to 1 if it's not set - if !k.IsUndelegateHostPrevented(ctx) { - store.Set([]byte(isUndelegateHostPreventedKey), []byte{1}) - } - return nil -} - -func (k Keeper) IsUndelegateHostPrevented(ctx sdk.Context) bool { - store := ctx.KVStore(k.storeKey) - if !store.Has([]byte(isUndelegateHostPreventedKey)) { - return false - } - - value := store.Get([]byte(isUndelegateHostPreventedKey)) - return len(value) == 1 && value[0] == 1 -} diff --git a/x/stakeibc/keeper/msg_undelegate_host_test.go b/x/stakeibc/keeper/msg_undelegate_host_test.go deleted file mode 100644 index 3642c96f64..0000000000 --- a/x/stakeibc/keeper/msg_undelegate_host_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package keeper_test - -import ( - _ "github.com/stretchr/testify/suite" -) - -func (s *KeeperTestSuite) TestEnableStrictUnbondingCap_CapNotSet() { - - // make sure StrictUnbondingCap is not set - s.Require().False(s.App.StakeibcKeeper.IsUndelegateHostPrevented(s.Ctx), "undelegate host prevented") -} - -func (s *KeeperTestSuite) TestEnableStrictUnbondingCap_CapSet() { - - // set undelegate Prevented - err := s.App.StakeibcKeeper.SetUndelegateHostPrevented(s.Ctx) - s.Require().NoError(err, "set undelegate host prevented") - - // make sure StrictUnbondingCap is set - s.Require().True(s.App.StakeibcKeeper.IsUndelegateHostPrevented(s.Ctx), "strict unbonding cap set to true") -} diff --git a/x/stakeibc/keeper/undelegate_host.go b/x/stakeibc/keeper/undelegate_host.go deleted file mode 100644 index 98b13ffb06..0000000000 --- a/x/stakeibc/keeper/undelegate_host.go +++ /dev/null @@ -1,137 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - - "github.com/Stride-Labs/stride/v16/utils" - "github.com/Stride-Labs/stride/v16/x/stakeibc/types" -) - -const ( - MaxNumTokensUnbondableStr = "2500000000000000000000000" // 2,500,000e18 - EvmosHostZoneChainId = "evmos_9001-2" -) - -// Submits undelegation ICA message for Evmos -// The total unbond amount is input, capped at MaxNumTokensUnbondable. -func (k Keeper) UndelegateHostEvmos(ctx sdk.Context, totalUnbondAmount math.Int) error { - - // if the total unbond amount is greater than the max, exit - maxNumTokensUnbondable, ok := math.NewIntFromString(MaxNumTokensUnbondableStr) - if !ok { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "unable to parse maxNumTokensUnbondable %s", maxNumTokensUnbondable) - } - if totalUnbondAmount.GT(maxNumTokensUnbondable) { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "total unbond amount %v is greater than maxNumTokensUnbondable %v", - totalUnbondAmount, maxNumTokensUnbondable) - } - - // Get the host zone - evmosHost, found := k.GetHostZone(ctx, EvmosHostZoneChainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "host zone %s not found", EvmosHostZoneChainId) - } - - k.Logger(ctx).Info(utils.LogWithHostZone(evmosHost.ChainId, - "Total unbonded amount: %v%s", totalUnbondAmount, evmosHost.HostDenom)) - - // If there's nothing to unbond, return and move on to the next host zone - if totalUnbondAmount.IsZero() { - return nil - } - - k.Logger(ctx).Info("Preparing MsgUndelegates from the delegation account to each validator on Evmos") - - // Confirm the delegation account was registered - if evmosHost.DelegationIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no delegation account found for %s", evmosHost.ChainId) - } - - // Determine the ideal balanced delegation for each validator after the unbonding - // (as if we were to unbond and then rebalance) - // This will serve as the starting point for determining how much to unbond each validator - delegationAfterUnbonding := evmosHost.TotalDelegations.Sub(totalUnbondAmount) - balancedDelegationsAfterUnbonding, err := k.GetTargetValAmtsForHostZone(ctx, evmosHost, delegationAfterUnbonding) - if err != nil { - return errorsmod.Wrapf(err, "unable to get target val amounts for host zone %s", evmosHost.ChainId) - } - - // Determine the unbond capacity for each validator - // Each validator can only unbond up to the difference between their current delegation and their balanced delegation - // The validator's current delegation will be above their balanced delegation if they've received LSM Liquid Stakes - // (which is only rebalanced once per unbonding period) - validatorUnbondCapacity := k.GetValidatorUnbondCapacity(ctx, evmosHost.Validators, balancedDelegationsAfterUnbonding) - if len(validatorUnbondCapacity) == 0 { - return fmt.Errorf("there are no validators on %s with sufficient unbond capacity", evmosHost.ChainId) - } - - // Sort the unbonding capacity by priority - // Priority is determined by checking the how proportionally unbalanced each validator is - // Zero weight validators will come first in the list - prioritizedUnbondCapacity, err := SortUnbondingCapacityByPriority(validatorUnbondCapacity) - if err != nil { - return err - } - - // Get the undelegation ICA messages and split delegations for the callback - msgs, unbondings, err := k.GetUnbondingICAMessages(evmosHost, totalUnbondAmount, prioritizedUnbondCapacity) - if err != nil { - return err - } - - // Shouldn't be possible, but if all the validator's had a target unbonding of zero, do not send an ICA - if len(msgs) == 0 { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Target unbonded amount was 0 for each validator") - } - - // Send the messages in batches so the gas limit isn't exceedeed - for start := 0; start < len(msgs); start += UndelegateICABatchSize { - end := start + UndelegateICABatchSize - if end > len(msgs) { - end = len(msgs) - } - - msgsBatch := msgs[start:end] - unbondingsBatch := unbondings[start:end] - - // Store the callback data - undelegateHostCallback := types.UndelegateHostCallback{ - Amt: totalUnbondAmount, - SplitDelegations: unbondingsBatch, - } - callbackArgsBz, err := proto.Marshal(&undelegateHostCallback) - if err != nil { - return errorsmod.Wrap(err, "unable to marshal undelegate callback args") - } - - // Submit the undelegation ICA - if _, err := k.SubmitTxsDayEpoch( - ctx, - evmosHost.ConnectionId, - msgsBatch, - types.ICAAccountType_DELEGATION, - ICACallbackID_UndelegateHost, - callbackArgsBz, - ); err != nil { - return errorsmod.Wrapf(err, "unable to submit unbonding ICA for %s", evmosHost.ChainId) - } - - // flag the delegation change in progress on each validator - for _, unbonding := range unbondingsBatch { - if err := k.IncrementValidatorDelegationChangesInProgress(&evmosHost, unbonding.Validator); err != nil { - return err - } - } - k.SetHostZone(ctx, evmosHost) - } - - EmitUndelegationEvent(ctx, evmosHost, totalUnbondAmount) - - return nil -} diff --git a/x/stakeibc/keeper/undelegate_host_test.go b/x/stakeibc/keeper/undelegate_host_test.go deleted file mode 100644 index 4c82a84a3b..0000000000 --- a/x/stakeibc/keeper/undelegate_host_test.go +++ /dev/null @@ -1,362 +0,0 @@ -package keeper_test - -import ( - "fmt" - - "cosmossdk.io/math" - sdkmath "cosmossdk.io/math" - "github.com/cosmos/gogoproto/proto" - ibctesting "github.com/cosmos/ibc-go/v7/testing" - _ "github.com/stretchr/testify/suite" - - epochstypes "github.com/Stride-Labs/stride/v16/x/epochs/types" - recordtypes "github.com/Stride-Labs/stride/v16/x/records/types" - "github.com/Stride-Labs/stride/v16/x/stakeibc/types" -) - -const UndelegateHostZoneChainId = "evmos_9001-2" // the relevant zone for this test - -func (s *KeeperTestSuite) SetupTestUndelegateHost( - totalWeight int64, - totalStake sdkmath.Int, - unbondAmount sdkmath.Int, - validators []*types.Validator, -) UnbondingTestCase { - delegationAccountOwner := types.FormatHostZoneICAOwner(UndelegateHostZoneChainId, types.ICAAccountType_DELEGATION) - delegationChannelID, delegationPortID := s.CreateICAChannel(delegationAccountOwner) - - // Sanity checks: - // - total stake matches - // - total weights sum to 100 - actualTotalStake := sdkmath.ZeroInt() - actualTotalWeights := uint64(0) - for _, validator := range validators { - actualTotalStake = actualTotalStake.Add(validator.Delegation) - actualTotalWeights += validator.Weight - } - s.Require().Equal(totalStake.Int64(), actualTotalStake.Int64(), "test setup failed - total stake does not match") - s.Require().Equal(totalWeight, int64(actualTotalWeights), "test setup failed - total weight does not match") - - // Store the validators on the host zone - hostZone := types.HostZone{ - ChainId: UndelegateHostZoneChainId, - ConnectionId: ibctesting.FirstConnectionID, - HostDenom: Atom, - DelegationIcaAddress: "cosmos_DELEGATION", - Validators: validators, - TotalDelegations: totalStake, - } - s.App.StakeibcKeeper.SetHostZone(s.Ctx, hostZone) - - // Store the total unbond amount across two epoch unbonding records - halfUnbondAmount := unbondAmount.Quo(sdkmath.NewInt(2)) - for i := uint64(1); i <= 2; i++ { - s.App.RecordsKeeper.SetEpochUnbondingRecord(s.Ctx, recordtypes.EpochUnbondingRecord{ - EpochNumber: i, - HostZoneUnbondings: []*recordtypes.HostZoneUnbonding{ - { - HostZoneId: UndelegateHostZoneChainId, - Status: recordtypes.HostZoneUnbonding_UNBONDING_QUEUE, - NativeTokenAmount: halfUnbondAmount, - }, - }, - }) - } - - // Mock the epoch tracker to timeout 90% through the epoch - strideEpochTracker := types.EpochTracker{ - EpochIdentifier: epochstypes.DAY_EPOCH, - Duration: 10_000_000_000, // 10 second epochs - NextEpochStartTime: uint64(s.Coordinator.CurrentTime.UnixNano() + 30_000_000_000), // dictates timeout - } - s.App.StakeibcKeeper.SetEpochTracker(s.Ctx, strideEpochTracker) - - // Get tx seq number before the ICA was submitted to check whether an ICA was submitted - startSequence, found := s.App.IBCKeeper.ChannelKeeper.GetNextSequenceSend(s.Ctx, delegationPortID, delegationChannelID) - s.Require().True(found, "sequence number not found before ica") - - return UnbondingTestCase{ - hostZone: hostZone, - totalUnbondAmount: unbondAmount, - delegationChannelID: delegationChannelID, - delegationPortID: delegationPortID, - channelStartSequence: startSequence, - expectedUnbondingRecordIds: []uint64{1, 2}, - } -} - -// Helper function to check that an undelegation ICA was submitted and that the callback data -// holds the expected unbondings for each validator -func (s *KeeperTestSuite) CheckUndelegateHostMessages(tc UnbondingTestCase, expectedUnbondings []ValidatorUnbonding) { - - // Check that IsUndelegateHostPrevented(ctx) has not yet been flipped to true - s.Require().False(s.App.StakeibcKeeper.IsUndelegateHostPrevented(s.Ctx)) - - // Trigger unbonding - err := s.App.StakeibcKeeper.UndelegateHostEvmos(s.Ctx, tc.totalUnbondAmount) - s.Require().NoError(err, "no error expected when calling unbond from host") - - // Check that sequence number incremented from a sent ICA - endSequence, found := s.App.IBCKeeper.ChannelKeeper.GetNextSequenceSend(s.Ctx, tc.delegationPortID, tc.delegationChannelID) - s.Require().True(found, "sequence number not found after ica") - s.Require().Equal(tc.channelStartSequence+1, endSequence, "sequence number should have incremented") - - // Check that callback data was stored - callbackData := s.App.IcacallbacksKeeper.GetAllCallbackData(s.Ctx) - s.Require().Len(callbackData, 1, "there should only be one callback data stored") - - // Check host zone and epoch unbonding record id's - var actualCallback types.UndelegateHostCallback - err = proto.Unmarshal(callbackData[0].CallbackArgs, &actualCallback) - s.Require().NoError(err, "no error expected when unmarshalling callback args") - - s.Require().Equal(tc.totalUnbondAmount, actualCallback.Amt, "amount on callback") - - // Check splits from callback data align with expected unbondings - s.Require().Len(actualCallback.SplitDelegations, len(expectedUnbondings), "number of unbonding messages") - for i, expected := range expectedUnbondings { - actualSplit := actualCallback.SplitDelegations[i] - s.Require().Equal(expected.Validator, actualSplit.Validator, "callback message validator - index %d", i) - s.Require().Equal(expected.UnbondAmount.Int64(), actualSplit.Amount.Int64(), "callback message amount - index %d", i) - } - - // Check the delegation change in progress was incremented from each that had an unbonding - actualHostZone, found := s.App.StakeibcKeeper.GetHostZone(s.Ctx, UndelegateHostZoneChainId) - s.Require().True(found, "host zone should have been found") - - for _, actualValidator := range actualHostZone.Validators { - validatorUnbonded := false - for _, unbondedVal := range expectedUnbondings { - if actualValidator.Address == unbondedVal.Validator { - validatorUnbonded = true - } - } - - expectedDelegationChangesInProgress := 0 - if validatorUnbonded { - expectedDelegationChangesInProgress = 1 - } - s.Require().Equal(expectedDelegationChangesInProgress, int(actualValidator.DelegationChangesInProgress), - "validator %s delegation changes in progress", actualValidator.Address) - } - - // Check that the unbond event was emitted with the proper unbond amount - s.CheckEventValueEmitted(types.EventTypeUndelegation, types.AttributeKeyTotalUnbondAmount, tc.totalUnbondAmount.String()) -} - -func (s *KeeperTestSuite) TestUndelegateHost_Successful_UnbondOnlyZeroWeightVals() { - // Native Stake: 1000 - // LSM Stake: 250 - // Total Stake: 1250 - // - // Unbond Amount: 50 - // Stake After Unbond: 1200 - totalUnbondAmount := sdkmath.NewInt(50) - totalStake := sdkmath.NewInt(1250) - totalWeight := int64(100) - - validators := []*types.Validator{ - // Current: 100, Weight: 10%, Balanced: 10% * 1200 = 120, Capacity: 100-120 = -20 -> 0 - // No capacity -> unbondings - {Address: "valA", Weight: 10, Delegation: sdkmath.NewInt(100)}, - // Current: 420, Weight: 35%, Balanced: 35% * 1200 = 420, Capacity: 420-420 = 0 - // No capacity -> unbondings - {Address: "valB", Weight: 35, Delegation: sdkmath.NewInt(420)}, - // Weight: 0%, Balanced: 0, Capacity: 40 - // >>> Ratio: 0 -> Priority #1 <<< - {Address: "valC", Weight: 0, Delegation: sdkmath.NewInt(40)}, - // Current: 300, Weight: 30%, Balanced: 30% * 1200 = 360, Capacity: 300-360 = -60 -> 0 - // No capacity -> unbondings - {Address: "valD", Weight: 30, Delegation: sdkmath.NewInt(300)}, - // Weight: 0%, Balanced: 0, Capacity: 30 - // >>> Ratio: 0 -> Priority #2 <<< - {Address: "valE", Weight: 0, Delegation: sdkmath.NewInt(30)}, - // Current: 200, Weight: 10%, Balanced: 10% * 1200 = 120, Capacity: 200 - 120 = 80 - // >>> Ratio: 110/200 = 0.55 -> #3 Priority <<<< - {Address: "valF", Weight: 10, Delegation: sdkmath.NewInt(200)}, - // Current: 160, Weight: 15%, Balanced: 15% * 1200 = 180, Capacity: 160-180 = -20 -> 0 - // No capacity -> unbondings - {Address: "valG", Weight: 15, Delegation: sdkmath.NewInt(160)}, - } - - expectedUnbondings := []ValidatorUnbonding{ - // valC has #1 priority - unbond up to capacity at 40 - {Validator: "valC", UnbondAmount: sdkmath.NewInt(40)}, - // 50 - 40 = 10 unbond remaining - // valE has #2 priority - unbond up to remaining - {Validator: "valE", UnbondAmount: sdkmath.NewInt(10)}, - } - - tc := s.SetupTestUndelegateHost(totalWeight, totalStake, totalUnbondAmount, validators) - s.CheckUndelegateHostMessages(tc, expectedUnbondings) -} - -func (s *KeeperTestSuite) TestUndelegateHost_Successful_UnbondTotalLessThanTotalLSM() { - // Native Stake: 1000 - // LSM Stake: 250 - // Total Stake: 1250 - // - // Unbond Amount: 150 - // Stake After Unbond: 1100 - totalUnbondAmount := sdkmath.NewInt(150) - totalStake := sdkmath.NewInt(1250) - totalWeight := int64(100) - - validators := []*types.Validator{ - // Current: 100, Weight: 10%, Balanced: 10% * 1100 = 110, Capacity: 100-110 = -10 -> 0 - // No capacity -> unbondings - {Address: "valA", Weight: 10, Delegation: sdkmath.NewInt(100)}, - // Current: 420, Weight: 35%, Balanced: 35% * 1100 = 385, Capacity: 420-385 = 35 - // >>> Ratio: 385/420 = 0.91 -> Priority #4 <<< - {Address: "valB", Weight: 35, Delegation: sdkmath.NewInt(420)}, - // Weight: 0%, Balanced: 0, Capacity: 40 - // >>> Ratio: 0 -> Priority #1 <<< - {Address: "valC", Weight: 0, Delegation: sdkmath.NewInt(40)}, - // Current: 300, Weight: 30%, Balanced: 30% * 1100 = 330, Capacity: 300-330 = -30 -> 0 - // No capacity -> unbondings - {Address: "valD", Weight: 30, Delegation: sdkmath.NewInt(300)}, - // Weight: 0%, Balanced: 0, Capacity: 30 - // >>> Ratio: 0 -> Priority #2 <<< - {Address: "valE", Weight: 0, Delegation: sdkmath.NewInt(30)}, - // Current: 200, Weight: 10%, Balanced: 10% * 1100 = 110, Capacity: 200 - 110 = 90 - // >>> Ratio: 110/200 = 0.55 -> Priority #3 <<< - {Address: "valF", Weight: 10, Delegation: sdkmath.NewInt(200)}, - // Current: 160, Weight: 15%, Balanced: 15% * 1100 = 165, Capacity: 160-165 = -5 -> 0 - // No capacity -> unbondings - {Address: "valG", Weight: 15, Delegation: sdkmath.NewInt(160)}, - } - - expectedUnbondings := []ValidatorUnbonding{ - // valC has #1 priority - unbond up to capacity at 40 - {Validator: "valC", UnbondAmount: sdkmath.NewInt(40)}, - // 150 - 40 = 110 unbond remaining - // valE has #2 priority - unbond up to capacity at 30 - {Validator: "valE", UnbondAmount: sdkmath.NewInt(30)}, - // 150 - 40 - 30 = 80 unbond remaining - // valF has #3 priority - unbond up to remaining - {Validator: "valF", UnbondAmount: sdkmath.NewInt(80)}, - } - - tc := s.SetupTestUndelegateHost(totalWeight, totalStake, totalUnbondAmount, validators) - s.CheckUndelegateHostMessages(tc, expectedUnbondings) -} - -func (s *KeeperTestSuite) TestUndelegateHost_Successful_UnbondTotalGreaterThanTotalLSM() { - // Native Stake: 1000 - // LSM Stake: 250 - // Total Stake: 1250 - // - // Unbond Amount: 350 - // Stake After Unbond: 900 - totalUnbondAmount := sdkmath.NewInt(350) - totalStake := sdkmath.NewInt(1250) - totalWeight := int64(100) - - validators := []*types.Validator{ - // Current: 100, Weight: 10%, Balanced: 10% * 900 = 90, Capacity: 100-90 = 10 - // >>> Ratio: 90/100 = 0.9 -> Priority #7 <<< - {Address: "valA", Weight: 10, Delegation: sdkmath.NewInt(100)}, - // Current: 420, Weight: 35%, Balanced: 35% * 900 = 315, Capacity: 420-315 = 105 - // >>> Ratio: 315/420 = 0.75 -> Priority #4 <<< - {Address: "valB", Weight: 35, Delegation: sdkmath.NewInt(420)}, - // Weight: 0%, Balanced: 0, Capacity: 40 - // >>> Ratio: 0 -> Priority #1 <<< - {Address: "valC", Weight: 0, Delegation: sdkmath.NewInt(40)}, - // Current: 300, Weight: 30%, Balanced: 30% * 900 = 270, Capacity: 300-270 = 30 - // >>> Ratio: 270/300 = 0.9 -> Priority #6 <<< - {Address: "valD", Weight: 30, Delegation: sdkmath.NewInt(300)}, - // Weight: 0%, Balanced: 0, Capacity: 30 - // >>> Ratio: 0 -> Priority #2 <<< - {Address: "valE", Weight: 0, Delegation: sdkmath.NewInt(30)}, - // Current: 200, Weight: 10%, Balanced: 10% * 900 = 90, Capacity: 200 - 90 = 110 - // >>> Ratio: 90/200 = 0.45 -> Priority #3 <<< - {Address: "valF", Weight: 10, Delegation: sdkmath.NewInt(200)}, - // Current: 160, Weight: 15%, Balanced: 15% * 900 = 135, Capacity: 160-135 = 25 - // >>> Ratio: 135/160 = 0.85 -> Priority #5 <<< - {Address: "valG", Weight: 15, Delegation: sdkmath.NewInt(160)}, - } - - expectedUnbondings := []ValidatorUnbonding{ - // valC has #1 priority - unbond up to capacity at 40 - {Validator: "valC", UnbondAmount: sdkmath.NewInt(40)}, - // 350 - 40 = 310 unbond remaining - // valE has #2 priority - unbond up to capacity at 30 - {Validator: "valE", UnbondAmount: sdkmath.NewInt(30)}, - // 310 - 30 = 280 unbond remaining - // valF has #3 priority - unbond up to capacity at 110 - {Validator: "valF", UnbondAmount: sdkmath.NewInt(110)}, - // 280 - 110 = 170 unbond remaining - // valB has #4 priority - unbond up to capacity at 105 - {Validator: "valB", UnbondAmount: sdkmath.NewInt(105)}, - // 170 - 105 = 65 unbond remaining - // valG has #5 priority - unbond up to capacity at 25 - {Validator: "valG", UnbondAmount: sdkmath.NewInt(25)}, - // 65 - 25 = 40 unbond remaining - // valD has #6 priority - unbond up to capacity at 30 - {Validator: "valD", UnbondAmount: sdkmath.NewInt(30)}, - // 40 - 30 = 10 unbond remaining - // valA has #7 priority - unbond up to remaining - {Validator: "valA", UnbondAmount: sdkmath.NewInt(10)}, - } - - tc := s.SetupTestUndelegateHost(totalWeight, totalStake, totalUnbondAmount, validators) - s.CheckUndelegateHostMessages(tc, expectedUnbondings) -} - -func (s *KeeperTestSuite) TestUndelegateHost_AmountTooLarge() { - // Call undelegateHost with an amount that is greater than the max amount, it should fail - unbondAmount, ok := math.NewIntFromString("25000000000000000000000001") - s.Require().True(ok, "could not parse unbondAmount") - err := s.App.StakeibcKeeper.UndelegateHostEvmos(s.Ctx, unbondAmount) - s.Require().ErrorContains(err, fmt.Sprintf("total unbond amount %v is greater than", unbondAmount)) -} - -func (s *KeeperTestSuite) TestUndelegateHost_ZeroUnbondAmount() { - totalWeight := int64(0) - totalStake := sdkmath.ZeroInt() - totalUnbondAmount := sdkmath.ZeroInt() - tc := s.SetupTestUndelegateHost(totalWeight, totalStake, totalUnbondAmount, []*types.Validator{}) - - // Call unbond - it should NOT error since the unbond amount was 0 - but it should short circuit - err := s.App.StakeibcKeeper.UndelegateHostEvmos(s.Ctx, totalUnbondAmount) - s.Require().Nil(err, "unbond should not have thrown an error - it should have simply ignored the host zone") - - // Confirm no ICAs were sent - endSequence, found := s.App.IBCKeeper.ChannelKeeper.GetNextSequenceSend(s.Ctx, tc.delegationPortID, tc.delegationChannelID) - s.Require().True(found, "sequence number not found after ica") - s.Require().Equal(tc.channelStartSequence, endSequence, "sequence number should stay the same since no messages were sent") -} - -func (s *KeeperTestSuite) TestUndelegateHost_ZeroValidatorWeights() { - // Setup the test with all zero-weight validators - totalWeight := int64(0) - totalStake := sdkmath.NewInt(100) - totalUnbondAmount := sdkmath.NewInt(10) - validators := []*types.Validator{ - {Address: "valA", Weight: 0, Delegation: sdkmath.NewInt(25)}, - {Address: "valB", Weight: 0, Delegation: sdkmath.NewInt(50)}, - {Address: "valC", Weight: 0, Delegation: sdkmath.NewInt(25)}, - } - s.SetupTestUndelegateHost(totalWeight, totalStake, totalUnbondAmount, validators) - - // Call unbond - it should fail - err := s.App.StakeibcKeeper.UndelegateHostEvmos(s.Ctx, totalUnbondAmount) - s.Require().ErrorContains(err, "No non-zero validators found for host zone") -} - -func (s *KeeperTestSuite) TestUndelegateHost_InsufficientDelegations() { - // Setup the test where the total unbond amount is greater than the current delegations - totalWeight := int64(100) - totalStake := sdkmath.NewInt(100) - totalUnbondAmount := sdkmath.NewInt(200) - validators := []*types.Validator{ - {Address: "valA", Weight: 25, Delegation: sdkmath.NewInt(25)}, - {Address: "valB", Weight: 50, Delegation: sdkmath.NewInt(50)}, - {Address: "valC", Weight: 25, Delegation: sdkmath.NewInt(25)}, - } - s.SetupTestUndelegateHost(totalWeight, totalStake, totalUnbondAmount, validators) - - // Call unbond - it should fail - err := s.App.StakeibcKeeper.UndelegateHostEvmos(s.Ctx, totalUnbondAmount) - s.Require().ErrorContains(err, "Cannot calculate target delegation if final amount is less than or equal to zero") -} diff --git a/x/stakeibc/types/callbacks.pb.go b/x/stakeibc/types/callbacks.pb.go index 18652683b0..9205c487b3 100644 --- a/x/stakeibc/types/callbacks.pb.go +++ b/x/stakeibc/types/callbacks.pb.go @@ -303,51 +303,6 @@ func (m *UndelegateCallback) GetEpochUnbondingRecordIds() []uint64 { return nil } -type UndelegateHostCallback struct { - Amt github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=amt,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amt"` - SplitDelegations []*SplitDelegation `protobuf:"bytes,2,rep,name=split_delegations,json=splitDelegations,proto3" json:"split_delegations,omitempty"` -} - -func (m *UndelegateHostCallback) Reset() { *m = UndelegateHostCallback{} } -func (m *UndelegateHostCallback) String() string { return proto.CompactTextString(m) } -func (*UndelegateHostCallback) ProtoMessage() {} -func (*UndelegateHostCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{5} -} -func (m *UndelegateHostCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UndelegateHostCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UndelegateHostCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UndelegateHostCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_UndelegateHostCallback.Merge(m, src) -} -func (m *UndelegateHostCallback) XXX_Size() int { - return m.Size() -} -func (m *UndelegateHostCallback) XXX_DiscardUnknown() { - xxx_messageInfo_UndelegateHostCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_UndelegateHostCallback proto.InternalMessageInfo - -func (m *UndelegateHostCallback) GetSplitDelegations() []*SplitDelegation { - if m != nil { - return m.SplitDelegations - } - return nil -} - type RedemptionCallback struct { HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` EpochUnbondingRecordIds []uint64 `protobuf:"varint,2,rep,packed,name=epoch_unbonding_record_ids,json=epochUnbondingRecordIds,proto3" json:"epoch_unbonding_record_ids,omitempty"` @@ -357,7 +312,7 @@ func (m *RedemptionCallback) Reset() { *m = RedemptionCallback{} } func (m *RedemptionCallback) String() string { return proto.CompactTextString(m) } func (*RedemptionCallback) ProtoMessage() {} func (*RedemptionCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{6} + return fileDescriptor_f41c99b09b96a5ac, []int{5} } func (m *RedemptionCallback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +365,7 @@ func (m *Rebalancing) Reset() { *m = Rebalancing{} } func (m *Rebalancing) String() string { return proto.CompactTextString(m) } func (*Rebalancing) ProtoMessage() {} func (*Rebalancing) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{7} + return fileDescriptor_f41c99b09b96a5ac, []int{6} } func (m *Rebalancing) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -462,7 +417,7 @@ func (m *RebalanceCallback) Reset() { *m = RebalanceCallback{} } func (m *RebalanceCallback) String() string { return proto.CompactTextString(m) } func (*RebalanceCallback) ProtoMessage() {} func (*RebalanceCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{8} + return fileDescriptor_f41c99b09b96a5ac, []int{7} } func (m *RebalanceCallback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -513,7 +468,7 @@ func (m *DetokenizeSharesCallback) Reset() { *m = DetokenizeSharesCallba func (m *DetokenizeSharesCallback) String() string { return proto.CompactTextString(m) } func (*DetokenizeSharesCallback) ProtoMessage() {} func (*DetokenizeSharesCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{9} + return fileDescriptor_f41c99b09b96a5ac, []int{8} } func (m *DetokenizeSharesCallback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -559,7 +514,7 @@ func (m *LSMLiquidStake) Reset() { *m = LSMLiquidStake{} } func (m *LSMLiquidStake) String() string { return proto.CompactTextString(m) } func (*LSMLiquidStake) ProtoMessage() {} func (*LSMLiquidStake) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{10} + return fileDescriptor_f41c99b09b96a5ac, []int{9} } func (m *LSMLiquidStake) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -617,7 +572,7 @@ func (m *ValidatorSharesToTokensQueryCallback) Reset() { *m = ValidatorS func (m *ValidatorSharesToTokensQueryCallback) String() string { return proto.CompactTextString(m) } func (*ValidatorSharesToTokensQueryCallback) ProtoMessage() {} func (*ValidatorSharesToTokensQueryCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{11} + return fileDescriptor_f41c99b09b96a5ac, []int{10} } func (m *ValidatorSharesToTokensQueryCallback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +617,7 @@ func (m *DelegatorSharesQueryCallback) Reset() { *m = DelegatorSharesQue func (m *DelegatorSharesQueryCallback) String() string { return proto.CompactTextString(m) } func (*DelegatorSharesQueryCallback) ProtoMessage() {} func (*DelegatorSharesQueryCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{12} + return fileDescriptor_f41c99b09b96a5ac, []int{11} } func (m *DelegatorSharesQueryCallback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -700,7 +655,7 @@ func (m *CommunityPoolBalanceQueryCallback) Reset() { *m = CommunityPool func (m *CommunityPoolBalanceQueryCallback) String() string { return proto.CompactTextString(m) } func (*CommunityPoolBalanceQueryCallback) ProtoMessage() {} func (*CommunityPoolBalanceQueryCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{13} + return fileDescriptor_f41c99b09b96a5ac, []int{12} } func (m *CommunityPoolBalanceQueryCallback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -752,7 +707,7 @@ func (m *TradeRouteCallback) Reset() { *m = TradeRouteCallback{} } func (m *TradeRouteCallback) String() string { return proto.CompactTextString(m) } func (*TradeRouteCallback) ProtoMessage() {} func (*TradeRouteCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{14} + return fileDescriptor_f41c99b09b96a5ac, []int{13} } func (m *TradeRouteCallback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -801,7 +756,6 @@ func init() { proto.RegisterType((*ClaimCallback)(nil), "stride.stakeibc.ClaimCallback") proto.RegisterType((*ReinvestCallback)(nil), "stride.stakeibc.ReinvestCallback") proto.RegisterType((*UndelegateCallback)(nil), "stride.stakeibc.UndelegateCallback") - proto.RegisterType((*UndelegateHostCallback)(nil), "stride.stakeibc.UndelegateHostCallback") proto.RegisterType((*RedemptionCallback)(nil), "stride.stakeibc.RedemptionCallback") proto.RegisterType((*Rebalancing)(nil), "stride.stakeibc.Rebalancing") proto.RegisterType((*RebalanceCallback)(nil), "stride.stakeibc.RebalanceCallback") @@ -816,67 +770,66 @@ func init() { func init() { proto.RegisterFile("stride/stakeibc/callbacks.proto", fileDescriptor_f41c99b09b96a5ac) } var fileDescriptor_f41c99b09b96a5ac = []byte{ - // 953 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6e, 0xdb, 0xc6, - 0x13, 0x36, 0xad, 0xfc, 0x62, 0x7b, 0x24, 0xff, 0x23, 0x82, 0xfc, 0x64, 0x41, 0x95, 0x6c, 0xa6, - 0x68, 0x83, 0x02, 0x21, 0x61, 0x17, 0x08, 0xfa, 0xe7, 0x12, 0x5b, 0x46, 0x11, 0x01, 0x72, 0xd1, - 0x52, 0x76, 0x0e, 0xb9, 0x10, 0x4b, 0xee, 0x42, 0x5a, 0x98, 0xdc, 0x55, 0xb8, 0x4b, 0xbb, 0xce, - 0x13, 0xf4, 0x98, 0x6b, 0x1f, 0xa1, 0xbd, 0xf4, 0x09, 0x7a, 0xe9, 0x29, 0xc7, 0x1c, 0x8b, 0x1e, - 0xd2, 0xc2, 0x7e, 0x91, 0x62, 0x97, 0x4b, 0x8a, 0x92, 0xd3, 0xa0, 0x76, 0x7b, 0x22, 0x39, 0x3b, - 0x3b, 0xf3, 0xcd, 0xf7, 0xcd, 0xec, 0x12, 0xba, 0x42, 0xa6, 0x14, 0x13, 0x4f, 0x48, 0x74, 0x4a, - 0x68, 0x18, 0x79, 0x11, 0x8a, 0xe3, 0x10, 0x45, 0xa7, 0xc2, 0x9d, 0xa4, 0x5c, 0x72, 0x7b, 0x3d, - 0x77, 0x70, 0x0b, 0x87, 0xd6, 0xbd, 0x11, 0x1f, 0x71, 0xbd, 0xe6, 0xa9, 0xb7, 0xdc, 0xad, 0xd5, - 0x89, 0xb8, 0x48, 0xb8, 0xf0, 0x42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c, 0x10, 0x64, 0x7f, 0x56, - 0xbd, 0x26, 0x6a, 0x7a, 0x5f, 0xeb, 0xda, 0xbe, 0x52, 0xc6, 0xca, 0x15, 0xe2, 0xbc, 0x80, 0x0f, - 0x4b, 0x7b, 0xce, 0xca, 0x31, 0xd7, 0xd8, 0xc4, 0xb7, 0x19, 0x49, 0x2f, 0x4a, 0x8a, 0xfa, 0xb0, - 0x11, 0x8b, 0x24, 0x88, 0x75, 0x9d, 0x81, 0x8e, 0x39, 0x5f, 0x5d, 0x99, 0x68, 0x96, 0x0f, 0x7f, - 0x2d, 0x16, 0x49, 0xe5, 0xdb, 0x79, 0x65, 0x41, 0xdb, 0xcc, 0x48, 0x91, 0x73, 0x36, 0xd7, 0x04, - 0xda, 0x94, 0x51, 0x49, 0x51, 0x3c, 0x6d, 0xc7, 0xca, 0x3c, 0xde, 0x72, 0xbc, 0x5b, 0x26, 0x66, - 0x59, 0xee, 0x74, 0x4e, 0x9d, 0x0c, 0x76, 0x7a, 0x3c, 0x49, 0x32, 0x46, 0xe5, 0xc5, 0x37, 0x9c, - 0xc7, 0x07, 0x79, 0x83, 0xce, 0xc2, 0xfa, 0x02, 0x96, 0xd5, 0x9d, 0xad, 0x22, 0x6a, 0x08, 0x6b, - 0xef, 0x28, 0xbd, 0xdf, 0xdb, 0xdf, 0xcf, 0xef, 0xf4, 0xe3, 0x8b, 0x09, 0xf1, 0x97, 0x68, 0x84, - 0xd4, 0x8b, 0x7d, 0x0f, 0xfe, 0x87, 0x09, 0xe3, 0x89, 0x99, 0xaa, 0xfc, 0xc3, 0x79, 0x06, 0xf6, - 0x71, 0x8a, 0x30, 0xf1, 0x79, 0x56, 0x39, 0x8d, 0x77, 0x54, 0xaf, 0x9f, 0xa3, 0x14, 0x07, 0xf9, - 0x96, 0x7c, 0x1a, 0xea, 0xb9, 0xed, 0x50, 0x99, 0xec, 0x0f, 0x40, 0x0f, 0x47, 0x50, 0x8d, 0xa9, - 0x3b, 0x47, 0x2f, 0x1f, 0x0c, 0x5e, 0x5f, 0x76, 0xac, 0x37, 0x97, 0x1d, 0xeb, 0xcf, 0xcb, 0x8e, - 0xf5, 0xea, 0xaa, 0xb3, 0xf0, 0xe6, 0xaa, 0xb3, 0xf0, 0xdb, 0x55, 0x67, 0xe1, 0xf9, 0x5e, 0x85, - 0xac, 0xa1, 0xc6, 0xfe, 0x68, 0x80, 0x42, 0xe1, 0x99, 0x9f, 0x93, 0xb3, 0xdd, 0xc7, 0xde, 0x77, - 0xd3, 0x5f, 0x14, 0x4d, 0x5e, 0x78, 0x57, 0xff, 0x9d, 0x7c, 0xfa, 0x57, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x88, 0x27, 0x41, 0x11, 0x8a, 0x09, 0x00, 0x00, + // 932 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x36, 0xad, 0x34, 0xb6, 0x47, 0xf2, 0x1f, 0x11, 0xb4, 0xb2, 0xa0, 0x4a, 0x36, 0x53, 0xb4, + 0x41, 0x81, 0x90, 0xb0, 0x0b, 0x04, 0xfd, 0xb9, 0xc4, 0x96, 0x51, 0x54, 0x80, 0x5c, 0xb4, 0x94, + 0x9d, 0x43, 0x2e, 0xc4, 0x92, 0x5c, 0x48, 0x0b, 0x93, 0xbb, 0x0a, 0x77, 0x69, 0xd7, 0x79, 0x82, + 0x1e, 0x73, 0xed, 0x23, 0xb4, 0x97, 0x3e, 0x41, 0x2f, 0x3d, 0xe5, 0x98, 0x63, 0xd1, 0x43, 0x5a, + 0xd8, 0x2f, 0x52, 0xec, 0x0f, 0x29, 0x4a, 0x4e, 0x83, 0xaa, 0x39, 0x49, 0x9c, 0xfd, 0x66, 0xe6, + 0x9b, 0xf9, 0x66, 0x76, 0xa1, 0xcb, 0x45, 0x46, 0x62, 0xec, 0x71, 0x81, 0xce, 0x31, 0x09, 0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 0xac, 0x5f, 0xa2, 0x2c, 0x0e, 0xb4, 0x8b, 0xde, 0x86, 0xba, + 0xb6, 0x1d, 0x4b, 0x93, 0xfd, 0x21, 0xa8, 0xe5, 0x08, 0xaa, 0x31, 0xd5, 0xe4, 0xa8, 0xe3, 0xa3, + 0xc1, 0xcb, 0xeb, 0x8e, 0xf5, 0xea, 0xba, 0x63, 0xfd, 0x7d, 0xdd, 0xb1, 0x5e, 0xdc, 0x74, 0x96, + 0x5e, 0xdd, 0x74, 0x96, 0xfe, 0xb8, 0xe9, 0x2c, 0x3d, 0x3d, 0xa8, 0x34, 0x6b, 0xa8, 0xb8, 0x3f, + 0x1c, 0xa0, 0x90, 0x7b, 0xe6, 0xc1, 0xbf, 0xd8, 0x7f, 0xe4, 0xfd, 0x30, 0x7d, 0xf6, 0x55, 0xf3, + 0xc2, 0xbb, 0xea, 0xc5, 0xff, 0xec, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x06, 0x87, 0x40, + 0xde, 0x08, 0x00, 0x00, } func (m *SplitDelegation) Marshal() (dAtA []byte, err error) { @@ -1112,53 +1065,6 @@ func (m *UndelegateCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *UndelegateHostCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UndelegateHostCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UndelegateHostCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SplitDelegations) > 0 { - for iNdEx := len(m.SplitDelegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SplitDelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size := m.Amt.Size() - i -= size - if _, err := m.Amt.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *RedemptionCallback) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1641,23 +1547,6 @@ func (m *UndelegateCallback) Size() (n int) { return n } -func (m *UndelegateHostCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Amt.Size() - n += 1 + l + sovCallbacks(uint64(l)) - if len(m.SplitDelegations) > 0 { - for _, e := range m.SplitDelegations { - l = e.Size() - n += 1 + l + sovCallbacks(uint64(l)) - } - } - return n -} - func (m *RedemptionCallback) Size() (n int) { if m == nil { return 0 @@ -2504,124 +2393,6 @@ func (m *UndelegateCallback) Unmarshal(dAtA []byte) error { } return nil } -func (m *UndelegateHostCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UndelegateHostCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UndelegateHostCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amt", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SplitDelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SplitDelegations = append(m.SplitDelegations, &SplitDelegation{}) - if err := m.SplitDelegations[len(m.SplitDelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *RedemptionCallback) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/stakeibc/types/codec.go b/x/stakeibc/types/codec.go index a57537ab16..d619985a65 100644 --- a/x/stakeibc/types/codec.go +++ b/x/stakeibc/types/codec.go @@ -23,7 +23,6 @@ func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&ToggleLSMProposal{}, "stakeibc/ToggleLSMProposal", nil) cdc.RegisterConcrete(&MsgRestoreInterchainAccount{}, "stakeibc/RestoreInterchainAccount", nil) cdc.RegisterConcrete(&MsgUpdateValidatorSharesExchRate{}, "stakeibc/UpdateValidatorSharesExchRate", nil) - cdc.RegisterConcrete(&MsgUndelegateHost{}, "stakeibc/UndelegateHost", nil) cdc.RegisterConcrete(&MsgCalibrateDelegation{}, "stakeibc/CalibrateDelegation", nil) cdc.RegisterConcrete(&MsgUpdateInnerRedemptionRateBounds{}, "stakeibc/UpdateInnerRedemptionRateBounds", nil) cdc.RegisterConcrete(&MsgResumeHostZone{}, "stakeibc/ResumeHostZone", nil) @@ -43,7 +42,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgDeleteValidator{}, &MsgRestoreInterchainAccount{}, &MsgUpdateValidatorSharesExchRate{}, - &MsgUndelegateHost{}, &MsgCalibrateDelegation{}, &MsgUpdateInnerRedemptionRateBounds{}, &MsgResumeHostZone{}, diff --git a/x/stakeibc/types/errors.go b/x/stakeibc/types/errors.go index 76c75791a0..92c4c77841 100644 --- a/x/stakeibc/types/errors.go +++ b/x/stakeibc/types/errors.go @@ -55,8 +55,8 @@ var ( ErrInvalidValidatorDelegationUpdates = errorsmod.Register(ModuleName, 1548, "Invalid validator delegation updates") ErrLSMLiquidStakeDisabledForHostZone = errorsmod.Register(ModuleName, 1549, "LSM liquid stake is disabled for host zone") ErrUnableToRemoveValidator = errorsmod.Register(ModuleName, 1550, "Unable to remove validator") - ErrUndelegateHostNotCallable = errorsmod.Register(ModuleName, 1551, "Undelegate host is disabled") - ErrInvalidBounds = errorsmod.Register(ModuleName, 1552, "Invalid safety bounds - inner bounds must be within outer bounds") + ErrInvalidBounds = errorsmod.Register(ModuleName, 1551, "Invalid safety bounds - inner bounds must be within outer bounds") + ErrCalibrationThresholdExceeded = errorsmod.Register(ModuleName, 1552, "Calibration threshold exceeded") ErrHostZoneNotHalted = errorsmod.Register(ModuleName, 1553, "host zone is not halted") ErrFailedToLiquidStake = errorsmod.Register(ModuleName, 1554, "Failed to liquid stake") ErrUnableToRedeemStake = errorsmod.Register(ModuleName, 1555, "Failed to redeem stake") diff --git a/x/stakeibc/types/message_calibrate_delegation.go b/x/stakeibc/types/message_calibrate_delegation.go index d710290686..5f1ca4d655 100644 --- a/x/stakeibc/types/message_calibrate_delegation.go +++ b/x/stakeibc/types/message_calibrate_delegation.go @@ -6,8 +6,6 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/Stride-Labs/stride/v16/utils" ) const TypeMsgCalibrateDelegation = "calibrate_delegation" @@ -48,9 +46,6 @@ func (msg *MsgCalibrateDelegation) ValidateBasic() error { if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if err := utils.ValidateAdminAddress(msg.Creator); err != nil { - return err - } if len(msg.ChainId) == 0 { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "chainid is required") diff --git a/x/stakeibc/types/message_undelegate_host.go b/x/stakeibc/types/message_undelegate_host.go deleted file mode 100644 index 9a85c72b46..0000000000 --- a/x/stakeibc/types/message_undelegate_host.go +++ /dev/null @@ -1,56 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/Stride-Labs/stride/v16/utils" -) - -const TypeMsgUndelegateHost = "undelegate_host" - -var _ sdk.Msg = &MsgUndelegateHost{} - -func NewMsgUndelegateHost(creator string, amount sdkmath.Int) *MsgUndelegateHost { - return &MsgUndelegateHost{ - Creator: creator, - Amount: amount, - } -} - -func (msg *MsgUndelegateHost) Route() string { - return RouterKey -} - -func (msg *MsgUndelegateHost) Type() string { - return TypeMsgUndelegateHost -} - -func (msg *MsgUndelegateHost) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgUndelegateHost) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgUndelegateHost) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - if err := utils.ValidateAdminAddress(msg.Creator); err != nil { - return err - } - if msg.Amount.IsZero() { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "amount must be positive") - } - return nil -} diff --git a/x/stakeibc/types/tx.pb.go b/x/stakeibc/types/tx.pb.go index c1172c2719..2b26aa1460 100644 --- a/x/stakeibc/types/tx.pb.go +++ b/x/stakeibc/types/tx.pb.go @@ -1297,87 +1297,6 @@ func (m *MsgUpdateValidatorSharesExchRateResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateValidatorSharesExchRateResponse proto.InternalMessageInfo -type MsgUndelegateHost struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` -} - -func (m *MsgUndelegateHost) Reset() { *m = MsgUndelegateHost{} } -func (m *MsgUndelegateHost) String() string { return proto.CompactTextString(m) } -func (*MsgUndelegateHost) ProtoMessage() {} -func (*MsgUndelegateHost) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{26} -} -func (m *MsgUndelegateHost) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUndelegateHost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUndelegateHost.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUndelegateHost) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUndelegateHost.Merge(m, src) -} -func (m *MsgUndelegateHost) XXX_Size() int { - return m.Size() -} -func (m *MsgUndelegateHost) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUndelegateHost.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUndelegateHost proto.InternalMessageInfo - -func (m *MsgUndelegateHost) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -type MsgUndelegateHostResponse struct { -} - -func (m *MsgUndelegateHostResponse) Reset() { *m = MsgUndelegateHostResponse{} } -func (m *MsgUndelegateHostResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUndelegateHostResponse) ProtoMessage() {} -func (*MsgUndelegateHostResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{27} -} -func (m *MsgUndelegateHostResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUndelegateHostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUndelegateHostResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUndelegateHostResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUndelegateHostResponse.Merge(m, src) -} -func (m *MsgUndelegateHostResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUndelegateHostResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUndelegateHostResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUndelegateHostResponse proto.InternalMessageInfo - type MsgCalibrateDelegation struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` @@ -1388,7 +1307,7 @@ func (m *MsgCalibrateDelegation) Reset() { *m = MsgCalibrateDelegation{} func (m *MsgCalibrateDelegation) String() string { return proto.CompactTextString(m) } func (*MsgCalibrateDelegation) ProtoMessage() {} func (*MsgCalibrateDelegation) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{28} + return fileDescriptor_9b7e09c9ad51cd54, []int{26} } func (m *MsgCalibrateDelegation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1445,7 +1364,7 @@ func (m *MsgCalibrateDelegationResponse) Reset() { *m = MsgCalibrateDele func (m *MsgCalibrateDelegationResponse) String() string { return proto.CompactTextString(m) } func (*MsgCalibrateDelegationResponse) ProtoMessage() {} func (*MsgCalibrateDelegationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{29} + return fileDescriptor_9b7e09c9ad51cd54, []int{27} } func (m *MsgCalibrateDelegationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1483,7 +1402,7 @@ func (m *MsgResumeHostZone) Reset() { *m = MsgResumeHostZone{} } func (m *MsgResumeHostZone) String() string { return proto.CompactTextString(m) } func (*MsgResumeHostZone) ProtoMessage() {} func (*MsgResumeHostZone) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{30} + return fileDescriptor_9b7e09c9ad51cd54, []int{28} } func (m *MsgResumeHostZone) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1533,7 +1452,7 @@ func (m *MsgResumeHostZoneResponse) Reset() { *m = MsgResumeHostZoneResp func (m *MsgResumeHostZoneResponse) String() string { return proto.CompactTextString(m) } func (*MsgResumeHostZoneResponse) ProtoMessage() {} func (*MsgResumeHostZoneResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{31} + return fileDescriptor_9b7e09c9ad51cd54, []int{29} } func (m *MsgResumeHostZoneResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1605,7 +1524,7 @@ func (m *MsgCreateTradeRoute) Reset() { *m = MsgCreateTradeRoute{} } func (m *MsgCreateTradeRoute) String() string { return proto.CompactTextString(m) } func (*MsgCreateTradeRoute) ProtoMessage() {} func (*MsgCreateTradeRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{32} + return fileDescriptor_9b7e09c9ad51cd54, []int{30} } func (m *MsgCreateTradeRoute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1739,7 +1658,7 @@ func (m *MsgCreateTradeRouteResponse) Reset() { *m = MsgCreateTradeRoute func (m *MsgCreateTradeRouteResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreateTradeRouteResponse) ProtoMessage() {} func (*MsgCreateTradeRouteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{33} + return fileDescriptor_9b7e09c9ad51cd54, []int{31} } func (m *MsgCreateTradeRouteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1783,7 +1702,7 @@ func (m *MsgDeleteTradeRoute) Reset() { *m = MsgDeleteTradeRoute{} } func (m *MsgDeleteTradeRoute) String() string { return proto.CompactTextString(m) } func (*MsgDeleteTradeRoute) ProtoMessage() {} func (*MsgDeleteTradeRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{34} + return fileDescriptor_9b7e09c9ad51cd54, []int{32} } func (m *MsgDeleteTradeRoute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1840,7 +1759,7 @@ func (m *MsgDeleteTradeRouteResponse) Reset() { *m = MsgDeleteTradeRoute func (m *MsgDeleteTradeRouteResponse) String() string { return proto.CompactTextString(m) } func (*MsgDeleteTradeRouteResponse) ProtoMessage() {} func (*MsgDeleteTradeRouteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{35} + return fileDescriptor_9b7e09c9ad51cd54, []int{33} } func (m *MsgDeleteTradeRouteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1897,7 +1816,7 @@ func (m *MsgUpdateTradeRoute) Reset() { *m = MsgUpdateTradeRoute{} } func (m *MsgUpdateTradeRoute) String() string { return proto.CompactTextString(m) } func (*MsgUpdateTradeRoute) ProtoMessage() {} func (*MsgUpdateTradeRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{36} + return fileDescriptor_9b7e09c9ad51cd54, []int{34} } func (m *MsgUpdateTradeRoute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1968,7 +1887,7 @@ func (m *MsgUpdateTradeRouteResponse) Reset() { *m = MsgUpdateTradeRoute func (m *MsgUpdateTradeRouteResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateTradeRouteResponse) ProtoMessage() {} func (*MsgUpdateTradeRouteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{37} + return fileDescriptor_9b7e09c9ad51cd54, []int{35} } func (m *MsgUpdateTradeRouteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2024,8 +1943,6 @@ func init() { proto.RegisterType((*MsgRestoreInterchainAccountResponse)(nil), "stride.stakeibc.MsgRestoreInterchainAccountResponse") proto.RegisterType((*MsgUpdateValidatorSharesExchRate)(nil), "stride.stakeibc.MsgUpdateValidatorSharesExchRate") proto.RegisterType((*MsgUpdateValidatorSharesExchRateResponse)(nil), "stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse") - proto.RegisterType((*MsgUndelegateHost)(nil), "stride.stakeibc.MsgUndelegateHost") - proto.RegisterType((*MsgUndelegateHostResponse)(nil), "stride.stakeibc.MsgUndelegateHostResponse") proto.RegisterType((*MsgCalibrateDelegation)(nil), "stride.stakeibc.MsgCalibrateDelegation") proto.RegisterType((*MsgCalibrateDelegationResponse)(nil), "stride.stakeibc.MsgCalibrateDelegationResponse") proto.RegisterType((*MsgResumeHostZone)(nil), "stride.stakeibc.MsgResumeHostZone") @@ -2041,136 +1958,134 @@ func init() { func init() { proto.RegisterFile("stride/stakeibc/tx.proto", fileDescriptor_9b7e09c9ad51cd54) } var fileDescriptor_9b7e09c9ad51cd54 = []byte{ - // 2057 bytes of a gzipped FileDescriptorProto + // 2026 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4f, 0x6f, 0x24, 0x47, 0x15, 0xf7, 0xac, 0xbd, 0xf6, 0xf8, 0xd9, 0x5e, 0xdb, 0x6d, 0xaf, 0x77, 0xdc, 0x1b, 0xcf, 0x78, 0xdb, 0x1b, 0x30, 0x4e, 0x3c, 0x83, 0xed, 0x28, 0x80, 0x01, 0x09, 0xff, 0x09, 0x64, 0xc4, 0x3a, - 0x41, 0x6d, 0x27, 0x2b, 0xad, 0x84, 0x9a, 0x9a, 0xee, 0xda, 0x99, 0xd6, 0x76, 0x77, 0x4d, 0xba, - 0x7a, 0xec, 0x59, 0x0e, 0x28, 0x42, 0x42, 0x42, 0x08, 0x24, 0x10, 0x12, 0x27, 0x84, 0x72, 0xe0, - 0x80, 0xe0, 0x12, 0xa1, 0x7c, 0x88, 0x20, 0x24, 0x14, 0xe5, 0x84, 0x38, 0x18, 0xb4, 0x7b, 0x08, - 0x67, 0x7f, 0x02, 0x54, 0x55, 0x3d, 0x35, 0xdd, 0x3d, 0x35, 0x1e, 0xdb, 0x71, 0x56, 0x5c, 0x6c, - 0x57, 0xd5, 0xaf, 0xde, 0xfb, 0xbd, 0x57, 0xef, 0xbd, 0x7a, 0xd5, 0x86, 0x02, 0x8d, 0x42, 0xd7, - 0xc1, 0x15, 0x1a, 0xa1, 0x27, 0xd8, 0xad, 0xd9, 0x95, 0xa8, 0x5d, 0x6e, 0x86, 0x24, 0x22, 0xda, - 0xb4, 0x58, 0x29, 0x77, 0x56, 0xf4, 0x52, 0x16, 0x7a, 0x8c, 0x3c, 0xd7, 0x41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, 0x62, 0x4a, 0x0f, 0xa3, 0xd0, - 0x0d, 0xea, 0xe6, 0xd8, 0x31, 0xf2, 0xd8, 0x0c, 0x8b, 0x80, 0x13, 0xae, 0x95, 0x47, 0xc0, 0x88, - 0x19, 0x8f, 0x0c, 0x03, 0x96, 0xfb, 0xf1, 0x93, 0x46, 0xbc, 0x9f, 0x03, 0xed, 0x80, 0xd6, 0xf7, - 0x31, 0xbb, 0x1d, 0x25, 0xe8, 0x45, 0xd2, 0x37, 0x5e, 0x02, 0xbd, 0x97, 0x81, 0x24, 0xf8, 0xfb, - 0x5c, 0x9c, 0x6e, 0x34, 0x22, 0x21, 0xae, 0x06, 0x11, 0x0e, 0xf9, 0x15, 0xbc, 0x63, 0xdb, 0xf2, - 0xfe, 0xbc, 0xf4, 0xe5, 0xbd, 0x92, 0xbd, 0x5f, 0xc4, 0x75, 0x96, 0xbe, 0x45, 0x56, 0x60, 0x0a, - 0x09, 0x25, 0x16, 0x39, 0x09, 0x64, 0x7e, 0x4d, 0xc6, 0x93, 0x6f, 0xb3, 0x39, 0xe3, 0x65, 0x58, - 0x39, 0x87, 0x9d, 0xb4, 0xe2, 0x3d, 0x7e, 0x14, 0xa2, 0x65, 0x95, 0x36, 0x1e, 0x36, 0x50, 0x88, - 0xe9, 0x1b, 0x6d, 0xbb, 0xc1, 0x4b, 0xd3, 0x95, 0x2c, 0x29, 0x00, 0xf3, 0x23, 0x69, 0xe2, 0xd8, - 0xe1, 0x66, 0x67, 0x68, 0xac, 0xc1, 0xea, 0x20, 0x95, 0x92, 0x5e, 0x8b, 0xf7, 0x82, 0xdd, 0x32, - 0xc1, 0x8a, 0xda, 0x17, 0xdf, 0x51, 0x18, 0x77, 0x79, 0xa5, 0x4c, 0xab, 0x95, 0x9c, 0xea, 0xbc, - 0x34, 0xed, 0x21, 0xcf, 0xad, 0xb1, 0x0b, 0x61, 0x5f, 0x60, 0x5c, 0x12, 0x5c, 0xb7, 0xa3, 0x44, - 0x35, 0x52, 0x28,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 0xbf, 0x28, 0x0e, 0x7d, 0xfa, 0xa2, 0x38, 0xf4, 0x8f, 0x17, 0xc5, 0xa1, 0x47, + 0x9b, 0xb1, 0x06, 0xe3, 0x50, 0x68, 0x5c, 0x7f, 0x80, 0x6a, 0xac, 0x12, 0x75, 0x0b, 0xc7, 0x1b, + 0x6f, 0xc6, 0x3b, 0x06, 0xd1, 0x70, 0xd4, 0x46, 0xc5, 0xbf, 0x29, 0xb7, 0xfe, 0x1b, 0x00, 0x00, + 0xff, 0xff, 0xc9, 0xb1, 0x2e, 0xaf, 0x71, 0x1d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2198,7 +2113,6 @@ type MsgClient interface { UpdateValidatorSharesExchRate(ctx context.Context, in *MsgUpdateValidatorSharesExchRate, opts ...grpc.CallOption) (*MsgUpdateValidatorSharesExchRateResponse, error) CalibrateDelegation(ctx context.Context, in *MsgCalibrateDelegation, opts ...grpc.CallOption) (*MsgCalibrateDelegationResponse, error) ClearBalance(ctx context.Context, in *MsgClearBalance, opts ...grpc.CallOption) (*MsgClearBalanceResponse, error) - UndelegateHost(ctx context.Context, in *MsgUndelegateHost, opts ...grpc.CallOption) (*MsgUndelegateHostResponse, error) UpdateInnerRedemptionRateBounds(ctx context.Context, in *MsgUpdateInnerRedemptionRateBounds, opts ...grpc.CallOption) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) ResumeHostZone(ctx context.Context, in *MsgResumeHostZone, opts ...grpc.CallOption) (*MsgResumeHostZoneResponse, error) CreateTradeRoute(ctx context.Context, in *MsgCreateTradeRoute, opts ...grpc.CallOption) (*MsgCreateTradeRouteResponse, error) @@ -2331,15 +2245,6 @@ func (c *msgClient) ClearBalance(ctx context.Context, in *MsgClearBalance, opts return out, nil } -func (c *msgClient) UndelegateHost(ctx context.Context, in *MsgUndelegateHost, opts ...grpc.CallOption) (*MsgUndelegateHostResponse, error) { - out := new(MsgUndelegateHostResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/UndelegateHost", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) UpdateInnerRedemptionRateBounds(ctx context.Context, in *MsgUpdateInnerRedemptionRateBounds, opts ...grpc.CallOption) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) { out := new(MsgUpdateInnerRedemptionRateBoundsResponse) err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/UpdateInnerRedemptionRateBounds", in, out, opts...) @@ -2400,7 +2305,6 @@ type MsgServer interface { UpdateValidatorSharesExchRate(context.Context, *MsgUpdateValidatorSharesExchRate) (*MsgUpdateValidatorSharesExchRateResponse, error) CalibrateDelegation(context.Context, *MsgCalibrateDelegation) (*MsgCalibrateDelegationResponse, error) ClearBalance(context.Context, *MsgClearBalance) (*MsgClearBalanceResponse, error) - UndelegateHost(context.Context, *MsgUndelegateHost) (*MsgUndelegateHostResponse, error) UpdateInnerRedemptionRateBounds(context.Context, *MsgUpdateInnerRedemptionRateBounds) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) ResumeHostZone(context.Context, *MsgResumeHostZone) (*MsgResumeHostZoneResponse, error) CreateTradeRoute(context.Context, *MsgCreateTradeRoute) (*MsgCreateTradeRouteResponse, error) @@ -2451,9 +2355,6 @@ func (*UnimplementedMsgServer) CalibrateDelegation(ctx context.Context, req *Msg func (*UnimplementedMsgServer) ClearBalance(ctx context.Context, req *MsgClearBalance) (*MsgClearBalanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClearBalance not implemented") } -func (*UnimplementedMsgServer) UndelegateHost(ctx context.Context, req *MsgUndelegateHost) (*MsgUndelegateHostResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UndelegateHost not implemented") -} func (*UnimplementedMsgServer) UpdateInnerRedemptionRateBounds(ctx context.Context, req *MsgUpdateInnerRedemptionRateBounds) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateInnerRedemptionRateBounds not implemented") } @@ -2708,24 +2609,6 @@ func _Msg_ClearBalance_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_UndelegateHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUndelegateHost) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UndelegateHost(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/UndelegateHost", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UndelegateHost(ctx, req.(*MsgUndelegateHost)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_UpdateInnerRedemptionRateBounds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateInnerRedemptionRateBounds) if err := dec(in); err != nil { @@ -2872,10 +2755,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ClearBalance", Handler: _Msg_ClearBalance_Handler, }, - { - MethodName: "UndelegateHost", - Handler: _Msg_UndelegateHost_Handler, - }, { MethodName: "UpdateInnerRedemptionRateBounds", Handler: _Msg_UpdateInnerRedemptionRateBounds_Handler, @@ -3909,69 +3788,6 @@ func (m *MsgUpdateValidatorSharesExchRateResponse) MarshalToSizedBuffer(dAtA []b return len(dAtA) - i, nil } -func (m *MsgUndelegateHost) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUndelegateHost) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUndelegateHost) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUndelegateHostResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUndelegateHostResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUndelegateHostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *MsgCalibrateDelegation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4868,30 +4684,6 @@ func (m *MsgUpdateValidatorSharesExchRateResponse) Size() (n int) { return n } -func (m *MsgUndelegateHost) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUndelegateHostResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *MsgCalibrateDelegation) Size() (n int) { if m == nil { return 0 @@ -8073,172 +7865,6 @@ func (m *MsgUpdateValidatorSharesExchRateResponse) Unmarshal(dAtA []byte) error } return nil } -func (m *MsgUndelegateHost) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUndelegateHost: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUndelegateHost: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUndelegateHostResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUndelegateHostResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUndelegateHostResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *MsgCalibrateDelegation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0