From 2726d1d20366858f1be21ee24e9c4d1a5cff63fc Mon Sep 17 00:00:00 2001 From: TimmyExogenous Date: Tue, 9 Apr 2024 20:55:48 +0800 Subject: [PATCH] fix the problems identified by code review and add a function to get all operators --- proto/exocore/operator/v1/tx.proto | 6 - x/operator/keeper/operator.go | 16 ++- x/operator/keeper/operator_info_test.go | 14 +- x/operator/keeper/opt.go | 6 + x/operator/types/errors.go | 4 + x/operator/types/tx.pb.go | 178 +++++++++--------------- 6 files changed, 100 insertions(+), 124 deletions(-) diff --git a/proto/exocore/operator/v1/tx.proto b/proto/exocore/operator/v1/tx.proto index 1d25c53cf..d8ca11588 100644 --- a/proto/exocore/operator/v1/tx.proto +++ b/proto/exocore/operator/v1/tx.proto @@ -48,12 +48,6 @@ message OperatorInfo { ClientChainEarningAddrList client_chain_earnings_addr = 4; // commission defines the commission parameters. cosmos.staking.v1beta1.Commission commission = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // min_self_delegation is the validator's self declared minimum self delegation. - string min_self_delegation = 6 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; } // OptedInfo is the opted information about operator diff --git a/x/operator/keeper/operator.go b/x/operator/keeper/operator.go index 022092bf6..d5fc80d41 100644 --- a/x/operator/keeper/operator.go +++ b/x/operator/keeper/operator.go @@ -19,13 +19,11 @@ func (k *Keeper) SetOperatorInfo(ctx sdk.Context, addr string, info *operatortyp if err != nil { return errorsmod.Wrap(err, "SetOperatorInfo: error occurred when parse acc address from Bech32") } - // todo: to check the validation of input info store := prefix.NewStore(ctx.KVStore(k.storeKey), operatortypes.KeyPrefixOperatorInfo) // todo: think about the difference between init and update in future // key := common.HexToAddress(incentive.Contract) bz := k.cdc.MustMarshal(info) - store.Set(opAccAddr, bz) return nil } @@ -49,6 +47,20 @@ func (k *Keeper) OperatorInfo(ctx sdk.Context, addr string) (info *operatortypes return &ret, nil } +// AllOperators return the address list of all operators +func (k *Keeper) AllOperators(ctx sdk.Context) []string { + store := prefix.NewStore(ctx.KVStore(k.storeKey), operatortypes.KeyPrefixOperatorInfo) + iterator := sdk.KVStorePrefixIterator(store, nil) + defer iterator.Close() + + ret := make([]string, 0) + for ; iterator.Valid(); iterator.Next() { + accAddr := sdk.AccAddress(iterator.Key()) + ret = append(ret, accAddr.String()) + } + return ret +} + func (k *Keeper) IsOperator(ctx sdk.Context, addr sdk.AccAddress) bool { store := prefix.NewStore(ctx.KVStore(k.storeKey), operatortypes.KeyPrefixOperatorInfo) return store.Has(addr) diff --git a/x/operator/keeper/operator_info_test.go b/x/operator/keeper/operator_info_test.go index 5e435e526..e83e6053c 100644 --- a/x/operator/keeper/operator_info_test.go +++ b/x/operator/keeper/operator_info_test.go @@ -17,8 +17,7 @@ func (suite *OperatorTestSuite) TestOperatorInfo() { {101, "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"}, }, }, - Commission: stakingtypes.NewCommission(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), - MinSelfDelegation: math.NewInt(0), + Commission: stakingtypes.NewCommission(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), } err := suite.App.OperatorKeeper.SetOperatorInfo(suite.Ctx, suite.AccAddress.String(), info) suite.NoError(err) @@ -28,6 +27,17 @@ func (suite *OperatorTestSuite) TestOperatorInfo() { suite.Equal(*info, *getOperatorInfo) } +func (suite *OperatorTestSuite) TestAllOperators() { + suite.prepare() + operators := []string{suite.operatorAddr.String(), suite.AccAddress.String()} + info := &operatortype.OperatorInfo{} + err := suite.App.OperatorKeeper.SetOperatorInfo(suite.Ctx, suite.AccAddress.String(), info) + suite.NoError(err) + + getOperators := suite.App.OperatorKeeper.AllOperators(suite.Ctx) + suite.Equal(operators, getOperators) +} + func (suite *OperatorTestSuite) TestHistoricalOperatorInfo() { height := suite.Ctx.BlockHeight() info := &operatortype.OperatorInfo{ diff --git a/x/operator/keeper/opt.go b/x/operator/keeper/opt.go index 2c67885a7..75c1fd9cf 100644 --- a/x/operator/keeper/opt.go +++ b/x/operator/keeper/opt.go @@ -3,6 +3,8 @@ package keeper import ( "fmt" + "github.com/ethereum/go-ethereum/common" + errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" @@ -87,6 +89,10 @@ func (k *Keeper) UpdateOptedInAssetsState(ctx sdk.Context, stakerID, assetID, op // OptIn call this function to opt in AVS func (k *Keeper) OptIn(ctx sdk.Context, operatorAddress sdk.AccAddress, avsAddr string) error { + // avsAddr should be an evm contract address + if common.IsHexAddress(avsAddr) { + return types.ErrInvalidAvsAddr + } // check optedIn info if k.IsOptedIn(ctx, operatorAddress.String(), avsAddr) { return types.ErrAlreadyOptedIn diff --git a/x/operator/types/errors.go b/x/operator/types/errors.go index d7e4ed12a..b11e8ef2e 100644 --- a/x/operator/types/errors.go +++ b/x/operator/types/errors.go @@ -32,4 +32,8 @@ var ( ErrAlreadyOptingOut = errorsmod.Register( ModuleName, 11, "operator already opting out", ) + + ErrInvalidAvsAddr = errorsmod.Register( + ModuleName, 12, "avs address should be a hex evm contract address", + ) ) diff --git a/x/operator/types/tx.pb.go b/x/operator/types/tx.pb.go index b303ef00b..d61b10486 100644 --- a/x/operator/types/tx.pb.go +++ b/x/operator/types/tx.pb.go @@ -187,8 +187,6 @@ type OperatorInfo struct { ClientChainEarningsAddr *ClientChainEarningAddrList `protobuf:"bytes,4,opt,name=client_chain_earnings_addr,json=clientChainEarningsAddr,proto3" json:"client_chain_earnings_addr,omitempty"` // commission defines the commission parameters. Commission types.Commission `protobuf:"bytes,5,opt,name=commission,proto3" json:"commission"` - // min_self_delegation is the validator's self declared minimum self delegation. - MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation"` } func (m *OperatorInfo) Reset() { *m = OperatorInfo{} } @@ -750,75 +748,73 @@ func init() { func init() { proto.RegisterFile("exocore/operator/v1/tx.proto", fileDescriptor_b229d5663e4df167) } var fileDescriptor_b229d5663e4df167 = []byte{ - // 1078 bytes of a gzipped FileDescriptorProto + // 1047 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xbf, 0x4f, 0x1c, 0xc7, 0x17, 0xbf, 0xe5, 0x00, 0xc3, 0xe3, 0xf0, 0x1d, 0x83, 0x65, 0x8e, 0xfb, 0xfa, 0x7b, 0xc0, 0x3a, 0xb1, 0x30, 0x0a, 0x77, 0x82, 0xc4, 0x91, 0xe2, 0xa4, 0x08, 0x3f, 0x6c, 0xe5, 0x14, 0xc8, 0x45, - 0x83, 0xe5, 0x22, 0x29, 0x56, 0xcb, 0xee, 0xb0, 0x4c, 0xd8, 0xdd, 0x59, 0xef, 0xcc, 0x9d, 0xc1, - 0x52, 0xa4, 0x24, 0x55, 0x14, 0xa5, 0x48, 0x1b, 0x29, 0x85, 0xcb, 0x74, 0xa1, 0x70, 0x93, 0x22, - 0x4a, 0xeb, 0xd2, 0x72, 0x15, 0xa5, 0x40, 0x11, 0x14, 0xe4, 0xcf, 0x88, 0xe6, 0xc7, 0x1e, 0x87, - 0x39, 0x12, 0x13, 0xa7, 0x01, 0xe6, 0xbd, 0xcf, 0xfb, 0xbc, 0xf7, 0x3e, 0xf3, 0xe6, 0xb1, 0x70, - 0x8d, 0xec, 0x32, 0x8f, 0xa5, 0xa4, 0xce, 0x12, 0x92, 0xba, 0x82, 0xa5, 0xf5, 0xf6, 0x42, 0x5d, - 0xec, 0xd6, 0x92, 0x94, 0x09, 0x86, 0xc6, 0x8d, 0xb7, 0x96, 0x79, 0x6b, 0xed, 0x85, 0xca, 0x98, - 0x1b, 0xd1, 0x98, 0xd5, 0xd5, 0x4f, 0x8d, 0xab, 0x4c, 0x78, 0x8c, 0x47, 0x8c, 0xd7, 0x23, 0x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 0x00, 0x00, 0xff, 0xff, 0x07, 0x51, - 0x1b, 0x95, 0x62, 0x0a, 0x00, 0x00, + 0x83, 0xe5, 0x22, 0x29, 0x56, 0xcb, 0xee, 0xb0, 0x4c, 0xb8, 0xdd, 0x59, 0xef, 0xcc, 0x9d, 0xc1, + 0x52, 0xa4, 0x24, 0x55, 0x14, 0xa5, 0x48, 0x1b, 0x29, 0x85, 0xcb, 0x94, 0x14, 0x6e, 0x52, 0x44, + 0x51, 0x3a, 0x97, 0x96, 0xab, 0x28, 0x05, 0x8a, 0xa0, 0x20, 0x7f, 0x46, 0x34, 0x3f, 0xf6, 0x58, + 0xcc, 0x91, 0x18, 0xd9, 0x0d, 0x30, 0xef, 0x7d, 0xde, 0xe7, 0xbd, 0xf7, 0x99, 0xf7, 0x86, 0x85, + 0x6b, 0x64, 0x97, 0x79, 0x2c, 0x21, 0x75, 0x16, 0x93, 0xc4, 0x15, 0x2c, 0xa9, 0x77, 0x16, 0xea, + 0x62, 0xb7, 0x16, 0x27, 0x4c, 0x30, 0x34, 0x6e, 0xbc, 0xb5, 0xd4, 0x5b, 0xeb, 0x2c, 0x54, 0xc6, + 0xdc, 0x90, 0x46, 0xac, 0xae, 0x7e, 0x6a, 0x5c, 0x65, 0xc2, 0x63, 0x3c, 0x64, 0xbc, 0x1e, 0xf2, + 0x40, 0xc6, 0x87, 0x3c, 0x30, 0x8e, 0x37, 0x8c, 0x83, 0x0b, 0x77, 0x87, 0x46, 0xd2, 0xb9, 0x49, + 0x84, 0xbb, 0x90, 0x9e, 0x0d, 0x6a, 0x52, 0xa3, 0x1c, 0x75, 0xaa, 0xeb, 0x83, 0x71, 0x5d, 0x09, + 0x58, 0xc0, 0xb4, 0x5d, 0xfe, 0xa5, 0xad, 0x36, 0x81, 0xd1, 0x55, 0xe2, 0xdd, 0x77, 0x5b, 0x6d, + 0x72, 0x97, 0x92, 0x96, 0x8f, 0xee, 0xc1, 0xa0, 0x1b, 0xb2, 0x76, 0x24, 0xca, 0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 0xe2, 0x9c, 0x88, 0x0d, 0xe1, 0x0a, + 0xf2, 0x4a, 0x5b, 0xd6, 0x88, 0x44, 0x66, 0xcb, 0x1a, 0x91, 0x48, 0xb7, 0x0c, 0x61, 0x18, 0xe8, + 0xc8, 0x4d, 0xd6, 0x13, 0xf1, 0x8a, 0xab, 0xab, 0xa9, 0xec, 0x5f, 0xfa, 0x64, 0xfd, 0xfa, 0xc6, + 0x37, 0xa4, 0x86, 0x17, 0x91, 0xf9, 0x26, 0x94, 0x78, 0x7b, 0x33, 0xa4, 0x42, 0x4a, 0x98, 0xd1, + 0x39, 0x8f, 0x8b, 0x5d, 0xbb, 0xd1, 0x6f, 0x06, 0x0a, 0xa4, 0x23, 0x47, 0x30, 0xa3, 0x72, 0x1e, + 0x8f, 0x28, 0x9b, 0x81, 0xdc, 0x84, 0x52, 0x9c, 0x30, 0x8f, 0x70, 0x7e, 0xc2, 0xd6, 0xaf, 0xd9, + 0xba, 0x76, 0x03, 0xfd, 0x1f, 0x0c, 0x53, 0xee, 0x74, 0x88, 0x60, 0xc4, 0x57, 0x23, 0x36, 0x84, + 0x87, 0x28, 0xbf, 0xaf, 0xce, 0x28, 0x80, 0x92, 0x2e, 0x3e, 0x4e, 0x58, 0xcc, 0x12, 0x21, 0xc7, + 0x70, 0xf0, 0x35, 0x28, 0x56, 0x54, 0xac, 0x9f, 0x76, 0x49, 0xed, 0xdf, 0x2c, 0x18, 0xc7, 0x24, + 0xa0, 0x5c, 0x90, 0x24, 0xd5, 0x10, 0x93, 0x07, 0xe8, 0x7d, 0x28, 0x6c, 0x25, 0x2c, 0x54, 0xeb, + 0x45, 0x38, 0x37, 0x33, 0x50, 0x7e, 0xfe, 0x64, 0xfe, 0x8a, 0xa1, 0x5b, 0xd2, 0x9e, 0x0d, 0x91, + 0xd0, 0x28, 0xc0, 0x23, 0x12, 0x6d, 0x4c, 0xe8, 0x16, 0xf4, 0xab, 0x65, 0xee, 0x53, 0x8b, 0x33, + 0xd3, 0x73,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xa3, 0x7b, 0x0e, 0x7d, 0x6f, 0xc1, 0xe4, 0xb9, 0x9a, 0xa0, + 0x5b, 0x3d, 0x09, 0xff, 0xeb, 0xaa, 0x2a, 0xef, 0x5e, 0x34, 0x2c, 0x2d, 0xa7, 0x32, 0xf0, 0x95, + 0xfc, 0x8f, 0xb1, 0xbc, 0xf6, 0xf4, 0xb0, 0x6a, 0x3d, 0x3b, 0xac, 0x5a, 0x7f, 0x1d, 0x56, 0xad, + 0x1f, 0x8e, 0xaa, 0xb9, 0x67, 0x47, 0xd5, 0xdc, 0x1f, 0x47, 0xd5, 0xdc, 0x67, 0x8b, 0x99, 0x5d, + 0xbf, 0xa3, 0x93, 0x7c, 0x42, 0xc4, 0x43, 0x96, 0xec, 0xd4, 0xd3, 0x2f, 0xba, 0xdd, 0x93, 0x6f, + 0x3a, 0xb5, 0xfb, 0x9b, 0x83, 0xea, 0xe3, 0xe9, 0xed, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xff, + 0x6a, 0xe8, 0x69, 0xf4, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1118,16 +1114,6 @@ func (m *OperatorInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size := m.MinSelfDelegation.Size() - i -= size - if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 { size, err := m.Commission.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1601,8 +1587,6 @@ func (m *OperatorInfo) Size() (n int) { } l = m.Commission.Size() n += 1 + l + sovTx(uint64(l)) - l = m.MinSelfDelegation.Size() - n += 1 + l + sovTx(uint64(l)) return n } @@ -2219,40 +2203,6 @@ func (m *OperatorInfo) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", 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.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:])