From d5af49b3e502a66e648e3997b3ebf1d50227e2a8 Mon Sep 17 00:00:00 2001 From: InChul <49394875+inchori@users.noreply.github.com> Date: Wed, 6 Apr 2022 18:39:32 +0900 Subject: [PATCH] feat: Update Registered Data Validator (#296) --- go.mod | 2 +- proto/panacea/datapool/v2/tx.proto | 14 + x/datapool/client/cli/queryPool.go | 3 +- x/datapool/client/cli/tx.go | 1 + x/datapool/client/cli/txPool.go | 25 ++ x/datapool/handler.go | 3 + x/datapool/keeper/msg_server_pool.go | 15 + x/datapool/keeper/pool.go | 18 +- x/datapool/keeper/pool_test.go | 34 +- x/datapool/types/codec.go | 2 + x/datapool/types/message_pool.go | 42 +++ x/datapool/types/tx.pb.go | 511 +++++++++++++++++++++++---- 12 files changed, 602 insertions(+), 68 deletions(-) diff --git a/go.mod b/go.mod index 78f6f999..9f1a46c5 100644 --- a/go.mod +++ b/go.mod @@ -36,4 +36,4 @@ require ( replace google.golang.org/grpc => google.golang.org/grpc v1.33.2 -replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 +replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 \ No newline at end of file diff --git a/proto/panacea/datapool/v2/tx.proto b/proto/panacea/datapool/v2/tx.proto index 382488f1..a3af3acc 100644 --- a/proto/panacea/datapool/v2/tx.proto +++ b/proto/panacea/datapool/v2/tx.proto @@ -15,6 +15,9 @@ service Msg { // RegisterDataValidator defines a method for registration of data validator. rpc RegisterDataValidator(MsgRegisterDataValidator) returns (MsgRegisterDataValidatorResponse); + // UpdateDataValidator defines a method for updating of data validator. + rpc UpdateDataValidator(MsgUpdateDataValidator) returns (MsgUpdateDataValidatorResponse); + // CreatePool defines a method for creating data pool. rpc CreatePool(MsgCreatePool) returns (MsgCreatePoolResponse); @@ -43,6 +46,17 @@ message MsgRegisterDataValidator { message MsgRegisterDataValidatorResponse { } +// MsgUpdateDataValidator defines the Msg/UpdateDataValidator request type. +message MsgUpdateDataValidator { + string data_validator = 1; + string endpoint = 2; +} + +// MsgUpdateResponse defines the Msg/UpdateDataValidator response type. +message MsgUpdateDataValidatorResponse { + +} + // MsgCreatePool defines the Msg/CreatePool request type. message MsgCreatePool { string curator = 1; // 'panacea1' address diff --git a/x/datapool/client/cli/queryPool.go b/x/datapool/client/cli/queryPool.go index 9c069059..c7ba29a7 100644 --- a/x/datapool/client/cli/queryPool.go +++ b/x/datapool/client/cli/queryPool.go @@ -1,11 +1,12 @@ package cli import ( + "strconv" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/medibloc/panacea-core/v2/x/datapool/types" "github.com/spf13/cobra" - "strconv" ) func CmdGetDataValidator() *cobra.Command { diff --git a/x/datapool/client/cli/tx.go b/x/datapool/client/cli/tx.go index d7169c02..4488df70 100644 --- a/x/datapool/client/cli/tx.go +++ b/x/datapool/client/cli/tx.go @@ -21,6 +21,7 @@ func GetTxCmd() *cobra.Command { } cmd.AddCommand(CmdRegisterDataValidator()) + cmd.AddCommand(CmdUpdateDataValidator()) cmd.AddCommand(CmdCreatePool()) cmd.AddCommand(CmdRegisterNFTContract()) cmd.AddCommand(CmdUpgradeNFTContract()) diff --git a/x/datapool/client/cli/txPool.go b/x/datapool/client/cli/txPool.go index f2148c31..664e9975 100644 --- a/x/datapool/client/cli/txPool.go +++ b/x/datapool/client/cli/txPool.go @@ -42,6 +42,31 @@ func CmdRegisterDataValidator() *cobra.Command { return cmd } +func CmdUpdateDataValidator() *cobra.Command { + cmd := &cobra.Command{ + Use: "update-data-validator [endpoint URL]", + Short: "update data validator endpoint", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return nil + } + + fromAddress := clientCtx.GetFromAddress() + + msg := types.NewMsgUpdateDataValidator(fromAddress.String(), args[0]) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + func CmdCreatePool() *cobra.Command { cmd := &cobra.Command{ Use: "create-pool [pool params file]", diff --git a/x/datapool/handler.go b/x/datapool/handler.go index 680a5306..3c5be484 100644 --- a/x/datapool/handler.go +++ b/x/datapool/handler.go @@ -21,6 +21,9 @@ func NewHandler(k keeper.Keeper) sdk.Handler { case *types.MsgRegisterDataValidator: res, err := msgServer.RegisterDataValidator(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgUpdateDataValidator: + res, err := msgServer.UpdateDataValidator(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) case *types.MsgCreatePool: res, err := msgServer.CreatePool(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) diff --git a/x/datapool/keeper/msg_server_pool.go b/x/datapool/keeper/msg_server_pool.go index ea013c11..7e7b4551 100644 --- a/x/datapool/keeper/msg_server_pool.go +++ b/x/datapool/keeper/msg_server_pool.go @@ -24,6 +24,21 @@ func (m msgServer) RegisterDataValidator(goCtx context.Context, msg *types.MsgRe return &types.MsgRegisterDataValidatorResponse{}, nil } +func (m msgServer) UpdateDataValidator(goCtx context.Context, msg *types.MsgUpdateDataValidator) (*types.MsgUpdateDataValidatorResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + address, err := sdk.AccAddressFromBech32(msg.DataValidator) + if err != nil { + return nil, err + } + + err = m.Keeper.UpdateDataValidator(ctx, address, msg.Endpoint) + if err != nil { + return nil, err + } + return &types.MsgUpdateDataValidatorResponse{}, nil +} + func (m msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) (*types.MsgCreatePoolResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/x/datapool/keeper/pool.go b/x/datapool/keeper/pool.go index 14b0a78d..d733eb05 100644 --- a/x/datapool/keeper/pool.go +++ b/x/datapool/keeper/pool.go @@ -78,6 +78,22 @@ func (k Keeper) IsRegisteredDataValidator(ctx sdk.Context, dataValidatorAddress return store.Has(dataValidatorKey) } +func (k Keeper) UpdateDataValidator(ctx sdk.Context, address sdk.AccAddress, endpoint string) error { + validator, err := k.GetDataValidator(ctx, address) + if err != nil { + return err + } + + validator.Endpoint = endpoint + + err = k.SetDataValidator(ctx, validator) + if err != nil { + return err + } + + return nil +} + func (k Keeper) CreatePool(ctx sdk.Context, curator sdk.AccAddress, poolParams types.PoolParams) (uint64, error) { // Get the next pool id poolID := k.GetNextPoolNumberAndIncrement(ctx) @@ -187,7 +203,7 @@ func (k Keeper) GetPool(ctx sdk.Context, poolID uint64) (*types.Pool, error) { poolKey := types.GetKeyPrefixPools(poolID) bz := store.Get(poolKey) if bz == nil { - return nil, types.ErrPoolNotFound + return nil, types.ErrPoolNotFound } pool := &types.Pool{} k.cdc.MustUnmarshalBinaryLengthPrefixed(bz, pool) diff --git a/x/datapool/keeper/pool_test.go b/x/datapool/keeper/pool_test.go index dc00305b..17215fd3 100644 --- a/x/datapool/keeper/pool_test.go +++ b/x/datapool/keeper/pool_test.go @@ -95,7 +95,7 @@ func (suite *poolTestSuite) TestIsDataValidatorDuplicate() { suite.Require().Error(err, types.ErrDataValidatorAlreadyExist) } -func (suite *poolTestSuite) TestNotGetPubkey() { +func (suite *poolTestSuite) TestNotGetPubKey() { err := suite.BankKeeper.AddCoins(suite.Ctx, dataVal1, fundForDataVal) suite.Require().NoError(err) @@ -108,6 +108,38 @@ func (suite *poolTestSuite) TestNotGetPubkey() { suite.Require().Error(err, sdkerrors.ErrKeyNotFound) } +func (suite *poolTestSuite) TestUpdateDataValidator() { + err := suite.BankKeeper.AddCoins(suite.Ctx, dataVal1, fundForDataVal) + suite.Require().NoError(err) + + validatorAccount := suite.AccountKeeper.NewAccountWithAddress(suite.Ctx, dataVal1) + err = validatorAccount.SetPubKey(pubKey) + suite.Require().NoError(err) + suite.AccountKeeper.SetAccount(suite.Ctx, validatorAccount) + + tempDataValidator := types.DataValidator{ + Address: dataVal1.String(), + Endpoint: "https://my-validator.org", + } + + err = suite.DataPoolKeeper.RegisterDataValidator(suite.Ctx, tempDataValidator) + suite.Require().NoError(err) + + updateTempDataValidator := types.DataValidator{ + Address: dataVal1.String(), + Endpoint: "https://update-my-validator.org", + } + + err = suite.DataPoolKeeper.UpdateDataValidator(suite.Ctx, dataVal1, updateTempDataValidator.Endpoint) + suite.Require().NoError(err) + + getDataValidator, err := suite.DataPoolKeeper.GetDataValidator(suite.Ctx, dataVal1) + suite.Require().NoError(err) + + suite.Require().Equal(getDataValidator.GetAddress(), updateTempDataValidator.GetAddress()) + suite.Require().Equal(getDataValidator.GetEndpoint(), updateTempDataValidator.GetEndpoint()) +} + func (suite *poolTestSuite) TestGetPool() { poolID := uint64(1) nftPrice := sdk.NewCoin(assets.MicroMedDenom, sdk.NewInt(1000000)) diff --git a/x/datapool/types/codec.go b/x/datapool/types/codec.go index c041c2f0..8b859d1b 100644 --- a/x/datapool/types/codec.go +++ b/x/datapool/types/codec.go @@ -11,6 +11,7 @@ import ( func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgRegisterDataValidator{}, "datapool/RegisterDataValidator", nil) + cdc.RegisterConcrete(&MsgUpdateDataValidator{}, "datapool/UpdateDataValidator", nil) cdc.RegisterConcrete(&MsgCreatePool{}, "datapool/CreatePool", nil) cdc.RegisterConcrete(&MsgSellData{}, "datapool/SellData", nil) cdc.RegisterConcrete(&MsgBuyDataAccessNFT{}, "datapool/BuyDataAccessNFT", nil) @@ -22,6 +23,7 @@ func RegisterCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgRegisterDataValidator{}, + &MsgUpdateDataValidator{}, &MsgCreatePool{}, &MsgSellData{}, &MsgBuyDataAccessNFT{}, diff --git a/x/datapool/types/message_pool.go b/x/datapool/types/message_pool.go index ef6dc82c..e7ba3ba7 100644 --- a/x/datapool/types/message_pool.go +++ b/x/datapool/types/message_pool.go @@ -46,6 +46,48 @@ func (msg *MsgRegisterDataValidator) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{dataValidator} } +var _ sdk.Msg = &MsgUpdateDataValidator{} + +func NewMsgUpdateDataValidator(address, endpoint string) *MsgUpdateDataValidator { + return &MsgUpdateDataValidator{ + DataValidator: address, + Endpoint: endpoint, + } +} + +func (msg *MsgUpdateDataValidator) Route() string { + return RouterKey +} + +func (msg *MsgUpdateDataValidator) Type() string { + return "UpdateDataValidator" +} + +func (msg *MsgUpdateDataValidator) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.DataValidator) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid data validator address (%s)", err) + } + + if msg.Endpoint == "" { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "empty data validator endpoint URL") + } + return nil +} + +func (msg *MsgUpdateDataValidator) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgUpdateDataValidator) GetSigners() []sdk.AccAddress { + dataValidator, err := sdk.AccAddressFromBech32(msg.DataValidator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{dataValidator} +} + var _ sdk.Msg = &MsgCreatePool{} func NewMsgCreatePool(poolParams *PoolParams, curator string) *MsgCreatePool { diff --git a/x/datapool/types/tx.pb.go b/x/datapool/types/tx.pb.go index b651da3b..12c1a0a0 100644 --- a/x/datapool/types/tx.pb.go +++ b/x/datapool/types/tx.pb.go @@ -112,6 +112,96 @@ func (m *MsgRegisterDataValidatorResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterDataValidatorResponse proto.InternalMessageInfo +// MsgUpdateDataValidator defines the Msg/UpdateDataValidator request type. +type MsgUpdateDataValidator struct { + DataValidator string `protobuf:"bytes,1,opt,name=data_validator,json=dataValidator,proto3" json:"data_validator,omitempty"` + Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` +} + +func (m *MsgUpdateDataValidator) Reset() { *m = MsgUpdateDataValidator{} } +func (m *MsgUpdateDataValidator) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDataValidator) ProtoMessage() {} +func (*MsgUpdateDataValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_eb3d400cb0e531d6, []int{2} +} +func (m *MsgUpdateDataValidator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDataValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDataValidator.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 *MsgUpdateDataValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDataValidator.Merge(m, src) +} +func (m *MsgUpdateDataValidator) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDataValidator) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDataValidator.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDataValidator proto.InternalMessageInfo + +func (m *MsgUpdateDataValidator) GetDataValidator() string { + if m != nil { + return m.DataValidator + } + return "" +} + +func (m *MsgUpdateDataValidator) GetEndpoint() string { + if m != nil { + return m.Endpoint + } + return "" +} + +// MsgUpdateResponse defines the Msg/UpdateDataValidator response type. +type MsgUpdateDataValidatorResponse struct { +} + +func (m *MsgUpdateDataValidatorResponse) Reset() { *m = MsgUpdateDataValidatorResponse{} } +func (m *MsgUpdateDataValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDataValidatorResponse) ProtoMessage() {} +func (*MsgUpdateDataValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_eb3d400cb0e531d6, []int{3} +} +func (m *MsgUpdateDataValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDataValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDataValidatorResponse.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 *MsgUpdateDataValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDataValidatorResponse.Merge(m, src) +} +func (m *MsgUpdateDataValidatorResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDataValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDataValidatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDataValidatorResponse proto.InternalMessageInfo + // MsgCreatePool defines the Msg/CreatePool request type. type MsgCreatePool struct { Curator string `protobuf:"bytes,1,opt,name=curator,proto3" json:"curator,omitempty"` @@ -122,7 +212,7 @@ func (m *MsgCreatePool) Reset() { *m = MsgCreatePool{} } func (m *MsgCreatePool) String() string { return proto.CompactTextString(m) } func (*MsgCreatePool) ProtoMessage() {} func (*MsgCreatePool) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{2} + return fileDescriptor_eb3d400cb0e531d6, []int{4} } func (m *MsgCreatePool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -176,7 +266,7 @@ func (m *MsgCreatePoolResponse) Reset() { *m = MsgCreatePoolResponse{} } func (m *MsgCreatePoolResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreatePoolResponse) ProtoMessage() {} func (*MsgCreatePoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{3} + return fileDescriptor_eb3d400cb0e531d6, []int{5} } func (m *MsgCreatePoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -236,7 +326,7 @@ func (m *MsgSellData) Reset() { *m = MsgSellData{} } func (m *MsgSellData) String() string { return proto.CompactTextString(m) } func (*MsgSellData) ProtoMessage() {} func (*MsgSellData) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{4} + return fileDescriptor_eb3d400cb0e531d6, []int{6} } func (m *MsgSellData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -288,7 +378,7 @@ func (m *MsgSellDataResponse) Reset() { *m = MsgSellDataResponse{} } func (m *MsgSellDataResponse) String() string { return proto.CompactTextString(m) } func (*MsgSellDataResponse) ProtoMessage() {} func (*MsgSellDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{5} + return fileDescriptor_eb3d400cb0e531d6, []int{7} } func (m *MsgSellDataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -336,7 +426,7 @@ func (m *MsgBuyDataAccessNFT) Reset() { *m = MsgBuyDataAccessNFT{} } func (m *MsgBuyDataAccessNFT) String() string { return proto.CompactTextString(m) } func (*MsgBuyDataAccessNFT) ProtoMessage() {} func (*MsgBuyDataAccessNFT) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{6} + return fileDescriptor_eb3d400cb0e531d6, []int{8} } func (m *MsgBuyDataAccessNFT) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -404,7 +494,7 @@ func (m *MsgBuyDataAccessNFTResponse) Reset() { *m = MsgBuyDataAccessNFT func (m *MsgBuyDataAccessNFTResponse) String() string { return proto.CompactTextString(m) } func (*MsgBuyDataAccessNFTResponse) ProtoMessage() {} func (*MsgBuyDataAccessNFTResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{7} + return fileDescriptor_eb3d400cb0e531d6, []int{9} } func (m *MsgBuyDataAccessNFTResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,7 +556,7 @@ func (m *MsgRedeemDataAccessNFT) Reset() { *m = MsgRedeemDataAccessNFT{} func (m *MsgRedeemDataAccessNFT) String() string { return proto.CompactTextString(m) } func (*MsgRedeemDataAccessNFT) ProtoMessage() {} func (*MsgRedeemDataAccessNFT) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{8} + return fileDescriptor_eb3d400cb0e531d6, []int{10} } func (m *MsgRedeemDataAccessNFT) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -532,7 +622,7 @@ func (m *MsgRedeemDataAccessNFTResponse) Reset() { *m = MsgRedeemDataAcc func (m *MsgRedeemDataAccessNFTResponse) String() string { return proto.CompactTextString(m) } func (*MsgRedeemDataAccessNFTResponse) ProtoMessage() {} func (*MsgRedeemDataAccessNFTResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{9} + return fileDescriptor_eb3d400cb0e531d6, []int{11} } func (m *MsgRedeemDataAccessNFTResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +668,7 @@ func (m *MsgRegisterNFTContract) Reset() { *m = MsgRegisterNFTContract{} func (m *MsgRegisterNFTContract) String() string { return proto.CompactTextString(m) } func (*MsgRegisterNFTContract) ProtoMessage() {} func (*MsgRegisterNFTContract) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{10} + return fileDescriptor_eb3d400cb0e531d6, []int{12} } func (m *MsgRegisterNFTContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -629,7 +719,7 @@ func (m *MsgRegisterNFTContractResponse) Reset() { *m = MsgRegisterNFTCo func (m *MsgRegisterNFTContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterNFTContractResponse) ProtoMessage() {} func (*MsgRegisterNFTContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{11} + return fileDescriptor_eb3d400cb0e531d6, []int{13} } func (m *MsgRegisterNFTContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +758,7 @@ func (m *MsgUpgradeNFTContract) Reset() { *m = MsgUpgradeNFTContract{} } func (m *MsgUpgradeNFTContract) String() string { return proto.CompactTextString(m) } func (*MsgUpgradeNFTContract) ProtoMessage() {} func (*MsgUpgradeNFTContract) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{12} + return fileDescriptor_eb3d400cb0e531d6, []int{14} } func (m *MsgUpgradeNFTContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -719,7 +809,7 @@ func (m *MsgUpgradeNFTContractResponse) Reset() { *m = MsgUpgradeNFTCont func (m *MsgUpgradeNFTContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpgradeNFTContractResponse) ProtoMessage() {} func (*MsgUpgradeNFTContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_eb3d400cb0e531d6, []int{13} + return fileDescriptor_eb3d400cb0e531d6, []int{15} } func (m *MsgUpgradeNFTContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -751,6 +841,8 @@ var xxx_messageInfo_MsgUpgradeNFTContractResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgRegisterDataValidator)(nil), "panacea.datapool.v2.MsgRegisterDataValidator") proto.RegisterType((*MsgRegisterDataValidatorResponse)(nil), "panacea.datapool.v2.MsgRegisterDataValidatorResponse") + proto.RegisterType((*MsgUpdateDataValidator)(nil), "panacea.datapool.v2.MsgUpdateDataValidator") + proto.RegisterType((*MsgUpdateDataValidatorResponse)(nil), "panacea.datapool.v2.MsgUpdateDataValidatorResponse") proto.RegisterType((*MsgCreatePool)(nil), "panacea.datapool.v2.MsgCreatePool") proto.RegisterType((*MsgCreatePoolResponse)(nil), "panacea.datapool.v2.MsgCreatePoolResponse") proto.RegisterType((*MsgSellData)(nil), "panacea.datapool.v2.MsgSellData") @@ -768,58 +860,61 @@ func init() { func init() { proto.RegisterFile("panacea/datapool/v2/tx.proto", fileDescriptor_eb3d400cb0e531d6) } var fileDescriptor_eb3d400cb0e531d6 = []byte{ - // 806 bytes of a gzipped FileDescriptorProto -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0xf5, 0xec, 0x87, 0xbf, 0xae, 0x9d, - 0xc6, 0xbb, 0x6b, 0xa7, 0xf1, 0xcf, 0xb5, 0xd3, 0xf8, 0xe3, 0xc6, 0xd9, 0x79, 0x77, 0xe3, 0xec, - 0xfc, 0x7d, 0xe3, 0xec, 0xfc, 0x7c, 0x12, 0xc5, 0xea, 0xcd, 0x74, 0xec, 0x51, 0x9e, 0xfa, 0x29, - 0x86, 0xf1, 0x38, 0xe1, 0xd4, 0xcf, 0x05, 0x9e, 0x53, 0x2e, 0xd0, 0x7f, 0xfb, 0xfe, 0x73, 0x43, - 0x2d, 0x32, 0x94, 0xe3, 0xa6, 0xf9, 0xda, 0x38, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x73, 0x39, - 0x83, 0x43, 0x18, 0x09, 0x00, 0x00, + // 863 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x6e, 0x1b, 0x45, + 0x14, 0x8e, 0x69, 0x1a, 0xa7, 0xc7, 0x84, 0x56, 0x9b, 0x26, 0x98, 0x2d, 0xb8, 0xd1, 0x4a, 0xa0, + 0xaa, 0x51, 0x77, 0x89, 0x23, 0xee, 0x21, 0xae, 0x2a, 0x45, 0xc8, 0x51, 0xb5, 0x49, 0x8b, 0x04, + 0x48, 0xd6, 0x78, 0xe6, 0x64, 0xbb, 0xca, 0xee, 0xcc, 0x6a, 0x66, 0x9c, 0x34, 0x48, 0x3c, 0x01, + 0x17, 0xf0, 0x58, 0x5c, 0xf6, 0x92, 0x4b, 0x94, 0xbc, 0x08, 0x9a, 0xf1, 0xee, 0xd4, 0x4e, 0x76, + 0xe3, 0x86, 0xde, 0xf9, 0x78, 0xbe, 0xf3, 0x7d, 0xe7, 0x5f, 0x0b, 0x5f, 0x16, 0x84, 0x13, 0x8a, + 0x24, 0x62, 0x44, 0x93, 0x42, 0x88, 0x2c, 0x3a, 0xed, 0x47, 0xfa, 0x6d, 0x58, 0x48, 0xa1, 0x85, + 0xb7, 0x5e, 0xbe, 0x86, 0xd5, 0x6b, 0x78, 0xda, 0xf7, 0x1f, 0x26, 0x22, 0x11, 0xf6, 0x3d, 0x32, + 0xbf, 0xa6, 0x50, 0xbf, 0x47, 0x85, 0xca, 0x85, 0x8a, 0xc6, 0x44, 0x61, 0x74, 0xba, 0x33, 0x46, + 0x4d, 0x76, 0x22, 0x2a, 0x52, 0x5e, 0xbd, 0x27, 0x42, 0x24, 0x19, 0x46, 0xd6, 0x1a, 0x4f, 0x8e, + 0x23, 0x36, 0x91, 0x44, 0xa7, 0xc2, 0xbd, 0xd7, 0x05, 0x62, 0x25, 0xed, 0x7b, 0x90, 0x42, 0x77, + 0xa8, 0x92, 0x18, 0x93, 0x54, 0x69, 0x94, 0xcf, 0x89, 0x26, 0xaf, 0x49, 0x96, 0x32, 0xa2, 0x85, + 0xf4, 0x86, 0xf0, 0xe0, 0xb4, 0x32, 0x46, 0x0c, 0x35, 0x49, 0xb3, 0x6e, 0x6b, 0xab, 0xf5, 0xa4, + 0xd3, 0x0f, 0xc2, 0x9a, 0x0c, 0xc2, 0x39, 0xef, 0xf8, 0xbe, 0xf3, 0x7d, 0x6e, 0x5d, 0x83, 0x00, + 0xb6, 0x9a, 0xa4, 0x62, 0x54, 0x85, 0xe0, 0x0a, 0x83, 0x5f, 0x60, 0x73, 0xa8, 0x92, 0x57, 0x05, + 0x23, 0x1a, 0xe7, 0x83, 0xf9, 0x1a, 0x3e, 0x33, 0x5a, 0x23, 0xc7, 0x6a, 0x43, 0xb9, 0x17, 0xaf, + 0xb1, 0x39, 0x98, 0x0f, 0xab, 0xc8, 0x59, 0x21, 0x52, 0xae, 0xbb, 0x9f, 0x58, 0x80, 0xb3, 0x83, + 0x2d, 0xe8, 0xd5, 0x93, 0x3b, 0xf9, 0x13, 0x58, 0x1b, 0xaa, 0x64, 0x20, 0x91, 0x68, 0x7c, 0x29, + 0x44, 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9f, 0x2d, 0xab, 0xb3, 0x37, 0x39, 0x37, 0x32, 0x3f, + 0x50, 0x8a, 0x4a, 0x1d, 0xbc, 0x38, 0xba, 0x6d, 0x01, 0x77, 0xa1, 0x5d, 0x90, 0xf3, 0x1c, 0xb9, + 0xb6, 0x85, 0xbb, 0x31, 0x8e, 0x0a, 0x69, 0xa8, 0xc6, 0x93, 0x73, 0x94, 0xdd, 0x65, 0x9b, 0xf9, + 0xd4, 0x08, 0x28, 0x3c, 0xaa, 0x09, 0xe8, 0xff, 0x76, 0x76, 0x03, 0x56, 0xe6, 0x1a, 0x7a, 0x97, + 0xdb, 0x46, 0xfe, 0x66, 0x97, 0x24, 0x46, 0x86, 0x98, 0x7f, 0x54, 0xe2, 0xf5, 0xfc, 0x66, 0x87, + 0xa4, 0x25, 0x77, 0xd9, 0x39, 0x3b, 0x38, 0xb1, 0x3b, 0x54, 0xa3, 0xed, 0x72, 0xdc, 0x87, 0xb6, + 0x44, 0x8a, 0x69, 0x51, 0x8d, 0x56, 0xd4, 0x38, 0x5a, 0x33, 0xce, 0x86, 0x2f, 0x9e, 0xba, 0xc5, + 0x95, 0x7f, 0x30, 0x2c, 0x13, 0x9d, 0x5e, 0x8c, 0x83, 0x17, 0x47, 0x03, 0xc1, 0xb5, 0x24, 0x54, + 0x7b, 0x8f, 0xe0, 0xde, 0x19, 0x51, 0xf9, 0x88, 0x0a, 0x86, 0x56, 0xe6, 0xd3, 0x78, 0xd5, 0xfc, + 0x31, 0x10, 0x0c, 0xa7, 0x53, 0xc9, 0xd9, 0xec, 0x54, 0x1a, 0xab, 0xdc, 0xff, 0x1a, 0x3a, 0xb7, + 0xff, 0x87, 0x76, 0x25, 0x5f, 0x15, 0x89, 0x24, 0x0c, 0x67, 0xf5, 0x02, 0x58, 0xe3, 0x78, 0x36, + 0xba, 0xaa, 0xd9, 0xe1, 0x78, 0xf6, 0xd3, 0x22, 0xd9, 0xc7, 0xf0, 0x55, 0x2d, 0x69, 0xa5, 0xda, +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b, 0xf7, 0x9f, 0x59, 0xfa, 0xbc, 0x40, 0x35, 0x5e, 0xb1, 0x5f, 0x59, + 0xbb, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x03, 0xf6, 0x35, 0xce, 0x10, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -836,6 +931,8 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // RegisterDataValidator defines a method for registration of data validator. RegisterDataValidator(ctx context.Context, in *MsgRegisterDataValidator, opts ...grpc.CallOption) (*MsgRegisterDataValidatorResponse, error) + // UpdateDataValidator defines a method for updating of data validator. + UpdateDataValidator(ctx context.Context, in *MsgUpdateDataValidator, opts ...grpc.CallOption) (*MsgUpdateDataValidatorResponse, error) // CreatePool defines a method for creating data pool. CreatePool(ctx context.Context, in *MsgCreatePool, opts ...grpc.CallOption) (*MsgCreatePoolResponse, error) // SellData defines a method for selling data @@ -867,6 +964,15 @@ func (c *msgClient) RegisterDataValidator(ctx context.Context, in *MsgRegisterDa return out, nil } +func (c *msgClient) UpdateDataValidator(ctx context.Context, in *MsgUpdateDataValidator, opts ...grpc.CallOption) (*MsgUpdateDataValidatorResponse, error) { + out := new(MsgUpdateDataValidatorResponse) + err := c.cc.Invoke(ctx, "/panacea.datapool.v2.Msg/UpdateDataValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) CreatePool(ctx context.Context, in *MsgCreatePool, opts ...grpc.CallOption) (*MsgCreatePoolResponse, error) { out := new(MsgCreatePoolResponse) err := c.cc.Invoke(ctx, "/panacea.datapool.v2.Msg/CreatePool", in, out, opts...) @@ -925,6 +1031,8 @@ func (c *msgClient) UpgradeNFTContract(ctx context.Context, in *MsgUpgradeNFTCon type MsgServer interface { // RegisterDataValidator defines a method for registration of data validator. RegisterDataValidator(context.Context, *MsgRegisterDataValidator) (*MsgRegisterDataValidatorResponse, error) + // UpdateDataValidator defines a method for updating of data validator. + UpdateDataValidator(context.Context, *MsgUpdateDataValidator) (*MsgUpdateDataValidatorResponse, error) // CreatePool defines a method for creating data pool. CreatePool(context.Context, *MsgCreatePool) (*MsgCreatePoolResponse, error) // SellData defines a method for selling data @@ -946,6 +1054,9 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) RegisterDataValidator(ctx context.Context, req *MsgRegisterDataValidator) (*MsgRegisterDataValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterDataValidator not implemented") } +func (*UnimplementedMsgServer) UpdateDataValidator(ctx context.Context, req *MsgUpdateDataValidator) (*MsgUpdateDataValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDataValidator not implemented") +} func (*UnimplementedMsgServer) CreatePool(ctx context.Context, req *MsgCreatePool) (*MsgCreatePoolResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePool not implemented") } @@ -987,6 +1098,24 @@ func _Msg_RegisterDataValidator_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Msg_UpdateDataValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateDataValidator) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateDataValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/panacea.datapool.v2.Msg/UpdateDataValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateDataValidator(ctx, req.(*MsgUpdateDataValidator)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_CreatePool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCreatePool) if err := dec(in); err != nil { @@ -1103,6 +1232,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "RegisterDataValidator", Handler: _Msg_RegisterDataValidator_Handler, }, + { + MethodName: "UpdateDataValidator", + Handler: _Msg_UpdateDataValidator_Handler, + }, { MethodName: "CreatePool", Handler: _Msg_CreatePool_Handler, @@ -1190,6 +1323,66 @@ func (m *MsgRegisterDataValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *MsgUpdateDataValidator) 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 *MsgUpdateDataValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDataValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Endpoint) > 0 { + i -= len(m.Endpoint) + copy(dAtA[i:], m.Endpoint) + i = encodeVarintTx(dAtA, i, uint64(len(m.Endpoint))) + i-- + dAtA[i] = 0x12 + } + if len(m.DataValidator) > 0 { + i -= len(m.DataValidator) + copy(dAtA[i:], m.DataValidator) + i = encodeVarintTx(dAtA, i, uint64(len(m.DataValidator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDataValidatorResponse) 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 *MsgUpdateDataValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDataValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgCreatePool) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1670,6 +1863,32 @@ func (m *MsgRegisterDataValidatorResponse) Size() (n int) { return n } +func (m *MsgUpdateDataValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DataValidator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Endpoint) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateDataValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgCreatePool) Size() (n int) { if m == nil { return 0 @@ -2005,6 +2224,170 @@ func (m *MsgRegisterDataValidatorResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateDataValidator) 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: MsgUpdateDataValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDataValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataValidator", 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.DataValidator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", 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.Endpoint = 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 *MsgUpdateDataValidatorResponse) 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: MsgUpdateDataValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDataValidatorResponse: 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 *MsgCreatePool) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0