From 82a1e279c818cf7036bb8891fa9ba3ae24ec322b Mon Sep 17 00:00:00 2001 From: vish-stride Date: Mon, 27 Jun 2022 15:33:24 -0400 Subject: [PATCH] address Riley's PR comments --- proto/stakeibc/tx.proto | 2 +- x/stakeibc/keeper/hooks.go | 8 +- x/stakeibc/keeper/host_zone.go | 26 ++-- x/stakeibc/keeper/msg_server_add_validator.go | 2 +- .../msg_server_change_validator_weight.go | 2 +- .../keeper/msg_server_delete_validator.go | 4 +- .../keeper/msg_server_rebalance_validators.go | 4 +- x/stakeibc/keeper/msg_server_submit_tx.go | 2 +- x/stakeibc/keeper/validator_selection.go | 14 +- x/stakeibc/types/message_delete_validator.go | 4 +- x/stakeibc/types/tx.pb.go | 132 +++++++++--------- 11 files changed, 100 insertions(+), 100 deletions(-) diff --git a/proto/stakeibc/tx.proto b/proto/stakeibc/tx.proto index 582ded2cf3..68f931b37e 100644 --- a/proto/stakeibc/tx.proto +++ b/proto/stakeibc/tx.proto @@ -122,7 +122,7 @@ message MsgChangeValidatorWeightResponse { message MsgDeleteValidator { string creator = 1; string hostZone = 2; - string name = 3; + string valAddr = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } message MsgDeleteValidatorResponse { diff --git a/x/stakeibc/keeper/hooks.go b/x/stakeibc/keeper/hooks.go index e8d3be87f6..9bb34f8196 100644 --- a/x/stakeibc/keeper/hooks.go +++ b/x/stakeibc/keeper/hooks.go @@ -141,7 +141,7 @@ func (k Keeper) CreateDepositRecordsForEpoch(ctx sdk.Context, epochNumber int64) func (k Keeper) SetWithdrawalAddress(ctx sdk.Context) { setWithdrawalAddresses := func(ctx sdk.Context, index int64, zoneInfo types.HostZone) error { - k.Logger(ctx).Info(fmt.Sprintf("\tsetting withdrawal addresses on host zones")) + k.Logger(ctx).Info("\tsetting withdrawal addresses on host zones") err := k.SetWithdrawalAddressOnHost(ctx, zoneInfo) if err != nil { k.Logger(ctx).Error(fmt.Sprintf("Did not set withdrawal address to %s on %s", zoneInfo.GetWithdrawalAccount().GetAddress(), zoneInfo.GetChainId())) @@ -167,7 +167,7 @@ func (k Keeper) StakeExistingDepositsOnHostZones(ctx sdk.Context, epochNumber in continue } delegateAccount := hostZone.GetDelegationAccount() - if delegateAccount == nil || delegateAccount.Address == "" { + if delegateAccount == nil || delegateAccount.GetAddress() == "" { k.Logger(ctx).Error("[STAKE] Zone %s is missing a delegation address!", hostZone.ChainId) continue } @@ -221,11 +221,11 @@ func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber continue } delegateAccount := hostZone.GetDelegationAccount() - if delegateAccount == nil || delegateAccount.Address == "" { + if delegateAccount == nil || delegateAccount.GetAddress() == "" { k.Logger(ctx).Error("[TRANSFER] Zone %s is missing a delegation address!", hostZone.ChainId) continue } - delegateAddress := delegateAccount.Address + delegateAddress := delegateAccount.GetAddress() // TODO(TEST-89): Set NewHeight relative to the most recent known gaia height (based on the LC) // TODO(TEST-90): why do we have two gaia LCs? timeoutHeight := clienttypes.NewHeight(0, 1000000) diff --git a/x/stakeibc/keeper/host_zone.go b/x/stakeibc/keeper/host_zone.go index de7fa505e3..fb07a33856 100644 --- a/x/stakeibc/keeper/host_zone.go +++ b/x/stakeibc/keeper/host_zone.go @@ -93,29 +93,29 @@ func (k Keeper) GetAllHostZone(ctx sdk.Context) (list []types.HostZone) { return } -func (k Keeper) AddValidatorToHostZone(ctx sdk.Context, chainId string, val types.Validator) (success bool) { - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - k.Logger(ctx).Error(fmt.Sprintf("HostZone not found %s", chainId)) - return false - } - hostZone.Validators = append(hostZone.Validators, &val) - return true -} - -func (k Keeper) RemoveValidatorFromHostZone(ctx sdk.Context, chainId string, validatorName string) (success bool) { +// func (k Keeper) AddValidatorToHostZone(ctx sdk.Context, chainId string, val types.Validator) (success bool) { +// hostZone, found := k.GetHostZone(ctx, chainId) +// if !found { +// k.Logger(ctx).Error(fmt.Sprintf("HostZone not found %s", chainId)) +// return false +// } +// hostZone.Validators = append(hostZone.Validators, &val) +// return true +// } + +func (k Keeper) RemoveValidatorFromHostZone(ctx sdk.Context, chainId string, validatorAddress string) (success bool) { hostZone, found := k.GetHostZone(ctx, chainId) if !found { k.Logger(ctx).Error(fmt.Sprintf("HostZone not found %s", chainId)) return false } for i, val := range hostZone.Validators { - if val.Name == validatorName { + if val.GetAddress() == validatorAddress { hostZone.Validators = append(hostZone.Validators[:i], hostZone.Validators[i+1:]...) return true } } - k.Logger(ctx).Error(fmt.Sprintf("Validator %s not found on Host Zone %s", validatorName, chainId)) + k.Logger(ctx).Error(fmt.Sprintf("Validator %s not found on Host Zone %s", validatorAddress, chainId)) return false } diff --git a/x/stakeibc/keeper/msg_server_add_validator.go b/x/stakeibc/keeper/msg_server_add_validator.go index 7546a25a1b..a3ac8fcaad 100644 --- a/x/stakeibc/keeper/msg_server_add_validator.go +++ b/x/stakeibc/keeper/msg_server_add_validator.go @@ -19,7 +19,7 @@ func (k msgServer) AddValidator(goCtx context.Context, msg *types.MsgAddValidato validators := hostZone.Validators // check that we don't already have this validator for _, validator := range validators { - if validator.Address == msg.Address { + if validator.GetAddress() == msg.Address { k.Logger(ctx).Info(fmt.Sprintf("Validator address %s already exists on Host Zone %s", msg.Address, msg.HostZone)) return nil, types.ErrValidatorAlreadyExists } diff --git a/x/stakeibc/keeper/msg_server_change_validator_weight.go b/x/stakeibc/keeper/msg_server_change_validator_weight.go index 9e65769825..4e22fd9281 100644 --- a/x/stakeibc/keeper/msg_server_change_validator_weight.go +++ b/x/stakeibc/keeper/msg_server_change_validator_weight.go @@ -18,7 +18,7 @@ func (k msgServer) ChangeValidatorWeight(goCtx context.Context, msg *types.MsgCh } validators := hostZone.Validators for _, validator := range validators { - if validator.Address == msg.ValAddr { + if validator.GetAddress() == msg.ValAddr { validator.Weight = msg.Weight k.SetHostZone(ctx, hostZone) return &types.MsgChangeValidatorWeightResponse{}, nil diff --git a/x/stakeibc/keeper/msg_server_delete_validator.go b/x/stakeibc/keeper/msg_server_delete_validator.go index 5defd2bbaa..6695265cfc 100644 --- a/x/stakeibc/keeper/msg_server_delete_validator.go +++ b/x/stakeibc/keeper/msg_server_delete_validator.go @@ -11,9 +11,9 @@ import ( func (k msgServer) DeleteValidator(goCtx context.Context, msg *types.MsgDeleteValidator) (*types.MsgDeleteValidatorResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - validatorRemoved := k.RemoveValidatorFromHostZone(ctx, msg.HostZone, msg.Name) + validatorRemoved := k.RemoveValidatorFromHostZone(ctx, msg.HostZone, msg.ValAddr) if !validatorRemoved { - k.Logger(ctx).Error(fmt.Sprintf("Validator %s not found in host zone %s", msg.Name, msg.HostZone)) + k.Logger(ctx).Error(fmt.Sprintf("Validator %s not found in host zone %s", msg.ValAddr, msg.HostZone)) return nil, types.ErrValidatorNotFound } diff --git a/x/stakeibc/keeper/msg_server_rebalance_validators.go b/x/stakeibc/keeper/msg_server_rebalance_validators.go index b835850e74..21ef5b12b1 100644 --- a/x/stakeibc/keeper/msg_server_rebalance_validators.go +++ b/x/stakeibc/keeper/msg_server_rebalance_validators.go @@ -82,7 +82,7 @@ func (k msgServer) RebalanceValidators(goCtx context.Context, msg *types.MsgReba } var msgs []sdk.Msg - delegatorAddressStr := hostZone.DelegationAccount.Address + delegatorAddressStr := hostZone.GetDelegationAccount().GetAddress() delegatorAddress := sdk.AccAddress(delegatorAddressStr) for i := 1; i < maxNumRebalance; i++ { @@ -138,7 +138,7 @@ func (k msgServer) RebalanceValidators(goCtx context.Context, msg *types.MsgReba } connectionId := hostZone.GetConnectionId() - err = k.SubmitTxs(ctx, connectionId, msgs, *hostZone.DelegationAccount) + err = k.SubmitTxs(ctx, connectionId, msgs, *hostZone.GetDelegationAccount()) if err != nil { return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "Failed to SubmitTxs for %s, %s, %s", connectionId, hostZone.ChainId, msgs) } diff --git a/x/stakeibc/keeper/msg_server_submit_tx.go b/x/stakeibc/keeper/msg_server_submit_tx.go index 3cfdf67e81..b5392c049d 100644 --- a/x/stakeibc/keeper/msg_server_submit_tx.go +++ b/x/stakeibc/keeper/msg_server_submit_tx.go @@ -151,7 +151,7 @@ func (k Keeper) UpdateWithdrawalBalance(ctx sdk.Context, zoneInfo types.HostZone if withdrawalIca == nil || withdrawalIca.Address == "" { k.Logger(ctx).Error("Zone %s is missing a delegation address!", zoneInfo.ChainId) } - k.Logger(ctx).Info(fmt.Sprintf("\tQuerying withdrawalBalances for %s at %d height", zoneInfo.ChainId)) + k.Logger(ctx).Info(fmt.Sprintf("\tQuerying withdrawalBalances for %s", zoneInfo.ChainId)) _, addr, _ := bech32.DecodeAndConvert(withdrawalIca.GetAddress()) data := bankTypes.CreateAccountBalancesPrefix(addr) diff --git a/x/stakeibc/keeper/validator_selection.go b/x/stakeibc/keeper/validator_selection.go index 4bd745f374..7493c851a2 100644 --- a/x/stakeibc/keeper/validator_selection.go +++ b/x/stakeibc/keeper/validator_selection.go @@ -24,7 +24,7 @@ func (k Keeper) GetValidatorDelegationAmtDifferences(ctx sdk.Context, hostZone t return nil, err } for _, validator := range validators { - delegationDelta[validator.Address] = int64(targetDelegation[validator.Address]) - int64(validator.DelegationAmt) + delegationDelta[validator.GetAddress()] = int64(targetDelegation[validator.GetAddress()]) - int64(validator.DelegationAmt) } return delegationDelta, nil } @@ -38,16 +38,16 @@ func (k Keeper) GetTargetValAmtsForHostZone(ctx sdk.Context, hostZone types.Host k.Logger(ctx).Error(fmt.Sprintf("Cannot calculate target delegation if final amount is 0 %s", hostZone.ChainId)) return nil, types.ErrNoValidatorWeights } - var targetWeight map[string]uint64 + targetWeight := make(map[string]uint64) allocatedAmt := uint64(0) for i, validator := range hostZone.Validators { if i == len(hostZone.Validators)-1 { // for the last element, we need to make sure that the allocatedAmt is equal to the finalDelegation - targetWeight[validator.Address] = finalDelegation - allocatedAmt + targetWeight[validator.GetAddress()] = finalDelegation - allocatedAmt } else { delegateAmt := uint64(float64(validator.Weight*finalDelegation) / float64(totalWeight)) allocatedAmt += delegateAmt - targetWeight[validator.Address] = delegateAmt + targetWeight[validator.GetAddress()] = delegateAmt } } @@ -56,11 +56,11 @@ func (k Keeper) GetTargetValAmtsForHostZone(ctx sdk.Context, hostZone types.Host func (k Keeper) GetTotalValidatorDelegations(ctx sdk.Context, hostZone types.HostZone) uint64 { validators := hostZone.GetValidators() - total_weight := uint64(0) + total_delegation := uint64(0) for _, validator := range validators { - total_weight += validator.DelegationAmt + total_delegation += validator.DelegationAmt } - return total_weight + return total_delegation } func (k Keeper) GetTotalValidatorWeight(ctx sdk.Context, hostZone types.HostZone) uint64 { diff --git a/x/stakeibc/types/message_delete_validator.go b/x/stakeibc/types/message_delete_validator.go index 99c5c70413..74c96e8655 100644 --- a/x/stakeibc/types/message_delete_validator.go +++ b/x/stakeibc/types/message_delete_validator.go @@ -9,11 +9,11 @@ const TypeMsgDeleteValidator = "delete_validator" var _ sdk.Msg = &MsgDeleteValidator{} -func NewMsgDeleteValidator(creator string, hostZone string, name string) *MsgDeleteValidator { +func NewMsgDeleteValidator(creator string, hostZone string, valAddr string) *MsgDeleteValidator { return &MsgDeleteValidator{ Creator: creator, HostZone: hostZone, - Name: name, + ValAddr: valAddr, } } diff --git a/x/stakeibc/types/tx.pb.go b/x/stakeibc/types/tx.pb.go index 2ab6ce76a8..f7458ab364 100644 --- a/x/stakeibc/types/tx.pb.go +++ b/x/stakeibc/types/tx.pb.go @@ -789,7 +789,7 @@ var xxx_messageInfo_MsgChangeValidatorWeightResponse proto.InternalMessageInfo type MsgDeleteValidator struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` HostZone string `protobuf:"bytes,2,opt,name=hostZone,proto3" json:"hostZone,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + ValAddr string `protobuf:"bytes,3,opt,name=valAddr,proto3" json:"valAddr,omitempty"` } func (m *MsgDeleteValidator) Reset() { *m = MsgDeleteValidator{} } @@ -839,9 +839,9 @@ func (m *MsgDeleteValidator) GetHostZone() string { return "" } -func (m *MsgDeleteValidator) GetName() string { +func (m *MsgDeleteValidator) GetValAddr() string { if m != nil { - return m.Name + return m.ValAddr } return "" } @@ -906,65 +906,65 @@ func init() { func init() { proto.RegisterFile("stakeibc/tx.proto", fileDescriptor_e80cdc2de072d1f1) } var fileDescriptor_e80cdc2de072d1f1 = []byte{ - // 921 bytes of a gzipped FileDescriptorProto + // 924 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x6f, 0xdc, 0x44, 0x14, 0x5e, 0x37, 0xdb, 0x64, 0xf3, 0x12, 0xda, 0xc6, 0xd9, 0x14, 0xd7, 0x50, 0x6f, 0x64, 0x21, 0xa8, 0x40, 0xb5, 0xc5, 0xb6, 0x02, 0x29, 0x82, 0xc3, 0x86, 0x1e, 0x8a, 0xd4, 0xe5, 0xe0, 0x20, - 0x90, 0x7a, 0x60, 0x35, 0xb6, 0xa7, 0x5e, 0x0b, 0x7b, 0x26, 0x78, 0x66, 0xdb, 0xac, 0xc4, 0x11, - 0x24, 0x24, 0x2e, 0x1c, 0x38, 0x72, 0xe8, 0x5f, 0x40, 0xe2, 0x2f, 0x20, 0x38, 0x56, 0x9c, 0x38, - 0x45, 0x28, 0xb9, 0x70, 0xce, 0x2f, 0x40, 0x9e, 0xb1, 0x27, 0xf6, 0x66, 0x53, 0x27, 0x8b, 0x7a, - 0xf3, 0x9b, 0xf7, 0xbe, 0xf7, 0x7d, 0x6f, 0xde, 0xdb, 0x37, 0x0b, 0x1b, 0x8c, 0xa3, 0xaf, 0x71, - 0xec, 0x07, 0x2e, 0x3f, 0x70, 0xf6, 0x33, 0xca, 0xa9, 0x6e, 0xee, 0xf1, 0x2c, 0x0e, 0x71, 0x82, - 0x7c, 0xe6, 0x30, 0xf1, 0xe9, 0x94, 0x41, 0x66, 0x37, 0xa2, 0x11, 0x15, 0x61, 0x6e, 0xfe, 0x25, - 0x11, 0xe6, 0xad, 0x88, 0xd2, 0x28, 0xc1, 0xae, 0xb0, 0xfc, 0xc9, 0x13, 0x17, 0x91, 0x69, 0xe9, - 0x0a, 0x28, 0x4b, 0x29, 0x1b, 0x49, 0x8c, 0x34, 0xa4, 0xcb, 0x46, 0x70, 0x6d, 0xc8, 0xa2, 0x47, - 0xf1, 0x37, 0x93, 0x38, 0xdc, 0xcb, 0x09, 0x74, 0x03, 0x56, 0x82, 0x0c, 0x23, 0x4e, 0x33, 0x43, - 0xdb, 0xd6, 0xee, 0xac, 0x7a, 0xa5, 0xa9, 0xdf, 0x84, 0x65, 0x94, 0xd2, 0x09, 0xe1, 0xc6, 0x95, - 0x6d, 0xed, 0xce, 0x92, 0x57, 0x58, 0xfa, 0x6d, 0x80, 0x31, 0x65, 0x7c, 0x14, 0x62, 0x42, 0x53, - 0x63, 0x49, 0x80, 0x56, 0xf3, 0x93, 0x07, 0xf9, 0x81, 0x6d, 0xc0, 0xcd, 0x3a, 0x85, 0x87, 0xd9, - 0x3e, 0x25, 0x0c, 0xdb, 0xdf, 0x69, 0x82, 0xdd, 0xc3, 0x21, 0xc6, 0xe9, 0xa2, 0xec, 0x6f, 0xc1, - 0x35, 0xc6, 0x47, 0x88, 0x31, 0x5c, 0x57, 0xb0, 0xce, 0xf8, 0x20, 0x3f, 0x14, 0x22, 0x74, 0x13, - 0x3a, 0x19, 0x0e, 0x70, 0xfc, 0x14, 0x67, 0x46, 0x5b, 0xf8, 0x95, 0x5d, 0x08, 0xac, 0xa8, 0x50, - 0x02, 0x19, 0xe8, 0xc2, 0x13, 0xc5, 0x8c, 0xe3, 0x6c, 0x10, 0x04, 0x82, 0xb1, 0x0b, 0x57, 0xe9, - 0x33, 0x82, 0x4b, 0x85, 0xd2, 0xd0, 0x3f, 0x86, 0xd7, 0x02, 0x4a, 0x08, 0x0e, 0x78, 0x4c, 0xc9, - 0x28, 0x0e, 0x85, 0xcc, 0xd5, 0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, 0xfe, 0xb2, 0xf8, 0xd3, 0x73, 0xef, 0xbf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xfa, 0xda, 0x32, 0x7d, 0xa3, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1934,10 +1934,10 @@ func (m *MsgDeleteValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + if len(m.ValAddr) > 0 { + i -= len(m.ValAddr) + copy(dAtA[i:], m.ValAddr) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValAddr))) i-- dAtA[i] = 0x1a } @@ -2264,7 +2264,7 @@ func (m *MsgDeleteValidator) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Name) + l = len(m.ValAddr) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -4067,7 +4067,7 @@ func (m *MsgDeleteValidator) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValAddr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4095,7 +4095,7 @@ func (m *MsgDeleteValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.ValAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex