From 3df137e98155f7f220435039fd576b72b7561f26 Mon Sep 17 00:00:00 2001 From: trestin Date: Thu, 30 May 2024 09:51:11 +0800 Subject: [PATCH] refactor: rename unbingingepoch to unbondingPeriod --- precompiles/avs/abi.json | 2 +- precompiles/avs/avs.sol | 2 +- precompiles/avs/types.go | 6 +- precompiles/avsTask/task_test.go | 2 +- proto/exocore/avs/tx.proto | 15 +- x/avs/keeper/avs_test.go | 8 +- x/avs/keeper/keeper.go | 8 +- x/avs/keeper/params.go | 2 +- x/avs/types/tx.pb.go | 513 +++++-------------------------- x/dogfood/keeper/unbonding.go | 4 +- 10 files changed, 87 insertions(+), 475 deletions(-) diff --git a/precompiles/avs/abi.json b/precompiles/avs/abi.json index a0e073444..d99e51b43 100644 --- a/precompiles/avs/abi.json +++ b/precompiles/avs/abi.json @@ -33,7 +33,7 @@ }, { "internalType": "uint64", - "name": "unbondingEpochs", + "name": "unbondingPeriod", "type": "uint64" } ], diff --git a/precompiles/avs/avs.sol b/precompiles/avs/avs.sol index 93e1718c7..4737ecb1a 100644 --- a/precompiles/avs/avs.sol +++ b/precompiles/avs/avs.sol @@ -20,7 +20,7 @@ interface IAVSManager { string[] memory assetID, uint64 action, uint64 minimumDelegation, - uint64 unbondingEpochs + uint64 unbondingPeriod ) external returns (bool success); diff --git a/precompiles/avs/types.go b/precompiles/avs/types.go index d492c3a2b..5c9c982aa 100644 --- a/precompiles/avs/types.go +++ b/precompiles/avs/types.go @@ -65,11 +65,11 @@ func (p Precompile) GetAVSParamsFromInputs(_ sdk.Context, args []interface{}) (* } avsParams.MinimumDelegation = minimumDelegation - unbondingEpochs, ok := args[6].(uint64) + unbondingPeriod, ok := args[6].(uint64) if !ok || (action != avstypes.RegisterAction && action != avstypes.DeRegisterAction) { - return nil, xerrors.Errorf(exocmn.ErrContractInputParaOrType, 6, "uint64", unbondingEpochs) + return nil, xerrors.Errorf(exocmn.ErrContractInputParaOrType, 6, "uint64", unbondingPeriod) } - avsParams.UnbondingEpochs = unbondingEpochs + avsParams.UnbondingPeriod = unbondingPeriod return avsParams, nil } diff --git a/precompiles/avsTask/task_test.go b/precompiles/avsTask/task_test.go index fb3387e60..157f9efc9 100644 --- a/precompiles/avsTask/task_test.go +++ b/precompiles/avsTask/task_test.go @@ -54,7 +54,7 @@ func (s *TaskPrecompileTestSuite) TestRunRegTaskinfo() { SlashAddr: slashAddress, AvsOwnerAddress: avsOwnerAddress, AssetId: assetID, - AvsUnbondingEpochs: uint32(7), + AvsUnbondingPeriod: uint32(7), MinimumDelegation: sdk.NewIntFromUint64(10), AvsEpoch: nil, OperatorAddress: nil, diff --git a/proto/exocore/avs/tx.proto b/proto/exocore/avs/tx.proto index 3b0e3f09d..0f9d0e40b 100644 --- a/proto/exocore/avs/tx.proto +++ b/proto/exocore/avs/tx.proto @@ -21,7 +21,7 @@ message AVSInfo { // asset_basic_info is all the basic asset information of the avs. repeated string asset_id = 5; // unbonding duration of avs. - uint32 avs_unbonding_epochs = 6; + uint32 avs_unbonding_period = 6; // the operator minimum delegation amount. string minimum_delegation = 7 [ @@ -34,19 +34,6 @@ message AVSInfo { // registered operator of avs repeated string operator_address = 9; } -// The information of OperatorBindingAVSInfo in opt-in avs -message OperatorBindingAVSInfo { - // name of Operator - string name = 1; - // address of Operator - string operator_address = 2; - // publicKey of Operator - string bls_public_key =3 ; - // reg flag - bool is_registered =4; - // status of operator - string status = 5; -} // EpochInfo defines the message interface containing the relevant informations aboutt // an epoch. diff --git a/x/avs/keeper/avs_test.go b/x/avs/keeper/avs_test.go index 4b9c29c57..54a55824e 100644 --- a/x/avs/keeper/avs_test.go +++ b/x/avs/keeper/avs_test.go @@ -20,7 +20,7 @@ func (suite *AVSTestSuite) TestAVS() { SlashAddr: slashAddress, AvsOwnerAddress: avsOwnerAddress, AssetId: assetID, - AvsUnbondingEpochs: uint32(7), + AvsUnbondingPeriod: uint32(7), MinimumDelegation: sdk.NewIntFromUint64(10), AvsEpoch: nil, OperatorAddress: nil, @@ -48,7 +48,7 @@ func (suite *AVSTestSuite) TestAVSInfoUpdate_Register() { AvsOwnerAddress: avsOwnerAddress, AssetID: assetID, MinimumDelegation: uint64(10), - UnbondingEpochs: uint64(7), + UnbondingPeriod: uint64(7), SlashContractAddr: slashAddress, OperatorAddress: nil, } @@ -79,7 +79,7 @@ func (suite *AVSTestSuite) TestAVSInfoUpdate_DeRegister() { AvsOwnerAddress: avsOwnerAddress, AssetID: assetID, MinimumDelegation: uint64(10), - UnbondingEpochs: uint64(7), + UnbondingPeriod: uint64(7), SlashContractAddr: slashAddress, OperatorAddress: nil, } @@ -147,7 +147,7 @@ func (suite *AVSTestSuite) TestAVSInfoUpdateWithOperator_Register() { AvsOwnerAddress: avsOwnerAddress, AssetID: assetID, MinimumDelegation: uint64(10), - UnbondingEpochs: uint64(7), + UnbondingPeriod: uint64(7), SlashContractAddr: slashAddress, OperatorAddress: nil, } diff --git a/x/avs/keeper/keeper.go b/x/avs/keeper/keeper.go index 6f7832895..8da977403 100644 --- a/x/avs/keeper/keeper.go +++ b/x/avs/keeper/keeper.go @@ -60,8 +60,8 @@ func (k Keeper) AVSInfoUpdate(ctx sdk.Context, params *AVSRegisterOrDeregisterPa SlashAddr: params.SlashContractAddr, AvsOwnerAddress: params.AvsOwnerAddress, AssetId: params.AssetID, - AvsUnbondingEpochs: uint32(params.MinimumDelegation), - MinimumDelegation: sdk.NewIntFromUint64(params.UnbondingEpochs), + MinimumDelegation: sdk.NewIntFromUint64(params.MinimumDelegation), + AvsUnbondingPeriod: uint32(params.UnbondingPeriod), AvsEpoch: nil, OperatorAddress: nil, } @@ -73,8 +73,8 @@ func (k Keeper) AVSInfoUpdate(ctx sdk.Context, params *AVSRegisterOrDeregisterPa return errorsmod.Wrap(types.ErrUnregisterNonExistent, fmt.Sprintf("the error input arg is:%s", avsInfo)) } - //TODO:if avs DeRegisterAction check UnbondingEpochs - // if avsInfo.Info.AvsUnbondingEpochs < currenUnbondingEpoch - regUnbondingEpoch { + //TODO:if avs DeRegisterAction check UnbondingPeriod + // if avsInfo.Info.AvsUnbondingPeriod < currenUnbondingPeriod - regUnbondingPeriod { // return errorsmod.Wrap(err, fmt.Sprintf("not qualified to deregister %s", avsInfo)) //} return k.DeleteAVSInfo(ctx, params.AvsAddress) diff --git a/x/avs/keeper/params.go b/x/avs/keeper/params.go index e33c9f622..ab580215e 100644 --- a/x/avs/keeper/params.go +++ b/x/avs/keeper/params.go @@ -39,7 +39,7 @@ type AVSRegisterOrDeregisterParams struct { AssetID []string MinimumDelegation uint64 - UnbondingEpochs uint64 + UnbondingPeriod uint64 SlashContractAddr string OperatorAddress []string } diff --git a/x/avs/types/tx.pb.go b/x/avs/types/tx.pb.go index 5d902fecc..e55e162d8 100644 --- a/x/avs/types/tx.pb.go +++ b/x/avs/types/tx.pb.go @@ -49,7 +49,7 @@ type AVSInfo struct { // asset_basic_info is all the basic asset information of the avs. AssetId []string `protobuf:"bytes,5,rep,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` // unbonding duration of avs. - AvsUnbondingEpochs uint32 `protobuf:"varint,6,opt,name=avs_unbonding_epochs,json=avsUnbondingEpochs,proto3" json:"avs_unbonding_epochs,omitempty"` + AvsUnbondingPeriod uint32 `protobuf:"varint,6,opt,name=avs_unbonding_period,json=avsUnbondingPeriod,proto3" json:"avs_unbonding_period,omitempty"` // the operator minimum delegation amount. MinimumDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=minimum_delegation,json=minimumDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"minimum_delegation"` //avs epoch ,Subsequently will be handled by the epochs module. @@ -126,9 +126,9 @@ func (m *AVSInfo) GetAssetId() []string { return nil } -func (m *AVSInfo) GetAvsUnbondingEpochs() uint32 { +func (m *AVSInfo) GetAvsUnbondingPeriod() uint32 { if m != nil { - return m.AvsUnbondingEpochs + return m.AvsUnbondingPeriod } return 0 } @@ -147,88 +147,6 @@ func (m *AVSInfo) GetOperatorAddress() []string { return nil } -// The information of OperatorBindingAVSInfo in opt-in avs -type OperatorBindingAVSInfo struct { - // name of Operator - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // address of Operator - OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` - // publicKey of Operator - BlsPublicKey string `protobuf:"bytes,3,opt,name=bls_public_key,json=blsPublicKey,proto3" json:"bls_public_key,omitempty"` - // reg flag - IsRegistered bool `protobuf:"varint,4,opt,name=is_registered,json=isRegistered,proto3" json:"is_registered,omitempty"` - // status of operator - Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` -} - -func (m *OperatorBindingAVSInfo) Reset() { *m = OperatorBindingAVSInfo{} } -func (m *OperatorBindingAVSInfo) String() string { return proto.CompactTextString(m) } -func (*OperatorBindingAVSInfo) ProtoMessage() {} -func (*OperatorBindingAVSInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_c92b5dfe90086a66, []int{1} -} -func (m *OperatorBindingAVSInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OperatorBindingAVSInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OperatorBindingAVSInfo.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 *OperatorBindingAVSInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperatorBindingAVSInfo.Merge(m, src) -} -func (m *OperatorBindingAVSInfo) XXX_Size() int { - return m.Size() -} -func (m *OperatorBindingAVSInfo) XXX_DiscardUnknown() { - xxx_messageInfo_OperatorBindingAVSInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_OperatorBindingAVSInfo proto.InternalMessageInfo - -func (m *OperatorBindingAVSInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *OperatorBindingAVSInfo) GetOperatorAddress() string { - if m != nil { - return m.OperatorAddress - } - return "" -} - -func (m *OperatorBindingAVSInfo) GetBlsPublicKey() string { - if m != nil { - return m.BlsPublicKey - } - return "" -} - -func (m *OperatorBindingAVSInfo) GetIsRegistered() bool { - if m != nil { - return m.IsRegistered - } - return false -} - -func (m *OperatorBindingAVSInfo) GetStatus() string { - if m != nil { - return m.Status - } - return "" -} - // EpochInfo defines the message interface containing the relevant informations aboutt // an epoch. type EpochInfo struct { @@ -252,7 +170,7 @@ func (m *EpochInfo) Reset() { *m = EpochInfo{} } func (m *EpochInfo) String() string { return proto.CompactTextString(m) } func (*EpochInfo) ProtoMessage() {} func (*EpochInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_c92b5dfe90086a66, []int{2} + return fileDescriptor_c92b5dfe90086a66, []int{1} } func (m *EpochInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -342,7 +260,7 @@ func (m *RegisterAVSReq) Reset() { *m = RegisterAVSReq{} } func (m *RegisterAVSReq) String() string { return proto.CompactTextString(m) } func (*RegisterAVSReq) ProtoMessage() {} func (*RegisterAVSReq) Descriptor() ([]byte, []int) { - return fileDescriptor_c92b5dfe90086a66, []int{3} + return fileDescriptor_c92b5dfe90086a66, []int{2} } func (m *RegisterAVSReq) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -397,7 +315,7 @@ func (m *RegisterAVSResponse) Reset() { *m = RegisterAVSResponse{} } func (m *RegisterAVSResponse) String() string { return proto.CompactTextString(m) } func (*RegisterAVSResponse) ProtoMessage() {} func (*RegisterAVSResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c92b5dfe90086a66, []int{4} + return fileDescriptor_c92b5dfe90086a66, []int{3} } func (m *RegisterAVSResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -452,7 +370,7 @@ func (m *DeRegisterAVSReq) Reset() { *m = DeRegisterAVSReq{} } func (m *DeRegisterAVSReq) String() string { return proto.CompactTextString(m) } func (*DeRegisterAVSReq) ProtoMessage() {} func (*DeRegisterAVSReq) Descriptor() ([]byte, []int) { - return fileDescriptor_c92b5dfe90086a66, []int{5} + return fileDescriptor_c92b5dfe90086a66, []int{4} } func (m *DeRegisterAVSReq) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -507,7 +425,7 @@ func (m *DeRegisterAVSResponse) Reset() { *m = DeRegisterAVSResponse{} } func (m *DeRegisterAVSResponse) String() string { return proto.CompactTextString(m) } func (*DeRegisterAVSResponse) ProtoMessage() {} func (*DeRegisterAVSResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c92b5dfe90086a66, []int{6} + return fileDescriptor_c92b5dfe90086a66, []int{5} } func (m *DeRegisterAVSResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -552,7 +470,6 @@ func (m *DeRegisterAVSResponse) GetInfo() *AVSInfo { func init() { proto.RegisterType((*AVSInfo)(nil), "exocore.avs.AVSInfo") - proto.RegisterType((*OperatorBindingAVSInfo)(nil), "exocore.avs.OperatorBindingAVSInfo") proto.RegisterType((*EpochInfo)(nil), "exocore.avs.EpochInfo") proto.RegisterType((*RegisterAVSReq)(nil), "exocore.avs.RegisterAVSReq") proto.RegisterType((*RegisterAVSResponse)(nil), "exocore.avs.RegisterAVSResponse") @@ -563,65 +480,60 @@ func init() { func init() { proto.RegisterFile("exocore/avs/tx.proto", fileDescriptor_c92b5dfe90086a66) } var fileDescriptor_c92b5dfe90086a66 = []byte{ - // 919 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x62, 0x27, 0xb1, 0x9f, 0x93, 0x36, 0x19, 0xdc, 0x74, 0x63, 0x14, 0xaf, 0xb5, 0x20, - 0x64, 0x02, 0xd9, 0xa5, 0x29, 0xa7, 0x96, 0x4b, 0x4c, 0x0a, 0x44, 0xfc, 0x28, 0x5a, 0x43, 0x85,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f, 0xe5, 0xc2, 0x86, 0x34, 0x61, 0xf8, - 0xe2, 0x12, 0xfa, 0xd9, 0x80, 0xb5, 0x7d, 0xfc, 0xaa, 0xd8, 0x73, 0x6c, 0xc0, 0x95, 0x73, 0xd9, - 0x5c, 0xb0, 0x41, 0xbb, 0xbf, 0x1b, 0x50, 0xf8, 0x82, 0x45, 0xe8, 0x73, 0xa8, 0xcc, 0xe4, 0x85, - 0xde, 0x98, 0x13, 0x99, 0xf7, 0xaf, 0xd6, 0x78, 0x31, 0xa9, 0xcb, 0xf1, 0x60, 0x75, 0xae, 0x4e, - 0xb4, 0x35, 0xb7, 0xe5, 0x7c, 0x47, 0x6a, 0xf6, 0xcb, 0x68, 0xa5, 0x59, 0x5b, 0xbc, 0xf7, 0xe4, - 0xfe, 0xb6, 0xd1, 0xfa, 0xe4, 0xe1, 0x49, 0xdd, 0x78, 0x74, 0x52, 0x37, 0xfe, 0x39, 0xa9, 0x1b, - 0xc7, 0xa7, 0xf5, 0x85, 0x47, 0xa7, 0xf5, 0x85, 0x3f, 0x4f, 0xeb, 0x0b, 0xdf, 0xed, 0xcc, 0xbc, - 0x7b, 0x6e, 0x29, 0xb9, 0x2f, 0x31, 0xbf, 0x4b, 0xd3, 0x43, 0x37, 0xff, 0x80, 0x38, 0x52, 0x9f, - 0x10, 0xe2, 0x35, 0xd4, 0x59, 0x92, 0x7f, 0x01, 0xd7, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xc2, - 0x5b, 0x6d, 0x0f, 0x5e, 0x08, 0x00, 0x00, + // 842 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0x60, 0xa7, 0xb1, 0x9f, 0x1b, 0x9a, 0x0c, 0x6e, 0xbb, 0x31, 0x8a, 0xd7, 0x32, 0x12, + 0x32, 0x81, 0xec, 0xd2, 0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df, 0x60, 0xcb, 0x59, + 0x5b, 0xbe, 0xff, 0xf4, 0xc1, 0x16, 0x6a, 0x7f, 0xf4, 0xe8, 0xb4, 0x8e, 0x1e, 0x9f, 0xd6, 0xd1, + 0x9f, 0xa7, 0x75, 0x74, 0x72, 0x56, 0x5f, 0x7a, 0x7c, 0x56, 0x5f, 0xfa, 0xed, 0xac, 0xbe, 0xf4, + 0xcd, 0xf6, 0xdc, 0xf5, 0x7d, 0xc7, 0xd2, 0x7d, 0x46, 0xd5, 0x3d, 0x91, 0x1d, 0x86, 0xf9, 0x3f, + 0xf8, 0xc8, 0xfe, 0x85, 0xf5, 0x4d, 0x7e, 0x70, 0xc9, 0x5c, 0x01, 0x37, 0xff, 0x0e, 0x00, 0x00, + 0xff, 0xff, 0x9d, 0x07, 0x10, 0x9c, 0xa1, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -795,8 +707,8 @@ func (m *AVSInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x3a - if m.AvsUnbondingEpochs != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.AvsUnbondingEpochs)) + if m.AvsUnbondingPeriod != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.AvsUnbondingPeriod)) i-- dAtA[i] = 0x30 } @@ -842,67 +754,6 @@ func (m *AVSInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *OperatorBindingAVSInfo) 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 *OperatorBindingAVSInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OperatorBindingAVSInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Status) > 0 { - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintTx(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x2a - } - if m.IsRegistered { - i-- - if m.IsRegistered { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.BlsPublicKey) > 0 { - i -= len(m.BlsPublicKey) - copy(dAtA[i:], m.BlsPublicKey) - i = encodeVarintTx(dAtA, i, uint64(len(m.BlsPublicKey))) - i-- - dAtA[i] = 0x1a - } - if len(m.OperatorAddress) > 0 { - i -= len(m.OperatorAddress) - copy(dAtA[i:], m.OperatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *EpochInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1186,8 +1037,8 @@ func (m *AVSInfo) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } - if m.AvsUnbondingEpochs != 0 { - n += 1 + sovTx(uint64(m.AvsUnbondingEpochs)) + if m.AvsUnbondingPeriod != 0 { + n += 1 + sovTx(uint64(m.AvsUnbondingPeriod)) } l = m.MinimumDelegation.Size() n += 1 + l + sovTx(uint64(l)) @@ -1204,34 +1055,6 @@ func (m *AVSInfo) Size() (n int) { return n } -func (m *OperatorBindingAVSInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.OperatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.BlsPublicKey) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.IsRegistered { - n += 2 - } - l = len(m.Status) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - func (m *EpochInfo) Size() (n int) { if m == nil { return 0 @@ -1525,9 +1348,9 @@ func (m *AVSInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AvsUnbondingEpochs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AvsUnbondingPeriod", wireType) } - m.AvsUnbondingEpochs = 0 + m.AvsUnbondingPeriod = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1537,7 +1360,7 @@ func (m *AVSInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AvsUnbondingEpochs |= uint32(b&0x7F) << shift + m.AvsUnbondingPeriod |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1665,204 +1488,6 @@ func (m *AVSInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *OperatorBindingAVSInfo) 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: OperatorBindingAVSInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OperatorBindingAVSInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", 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.OperatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlsPublicKey", 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.BlsPublicKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsRegistered", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsRegistered = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", 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.Status = string(dAtA[iNdEx:postIndex]) - 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 *EpochInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/dogfood/keeper/unbonding.go b/x/dogfood/keeper/unbonding.go index a4c7c60a7..204a0f156 100644 --- a/x/dogfood/keeper/unbonding.go +++ b/x/dogfood/keeper/unbonding.go @@ -44,7 +44,7 @@ func (k Keeper) SetUnbondingInformation( func (k Keeper) GetUnbondingCompletionEpoch( ctx sdk.Context, ) int64 { - unbondingEpochs := k.GetEpochsUntilUnbonded(ctx) + unbondingPeriod := k.GetEpochsUntilUnbonded(ctx) epochInfo, _ := k.epochsKeeper.GetEpochInfo( ctx, k.GetEpochIdentifier(ctx), ) @@ -52,7 +52,7 @@ func (k Keeper) GetUnbondingCompletionEpoch( // goes into effect at the beginning of epoch 6. the information // should be held for 7 epochs, so it should be deleted at the // beginning of epoch 13 or the end of epoch 12. - return epochInfo.CurrentEpoch + int64(unbondingEpochs) // #nosec G701 + return epochInfo.CurrentEpoch + int64(unbondingPeriod) // #nosec G701 } // AppendUndelegationsToMature stores that the undelegation with recordKey should be