From 2955a5992ec532187d3b8eac5db71f8c884e0c99 Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:27:36 -0400 Subject: [PATCH 1/5] Change log level - Error level to Info (#368) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 048cab25..72216da5 100644 --- a/go.mod +++ b/go.mod @@ -241,7 +241,7 @@ replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // use stratos fork of cometbft: fork/v0.37.5 - github.com/cometbft/cometbft => github.com/stratosnet/cometbft v0.37.6-0.20240521175719-59bc70e0cc73 + github.com/cometbft/cometbft => github.com/stratosnet/cometbft v0.37.6-0.20240620154138-dc955d478115 // use stratos fork of cosmos-sdk: v0.47.x-stratos github.com/cosmos/cosmos-sdk => github.com/stratosnet/cosmos-sdk v0.47.12-0.20240521173001-c32cdc9a1e54 // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. diff --git a/go.sum b/go.sum index 0fea0492..2f5d5e64 100644 --- a/go.sum +++ b/go.sum @@ -1036,8 +1036,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= -github.com/stratosnet/cometbft v0.37.6-0.20240521175719-59bc70e0cc73 h1:D0wJLqeVdj6/KgtIUOknaEEYo+6Zz956I+iSq+qTsrs= -github.com/stratosnet/cometbft v0.37.6-0.20240521175719-59bc70e0cc73/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= +github.com/stratosnet/cometbft v0.37.6-0.20240620154138-dc955d478115 h1:Mc90IpZrL2Wd6zLMhK342kRysRbb0vMMKnO5ptDc5Yw= +github.com/stratosnet/cometbft v0.37.6-0.20240620154138-dc955d478115/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= github.com/stratosnet/cosmos-sdk v0.47.12-0.20240521173001-c32cdc9a1e54 h1:8uIe3hXJaPg/cgd6FqHSdiy8ntQQtzuA2C+3aFZTtkI= github.com/stratosnet/cosmos-sdk v0.47.12-0.20240521173001-c32cdc9a1e54/go.mod h1:c7xno1ENztUrUOqZ70W5gi0pTh3pT/3C6O0y1WzHSwU= github.com/stratosnet/ledger-stratos-go v0.0.0-20230728214905-432bf09f4b6c h1:EuJdqCo1DYeKjkXaIYNnU7WIFmu+FzJwJtzYhY3sQpQ= From 114001adfb55a81063284baa7940bb39ec4524aa Mon Sep 17 00:00:00 2001 From: BoThe1K <121880388+BoThe1K@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:24:51 +0200 Subject: [PATCH 2/5] Update web3 logic to show archive node state + small fix for block (#370) --- rpc/backend/evm_backend.go | 98 ++++++++++++---------- rpc/backend/utils.go | 2 +- rpc/namespaces/ethereum/debug/api.go | 6 +- rpc/namespaces/ethereum/eth/api.go | 10 +-- rpc/namespaces/ethereum/eth/filters/api.go | 36 ++++---- rpc/types/utils.go | 9 ++ x/evm/context.go | 31 +++++-- x/evm/keeper/eip1559.go | 10 +-- x/evm/types/chain_config.go | 7 ++ 9 files changed, 126 insertions(+), 83 deletions(-) diff --git a/rpc/backend/evm_backend.go b/rpc/backend/evm_backend.go index d87e6139..54147f34 100644 --- a/rpc/backend/evm_backend.go +++ b/rpc/backend/evm_backend.go @@ -25,6 +25,7 @@ import ( "github.com/stratosnet/stratos-chain/rpc/types" stratos "github.com/stratosnet/stratos-chain/types" + evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" ) @@ -44,6 +45,47 @@ func (b *Backend) BlockNumber() (hexutil.Uint64, error) { return hexutil.Uint64(res.Block.Height), nil } +type appBlockInfo struct { + miner common.Address + baseFee *big.Int +} + +func (b *Backend) getAppStoreBlockDetails(resBlock *tmrpctypes.ResultBlock) (*appBlockInfo, error) { + // override dynamicly miner address + sdkCtx, pruned, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) + if !pruned && err != nil { + b.logger.Debug("GetSdkContextWithHeader context", "height", resBlock.Block.Height, "hash", resBlock.Block.Hash(), "error", err.Error()) + return nil, err + } + + var ( + validator common.Address + baseFee *big.Int + ) + + if pruned { + validator = common.BytesToAddress(resBlock.Block.ProposerAddress) + baseFee = evmtypes.MinimumBaseFee + // NOTE: Maybe leave it just empty? Will put this just in case + // validator = common.Address{} + // baseFee = big.NewInt(0) + } else { + validator, err = b.GetEVMKeeper().GetCoinbaseAddress(sdkCtx) + if err != nil { + b.logger.Debug("GetCoinbaseAddress no validator", "height", resBlock.Block.Height, "hash", resBlock.Block.Hash(), "error", err.Error()) + return nil, err + } + baseFee, err = b.baseFee(sdk.WrapSDKContext(sdkCtx)) + if err != nil { + return nil, err + } + } + return &appBlockInfo{ + miner: validator, + baseFee: baseFee, + }, nil +} + func (b *Backend) getBlockFromResultBlock(resBlock *tmrpctypes.ResultBlock, fullTx bool) (*types.Block, error) { // return if requested block height is greater than the current one if resBlock == nil || resBlock.Block == nil { @@ -56,25 +98,13 @@ func (b *Backend) getBlockFromResultBlock(resBlock *tmrpctypes.ResultBlock, full return nil, nil } - // override dynamicly miner address - sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) - if err != nil { - b.logger.Debug("GetSdkContextWithHeader context", "height", resBlock.Block.Height, "hash", resBlock.Block.Hash(), "error", err.Error()) - return nil, err - } - - validator, err := b.GetEVMKeeper().GetCoinbaseAddress(sdkCtx) + aBlock, err := b.getAppStoreBlockDetails(resBlock) if err != nil { - b.logger.Debug("GetCoinbaseAddress no validator", "height", resBlock.Block.Height, "hash", resBlock.Block.Hash(), "error", err.Error()) return nil, err } - res.Miner = validator - baseFee, err := b.baseFee(sdk.WrapSDKContext(sdkCtx)) - if err != nil { - return nil, err - } - res.BaseFee = (*hexutil.Big)(baseFee) + res.Miner = aBlock.miner + res.BaseFee = (*hexutil.Big)(aBlock.baseFee) return res, nil } @@ -204,25 +234,14 @@ func (b *Backend) HeaderByNumber(blockNum types.BlockNumber) (*types.Header, err return nil, err } - // override dynamicly miner address - sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) + aBlock, err := b.getAppStoreBlockDetails(resBlock) if err != nil { - b.logger.Debug("GetSdkContextWithHeader context", "height", blockNum, "error", err.Error()) return nil, err } - validator, err := b.evmkeeper.GetCoinbaseAddress(sdkCtx) - if err != nil { - b.logger.Debug("EthBlockFromTendermint no validator", "height", blockNum, "error", err.Error()) - return nil, err - } - ethHeader.Coinbase = validator + ethHeader.Coinbase = aBlock.miner + ethHeader.BaseFee = aBlock.baseFee - baseFee, err := b.baseFee(sdk.WrapSDKContext(sdkCtx)) - if err != nil { - return nil, err - } - ethHeader.BaseFee = baseFee return ethHeader, nil } @@ -244,25 +263,14 @@ func (b *Backend) HeaderByHash(blockHash common.Hash) (*types.Header, error) { return nil, err } - // override dynamicly miner address - sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) + aBlock, err := b.getAppStoreBlockDetails(resBlock) if err != nil { - b.logger.Debug("GetSdkContextWithHeader context", "hash", blockHash.Hex(), "error", err.Error()) return nil, err } - validator, err := b.evmkeeper.GetCoinbaseAddress(sdkCtx) - if err != nil { - b.logger.Debug("EthBlockFromTendermint no validator", "hash", blockHash.Hex(), "error", err.Error()) - return nil, err - } - ethHeader.Coinbase = validator + ethHeader.Coinbase = aBlock.miner + ethHeader.BaseFee = aBlock.baseFee - baseFee, err := b.baseFee(sdk.WrapSDKContext(sdkCtx)) - if err != nil { - return nil, err - } - ethHeader.BaseFee = baseFee return ethHeader, nil } @@ -522,7 +530,7 @@ func (b *Backend) EstimateGas(args evmtypes.TransactionArgs, blockNrOptional *ty // it will return an empty context and the sdk.Context will use // the latest block height for querying. - sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, _, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return 0, err } @@ -689,7 +697,7 @@ func (b *Backend) BaseFee() (*big.Int, error) { return nil, nil } - sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, _, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } diff --git a/rpc/backend/utils.go b/rpc/backend/utils.go index bd786624..4f971e63 100644 --- a/rpc/backend/utils.go +++ b/rpc/backend/utils.go @@ -188,7 +188,7 @@ func (b *Backend) getAccountNonce(address common.Address, height types.BlockNumb if block.Block == nil { return 0, fmt.Errorf("failed to get block for %d height", height) } - sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&block.Block.Header) + sdkCtx, _, err := b.GetEVMContext().GetSdkContextWithHeader(&block.Block.Header) if err != nil { return 0, err } diff --git a/rpc/namespaces/ethereum/debug/api.go b/rpc/namespaces/ethereum/debug/api.go index 2f7bf1b6..9b0f11e0 100644 --- a/rpc/namespaces/ethereum/debug/api.go +++ b/rpc/namespaces/ethereum/debug/api.go @@ -171,9 +171,9 @@ func (a *API) TraceTransaction(ctx context.Context, hash common.Hash, config *tr }() defer cancel() - sdkCtx, err := a.backend.GetEVMContext().GetSdkContextWithHeader(&parentBlock.Block.Header) + sdkCtx, _, err := a.backend.GetEVMContext().GetSdkContextWithHeader(&parentBlock.Block.Header) if err != nil { - return nil, fmt.Errorf("Failed to load state at height: %d\n", parentHeight) + return nil, err } keeper := a.backend.GetEVMKeeper() @@ -277,7 +277,7 @@ func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConf BlockHash: common.Bytes2Hex(block.BlockID.Hash), } - sdkCtx, err := a.backend.GetEVMContext().GetSdkContextWithHeader(&block.Block.Header) + sdkCtx, _, err := a.backend.GetEVMContext().GetSdkContextWithHeader(&block.Block.Header) if err != nil { return nil, err } diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index ca147b9c..d16aa3e0 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -264,7 +264,7 @@ func (e *PublicAPI) GetBalance(address common.Address, blockNrOrHash rpctypes.Bl return nil, nil } - sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, _, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } @@ -292,7 +292,7 @@ func (e *PublicAPI) GetStorageAt(address common.Address, key string, blockNrOrHa return nil, nil } - sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, _, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } @@ -380,7 +380,7 @@ func (e *PublicAPI) GetCode(address common.Address, blockNrOrHash rpctypes.Block return nil, nil } - sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, _, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } @@ -636,7 +636,7 @@ func (e *PublicAPI) doCall( return nil, fmt.Errorf("block not found '%d'", blockNr.Int64()) } - sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, _, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } @@ -937,7 +937,7 @@ func (e *PublicAPI) GetProof(address common.Address, storageKeys []string, block return nil, nil } - sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, _, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } diff --git a/rpc/namespaces/ethereum/eth/filters/api.go b/rpc/namespaces/ethereum/eth/filters/api.go index 0610e01f..5cfa0bc8 100644 --- a/rpc/namespaces/ethereum/eth/filters/api.go +++ b/rpc/namespaces/ethereum/eth/filters/api.go @@ -232,18 +232,22 @@ func (api *PublicFilterAPI) NewBlockFilter() rpc.ID { return } // override dynamicly miner address - sdkCtx, err := api.backend.GetEVMContext().GetSdkContextWithHeader(&data.Header) - if err != nil { + sdkCtx, pruned, err := api.backend.GetEVMContext().GetSdkContextWithHeader(&data.Header) + if !pruned && err != nil { headersSub.err <- err return } - validator, err := api.backend.GetEVMKeeper().GetCoinbaseAddress(sdkCtx) - if err != nil { - headersSub.err <- err - return + if pruned { + header.Coinbase = common.Address(data.Header.ProposerAddress) + } else { + validator, err := api.backend.GetEVMKeeper().GetCoinbaseAddress(sdkCtx) + if err != nil { + headersSub.err <- err + return + } + header.Coinbase = validator } - header.Coinbase = validator api.filtersMu.Lock() if f, found := api.filters[headersSub.ID()]; found { @@ -296,18 +300,22 @@ func (api *PublicFilterAPI) NewHeads(ctx context.Context) (*rpc.Subscription, er return } // override dynamicly miner address - sdkCtx, err := api.backend.GetEVMContext().GetSdkContextWithHeader(&data.Header) - if err != nil { + sdkCtx, pruned, err := api.backend.GetEVMContext().GetSdkContextWithHeader(&data.Header) + if !pruned && err != nil { headersSub.err <- err return } - validator, err := api.backend.GetEVMKeeper().GetCoinbaseAddress(sdkCtx) - if err != nil { - headersSub.err <- err - return + if pruned { + header.Coinbase = common.Address(data.Header.ProposerAddress) + } else { + validator, err := api.backend.GetEVMKeeper().GetCoinbaseAddress(sdkCtx) + if err != nil { + headersSub.err <- err + return + } + header.Coinbase = validator } - header.Coinbase = validator err = notifier.Notify(rpcSub.ID, header) if err != nil { diff --git a/rpc/types/utils.go b/rpc/types/utils.go index 50b7c51c..2328c4ae 100644 --- a/rpc/types/utils.go +++ b/rpc/types/utils.go @@ -7,6 +7,7 @@ import ( "fmt" "math/big" "sort" + "strings" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -586,3 +587,11 @@ func FindAttribute(attrs []abci.EventAttribute, key string) string { } return "" } + +var errPrune = fmt.Errorf("version mismatch on immutable IAVL tree; version does not exist. Version has either been pruned, or is for a future block height") + +func IsPruneError(err error) bool { + return strings.Contains(err.Error(), errPrune.Error()) +} + +var ErrNotArchiveNode = fmt.Errorf("the data is available only in the archive node") diff --git a/x/evm/context.go b/x/evm/context.go index e4fd0ba3..60774c64 100644 --- a/x/evm/context.go +++ b/x/evm/context.go @@ -11,6 +11,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/stratosnet/stratos-chain/rpc/types" ) @@ -48,23 +49,39 @@ func (c *Context) GetSdkContext() sdk.Context { return c.copySdkContext(c.ms.CacheMultiStore(), nil) } -func (c *Context) GetSdkContextWithHeader(header *tmtypes.Header) (sdk.Context, error) { +func (c *Context) getPruningStrategy() pruningtypes.PruningStrategy { + cms, ok := c.ms.(storetypes.CommitMultiStore) + if !ok { + return pruningtypes.PruningDefault + } else { + return cms.GetPruning().Strategy + } +} + +func (c *Context) GetSdkContextWithHeader(header *tmtypes.Header) (sdk.Context, bool, error) { if header == nil { - return c.GetSdkContext(), nil + return c.GetSdkContext(), false, nil } if c.blockStore != nil { latestHeight := c.blockStore.Height() if latestHeight == 0 { - return sdk.Context{}, fmt.Errorf("block store not loaded") + return sdk.Context{}, false, fmt.Errorf("block store not loaded") } if latestHeight == header.Height { - return c.copySdkContext(c.ms.CacheMultiStore(), header), nil + return c.copySdkContext(c.ms.CacheMultiStore(), header), false, nil } } - cms, err := c.ms.CacheMultiStoreWithVersion(header.Height) + ccms, err := c.ms.CacheMultiStoreWithVersion(header.Height) if err != nil { - return sdk.Context{}, err + var ( + pruned bool + ) + if types.IsPruneError(err) && c.getPruningStrategy() != pruningtypes.PruningNothing { + pruned = true + err = types.ErrNotArchiveNode + } + return sdk.Context{}, pruned, err } - return c.copySdkContext(cms, header), nil + return c.copySdkContext(ccms, header), false, nil } diff --git a/x/evm/keeper/eip1559.go b/x/evm/keeper/eip1559.go index 601defb6..c9a71325 100644 --- a/x/evm/keeper/eip1559.go +++ b/x/evm/keeper/eip1559.go @@ -4,18 +4,12 @@ import ( "math/big" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stratosnet/stratos-chain/x/evm/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" ) -var ( - // MinimumBaseFee is a bare minimum for calculation even if block capacity showing less - // to prevent spam. Later could be removed after CalculateBaseFee rework on block end - // and getting a real gas for the period - MinimumBaseFee = new(big.Int).SetUint64(1_000_000_000) // 1gWei -) - // CalculateBaseFee calculates the base fee for the current block. This is only calculated once per // block during BeginBlock. If the NoBaseFee parameter is enabled or below activation height, this function returns nil. // NOTE: This code is inspired from the go-ethereum EIP1559 implementation and adapted to Cosmos SDK-based @@ -91,6 +85,6 @@ func (k Keeper) CalculateBaseFee(ctx sdk.Context) *big.Int { return math.BigMax( x.Sub(parentBaseFee, baseFeeDelta), - MinimumBaseFee, + types.MinimumBaseFee, ) } diff --git a/x/evm/types/chain_config.go b/x/evm/types/chain_config.go index ba602f9d..43eeba90 100644 --- a/x/evm/types/chain_config.go +++ b/x/evm/types/chain_config.go @@ -10,6 +10,13 @@ import ( "github.com/ethereum/go-ethereum/params" ) +var ( + // MinimumBaseFee is a bare minimum for calculation even if block capacity showing less + // to prevent spam. Later could be removed after CalculateBaseFee rework on block end + // and getting a real gas for the period + MinimumBaseFee = new(big.Int).SetUint64(1_000_000_000) // 1gWei +) + // EthereumConfig returns an Ethereum ChainConfig for EVM state transitions. // All the negative or nil values are converted to nil func (cc ChainConfig) EthereumConfig() *params.ChainConfig { From 2534ff11d7e82d0ccc32d811a28a1c3d023c982c Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:36:12 +0200 Subject: [PATCH 3/5] Fix/ST-365: Fix tx msg decode (#371) * make v1_1 proto compatible with stratos-chain v11 msgs. v1 proto compatible with stratos-chain v12 msgs. * update go.mod --- api/stratos/register/v1_1/register.pulsar.go | 889 +++++ api/stratos/register/v1_1/tx.pulsar.go | 3553 ++++++++++++++++++ go.mod | 4 +- go.sum | 8 +- proto/buf.yaml | 1 + proto/stratos/register/v1/tx.proto | 6 +- proto/stratos/register/v1_1/register.proto | 34 + proto/stratos/register/v1_1/tx.proto | 156 + testutil/helpers.go | 3 + x/register/types/codec.go | 5 + x/register/types/v1_1/msg.go | 82 + x/register/types/v1_1/register.pb.go | 575 +++ x/register/types/v1_1/tx.pb.go | 1935 ++++++++++ 13 files changed, 7242 insertions(+), 9 deletions(-) create mode 100644 api/stratos/register/v1_1/register.pulsar.go create mode 100644 api/stratos/register/v1_1/tx.pulsar.go create mode 100644 proto/stratos/register/v1_1/register.proto create mode 100644 proto/stratos/register/v1_1/tx.proto create mode 100644 x/register/types/v1_1/msg.go create mode 100644 x/register/types/v1_1/register.pb.go create mode 100644 x/register/types/v1_1/tx.pb.go diff --git a/api/stratos/register/v1_1/register.pulsar.go b/api/stratos/register/v1_1/register.pulsar.go new file mode 100644 index 00000000..153695c5 --- /dev/null +++ b/api/stratos/register/v1_1/register.pulsar.go @@ -0,0 +1,889 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package v1_1 + +import ( + _ "cosmossdk.io/api/amino" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/anypb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Description protoreflect.MessageDescriptor + fd_Description_moniker protoreflect.FieldDescriptor + fd_Description_identity protoreflect.FieldDescriptor + fd_Description_website protoreflect.FieldDescriptor + fd_Description_security_contact protoreflect.FieldDescriptor + fd_Description_details protoreflect.FieldDescriptor +) + +func init() { + file_stratos_register_v1_1_register_proto_init() + md_Description = File_stratos_register_v1_1_register_proto.Messages().ByName("Description") + fd_Description_moniker = md_Description.Fields().ByName("moniker") + fd_Description_identity = md_Description.Fields().ByName("identity") + fd_Description_website = md_Description.Fields().ByName("website") + fd_Description_security_contact = md_Description.Fields().ByName("security_contact") + fd_Description_details = md_Description.Fields().ByName("details") +} + +var _ protoreflect.Message = (*fastReflection_Description)(nil) + +type fastReflection_Description Description + +func (x *Description) ProtoReflect() protoreflect.Message { + return (*fastReflection_Description)(x) +} + +func (x *Description) slowProtoReflect() protoreflect.Message { + mi := &file_stratos_register_v1_1_register_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Description_messageType fastReflection_Description_messageType +var _ protoreflect.MessageType = fastReflection_Description_messageType{} + +type fastReflection_Description_messageType struct{} + +func (x fastReflection_Description_messageType) Zero() protoreflect.Message { + return (*fastReflection_Description)(nil) +} +func (x fastReflection_Description_messageType) New() protoreflect.Message { + return new(fastReflection_Description) +} +func (x fastReflection_Description_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Description +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Description) Descriptor() protoreflect.MessageDescriptor { + return md_Description +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Description) Type() protoreflect.MessageType { + return _fastReflection_Description_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Description) New() protoreflect.Message { + return new(fastReflection_Description) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Description) Interface() protoreflect.ProtoMessage { + return (*Description)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Description) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Moniker != "" { + value := protoreflect.ValueOfString(x.Moniker) + if !f(fd_Description_moniker, value) { + return + } + } + if x.Identity != "" { + value := protoreflect.ValueOfString(x.Identity) + if !f(fd_Description_identity, value) { + return + } + } + if x.Website != "" { + value := protoreflect.ValueOfString(x.Website) + if !f(fd_Description_website, value) { + return + } + } + if x.SecurityContact != "" { + value := protoreflect.ValueOfString(x.SecurityContact) + if !f(fd_Description_security_contact, value) { + return + } + } + if x.Details != "" { + value := protoreflect.ValueOfString(x.Details) + if !f(fd_Description_details, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Description) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "stratos.register.v1_1.Description.moniker": + return x.Moniker != "" + case "stratos.register.v1_1.Description.identity": + return x.Identity != "" + case "stratos.register.v1_1.Description.website": + return x.Website != "" + case "stratos.register.v1_1.Description.security_contact": + return x.SecurityContact != "" + case "stratos.register.v1_1.Description.details": + return x.Details != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.Description")) + } + panic(fmt.Errorf("message stratos.register.v1_1.Description does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Description) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "stratos.register.v1_1.Description.moniker": + x.Moniker = "" + case "stratos.register.v1_1.Description.identity": + x.Identity = "" + case "stratos.register.v1_1.Description.website": + x.Website = "" + case "stratos.register.v1_1.Description.security_contact": + x.SecurityContact = "" + case "stratos.register.v1_1.Description.details": + x.Details = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.Description")) + } + panic(fmt.Errorf("message stratos.register.v1_1.Description does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Description) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "stratos.register.v1_1.Description.moniker": + value := x.Moniker + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.Description.identity": + value := x.Identity + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.Description.website": + value := x.Website + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.Description.security_contact": + value := x.SecurityContact + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.Description.details": + value := x.Details + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.Description")) + } + panic(fmt.Errorf("message stratos.register.v1_1.Description does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Description) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "stratos.register.v1_1.Description.moniker": + x.Moniker = value.Interface().(string) + case "stratos.register.v1_1.Description.identity": + x.Identity = value.Interface().(string) + case "stratos.register.v1_1.Description.website": + x.Website = value.Interface().(string) + case "stratos.register.v1_1.Description.security_contact": + x.SecurityContact = value.Interface().(string) + case "stratos.register.v1_1.Description.details": + x.Details = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.Description")) + } + panic(fmt.Errorf("message stratos.register.v1_1.Description does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Description) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "stratos.register.v1_1.Description.moniker": + panic(fmt.Errorf("field moniker of message stratos.register.v1_1.Description is not mutable")) + case "stratos.register.v1_1.Description.identity": + panic(fmt.Errorf("field identity of message stratos.register.v1_1.Description is not mutable")) + case "stratos.register.v1_1.Description.website": + panic(fmt.Errorf("field website of message stratos.register.v1_1.Description is not mutable")) + case "stratos.register.v1_1.Description.security_contact": + panic(fmt.Errorf("field security_contact of message stratos.register.v1_1.Description is not mutable")) + case "stratos.register.v1_1.Description.details": + panic(fmt.Errorf("field details of message stratos.register.v1_1.Description is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.Description")) + } + panic(fmt.Errorf("message stratos.register.v1_1.Description does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Description) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "stratos.register.v1_1.Description.moniker": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.Description.identity": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.Description.website": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.Description.security_contact": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.Description.details": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.Description")) + } + panic(fmt.Errorf("message stratos.register.v1_1.Description does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Description) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in stratos.register.v1_1.Description", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Description) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Description) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Description) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Description) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Description) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Moniker) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Identity) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Website) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SecurityContact) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Details) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Description) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Details) > 0 { + i -= len(x.Details) + copy(dAtA[i:], x.Details) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Details))) + i-- + dAtA[i] = 0x2a + } + if len(x.SecurityContact) > 0 { + i -= len(x.SecurityContact) + copy(dAtA[i:], x.SecurityContact) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SecurityContact))) + i-- + dAtA[i] = 0x22 + } + if len(x.Website) > 0 { + i -= len(x.Website) + copy(dAtA[i:], x.Website) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Website))) + i-- + dAtA[i] = 0x1a + } + if len(x.Identity) > 0 { + i -= len(x.Identity) + copy(dAtA[i:], x.Identity) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identity))) + i-- + dAtA[i] = 0x12 + } + if len(x.Moniker) > 0 { + i -= len(x.Moniker) + copy(dAtA[i:], x.Moniker) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Moniker))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Description) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Description: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Moniker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SecurityContact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Details = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: stratos/register/v1_1/register.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Description struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` + SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty"` + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` +} + +func (x *Description) Reset() { + *x = Description{} + if protoimpl.UnsafeEnabled { + mi := &file_stratos_register_v1_1_register_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Description) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Description) ProtoMessage() {} + +// Deprecated: Use Description.ProtoReflect.Descriptor instead. +func (*Description) Descriptor() ([]byte, []int) { + return file_stratos_register_v1_1_register_proto_rawDescGZIP(), []int{0} +} + +func (x *Description) GetMoniker() string { + if x != nil { + return x.Moniker + } + return "" +} + +func (x *Description) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *Description) GetWebsite() string { + if x != nil { + return x.Website + } + return "" +} + +func (x *Description) GetSecurityContact() string { + if x != nil { + return x.SecurityContact + } + return "" +} + +func (x *Description) GetDetails() string { + if x != nil { + return x.Details + } + return "" +} + +var File_stratos_register_v1_1_register_proto protoreflect.FileDescriptor + +var file_stratos_register_v1_1_register_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x2f, 0x76, 0x31, 0x5f, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5f, 0x31, 0x1a, 0x14, 0x67, + 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, + 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x02, 0x0a, + 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x07, + 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xea, + 0xde, 0x1f, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0xf2, 0xde, 0x1f, 0x0e, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x22, 0x52, 0x07, 0x6d, 0x6f, + 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xea, 0xde, 0x1f, 0x08, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x19, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x07, + 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xea, + 0xde, 0x1f, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0xf2, 0xde, 0x1f, 0x18, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x22, 0x2c, 0x6f, 0x6d, 0x69, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, + 0x64, 0x0a, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x39, 0xea, 0xde, 0x1f, 0x10, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0xf2, + 0xde, 0x1f, 0x21, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x22, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xea, 0xde, 0x1f, 0x07, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0xf2, 0xde, 0x1f, 0x18, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x22, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, + 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x01, 0x42, 0xc8, + 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5f, 0x31, 0x42, 0x0d, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x2f, 0x76, 0x31, 0x5f, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x52, 0x56, 0xaa, 0x02, 0x14, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x56, + 0x31, 0x31, 0xca, 0x02, 0x14, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x31, 0xe2, 0x02, 0x20, 0x53, 0x74, 0x72, 0x61, + 0x74, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, + 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x3a, 0x3a, 0x56, 0x31, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_stratos_register_v1_1_register_proto_rawDescOnce sync.Once + file_stratos_register_v1_1_register_proto_rawDescData = file_stratos_register_v1_1_register_proto_rawDesc +) + +func file_stratos_register_v1_1_register_proto_rawDescGZIP() []byte { + file_stratos_register_v1_1_register_proto_rawDescOnce.Do(func() { + file_stratos_register_v1_1_register_proto_rawDescData = protoimpl.X.CompressGZIP(file_stratos_register_v1_1_register_proto_rawDescData) + }) + return file_stratos_register_v1_1_register_proto_rawDescData +} + +var file_stratos_register_v1_1_register_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_stratos_register_v1_1_register_proto_goTypes = []interface{}{ + (*Description)(nil), // 0: stratos.register.v1_1.Description +} +var file_stratos_register_v1_1_register_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_stratos_register_v1_1_register_proto_init() } +func file_stratos_register_v1_1_register_proto_init() { + if File_stratos_register_v1_1_register_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_stratos_register_v1_1_register_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Description); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_stratos_register_v1_1_register_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_stratos_register_v1_1_register_proto_goTypes, + DependencyIndexes: file_stratos_register_v1_1_register_proto_depIdxs, + MessageInfos: file_stratos_register_v1_1_register_proto_msgTypes, + }.Build() + File_stratos_register_v1_1_register_proto = out.File + file_stratos_register_v1_1_register_proto_rawDesc = nil + file_stratos_register_v1_1_register_proto_goTypes = nil + file_stratos_register_v1_1_register_proto_depIdxs = nil +} diff --git a/api/stratos/register/v1_1/tx.pulsar.go b/api/stratos/register/v1_1/tx.pulsar.go new file mode 100644 index 00000000..db0b764c --- /dev/null +++ b/api/stratos/register/v1_1/tx.pulsar.go @@ -0,0 +1,3553 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package v1_1 + +import ( + _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgCreateResourceNode protoreflect.MessageDescriptor + fd_MsgCreateResourceNode_network_address protoreflect.FieldDescriptor + fd_MsgCreateResourceNode_pubkey protoreflect.FieldDescriptor + fd_MsgCreateResourceNode_value protoreflect.FieldDescriptor + fd_MsgCreateResourceNode_owner_address protoreflect.FieldDescriptor + fd_MsgCreateResourceNode_description protoreflect.FieldDescriptor + fd_MsgCreateResourceNode_node_type protoreflect.FieldDescriptor + fd_MsgCreateResourceNode_beneficiary_address protoreflect.FieldDescriptor +) + +func init() { + file_stratos_register_v1_1_tx_proto_init() + md_MsgCreateResourceNode = File_stratos_register_v1_1_tx_proto.Messages().ByName("MsgCreateResourceNode") + fd_MsgCreateResourceNode_network_address = md_MsgCreateResourceNode.Fields().ByName("network_address") + fd_MsgCreateResourceNode_pubkey = md_MsgCreateResourceNode.Fields().ByName("pubkey") + fd_MsgCreateResourceNode_value = md_MsgCreateResourceNode.Fields().ByName("value") + fd_MsgCreateResourceNode_owner_address = md_MsgCreateResourceNode.Fields().ByName("owner_address") + fd_MsgCreateResourceNode_description = md_MsgCreateResourceNode.Fields().ByName("description") + fd_MsgCreateResourceNode_node_type = md_MsgCreateResourceNode.Fields().ByName("node_type") + fd_MsgCreateResourceNode_beneficiary_address = md_MsgCreateResourceNode.Fields().ByName("beneficiary_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateResourceNode)(nil) + +type fastReflection_MsgCreateResourceNode MsgCreateResourceNode + +func (x *MsgCreateResourceNode) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateResourceNode)(x) +} + +func (x *MsgCreateResourceNode) slowProtoReflect() protoreflect.Message { + mi := &file_stratos_register_v1_1_tx_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCreateResourceNode_messageType fastReflection_MsgCreateResourceNode_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateResourceNode_messageType{} + +type fastReflection_MsgCreateResourceNode_messageType struct{} + +func (x fastReflection_MsgCreateResourceNode_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateResourceNode)(nil) +} +func (x fastReflection_MsgCreateResourceNode_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateResourceNode) +} +func (x fastReflection_MsgCreateResourceNode_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateResourceNode +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateResourceNode) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateResourceNode +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCreateResourceNode) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateResourceNode_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateResourceNode) New() protoreflect.Message { + return new(fastReflection_MsgCreateResourceNode) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateResourceNode) Interface() protoreflect.ProtoMessage { + return (*MsgCreateResourceNode)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCreateResourceNode) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.NetworkAddress != "" { + value := protoreflect.ValueOfString(x.NetworkAddress) + if !f(fd_MsgCreateResourceNode_network_address, value) { + return + } + } + if x.Pubkey != nil { + value := protoreflect.ValueOfMessage(x.Pubkey.ProtoReflect()) + if !f(fd_MsgCreateResourceNode_pubkey, value) { + return + } + } + if x.Value != nil { + value := protoreflect.ValueOfMessage(x.Value.ProtoReflect()) + if !f(fd_MsgCreateResourceNode_value, value) { + return + } + } + if x.OwnerAddress != "" { + value := protoreflect.ValueOfString(x.OwnerAddress) + if !f(fd_MsgCreateResourceNode_owner_address, value) { + return + } + } + if x.Description != nil { + value := protoreflect.ValueOfMessage(x.Description.ProtoReflect()) + if !f(fd_MsgCreateResourceNode_description, value) { + return + } + } + if x.NodeType != uint32(0) { + value := protoreflect.ValueOfUint32(x.NodeType) + if !f(fd_MsgCreateResourceNode_node_type, value) { + return + } + } + if x.BeneficiaryAddress != "" { + value := protoreflect.ValueOfString(x.BeneficiaryAddress) + if !f(fd_MsgCreateResourceNode_beneficiary_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCreateResourceNode) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "stratos.register.v1_1.MsgCreateResourceNode.network_address": + return x.NetworkAddress != "" + case "stratos.register.v1_1.MsgCreateResourceNode.pubkey": + return x.Pubkey != nil + case "stratos.register.v1_1.MsgCreateResourceNode.value": + return x.Value != nil + case "stratos.register.v1_1.MsgCreateResourceNode.owner_address": + return x.OwnerAddress != "" + case "stratos.register.v1_1.MsgCreateResourceNode.description": + return x.Description != nil + case "stratos.register.v1_1.MsgCreateResourceNode.node_type": + return x.NodeType != uint32(0) + case "stratos.register.v1_1.MsgCreateResourceNode.beneficiary_address": + return x.BeneficiaryAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateResourceNode does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateResourceNode) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "stratos.register.v1_1.MsgCreateResourceNode.network_address": + x.NetworkAddress = "" + case "stratos.register.v1_1.MsgCreateResourceNode.pubkey": + x.Pubkey = nil + case "stratos.register.v1_1.MsgCreateResourceNode.value": + x.Value = nil + case "stratos.register.v1_1.MsgCreateResourceNode.owner_address": + x.OwnerAddress = "" + case "stratos.register.v1_1.MsgCreateResourceNode.description": + x.Description = nil + case "stratos.register.v1_1.MsgCreateResourceNode.node_type": + x.NodeType = uint32(0) + case "stratos.register.v1_1.MsgCreateResourceNode.beneficiary_address": + x.BeneficiaryAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateResourceNode does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCreateResourceNode) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "stratos.register.v1_1.MsgCreateResourceNode.network_address": + value := x.NetworkAddress + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.MsgCreateResourceNode.pubkey": + value := x.Pubkey + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateResourceNode.value": + value := x.Value + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateResourceNode.owner_address": + value := x.OwnerAddress + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.MsgCreateResourceNode.description": + value := x.Description + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateResourceNode.node_type": + value := x.NodeType + return protoreflect.ValueOfUint32(value) + case "stratos.register.v1_1.MsgCreateResourceNode.beneficiary_address": + value := x.BeneficiaryAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateResourceNode does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateResourceNode) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "stratos.register.v1_1.MsgCreateResourceNode.network_address": + x.NetworkAddress = value.Interface().(string) + case "stratos.register.v1_1.MsgCreateResourceNode.pubkey": + x.Pubkey = value.Message().Interface().(*anypb.Any) + case "stratos.register.v1_1.MsgCreateResourceNode.value": + x.Value = value.Message().Interface().(*v1beta1.Coin) + case "stratos.register.v1_1.MsgCreateResourceNode.owner_address": + x.OwnerAddress = value.Interface().(string) + case "stratos.register.v1_1.MsgCreateResourceNode.description": + x.Description = value.Message().Interface().(*Description) + case "stratos.register.v1_1.MsgCreateResourceNode.node_type": + x.NodeType = uint32(value.Uint()) + case "stratos.register.v1_1.MsgCreateResourceNode.beneficiary_address": + x.BeneficiaryAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateResourceNode does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateResourceNode) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "stratos.register.v1_1.MsgCreateResourceNode.pubkey": + if x.Pubkey == nil { + x.Pubkey = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Pubkey.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateResourceNode.value": + if x.Value == nil { + x.Value = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Value.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateResourceNode.description": + if x.Description == nil { + x.Description = new(Description) + } + return protoreflect.ValueOfMessage(x.Description.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateResourceNode.network_address": + panic(fmt.Errorf("field network_address of message stratos.register.v1_1.MsgCreateResourceNode is not mutable")) + case "stratos.register.v1_1.MsgCreateResourceNode.owner_address": + panic(fmt.Errorf("field owner_address of message stratos.register.v1_1.MsgCreateResourceNode is not mutable")) + case "stratos.register.v1_1.MsgCreateResourceNode.node_type": + panic(fmt.Errorf("field node_type of message stratos.register.v1_1.MsgCreateResourceNode is not mutable")) + case "stratos.register.v1_1.MsgCreateResourceNode.beneficiary_address": + panic(fmt.Errorf("field beneficiary_address of message stratos.register.v1_1.MsgCreateResourceNode is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateResourceNode does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCreateResourceNode) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "stratos.register.v1_1.MsgCreateResourceNode.network_address": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.MsgCreateResourceNode.pubkey": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateResourceNode.value": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateResourceNode.owner_address": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.MsgCreateResourceNode.description": + m := new(Description) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateResourceNode.node_type": + return protoreflect.ValueOfUint32(uint32(0)) + case "stratos.register.v1_1.MsgCreateResourceNode.beneficiary_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateResourceNode does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCreateResourceNode) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in stratos.register.v1_1.MsgCreateResourceNode", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCreateResourceNode) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateResourceNode) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCreateResourceNode) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCreateResourceNode) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateResourceNode) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.NetworkAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pubkey != nil { + l = options.Size(x.Pubkey) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Value != nil { + l = options.Size(x.Value) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OwnerAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Description != nil { + l = options.Size(x.Description) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.NodeType != 0 { + n += 1 + runtime.Sov(uint64(x.NodeType)) + } + l = len(x.BeneficiaryAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateResourceNode) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.BeneficiaryAddress) > 0 { + i -= len(x.BeneficiaryAddress) + copy(dAtA[i:], x.BeneficiaryAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BeneficiaryAddress))) + i-- + dAtA[i] = 0x3a + } + if x.NodeType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NodeType)) + i-- + dAtA[i] = 0x30 + } + if x.Description != nil { + encoded, err := options.Marshal(x.Description) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if len(x.OwnerAddress) > 0 { + i -= len(x.OwnerAddress) + copy(dAtA[i:], x.OwnerAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OwnerAddress))) + i-- + dAtA[i] = 0x22 + } + if x.Value != nil { + encoded, err := options.Marshal(x.Value) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.Pubkey != nil { + encoded, err := options.Marshal(x.Pubkey) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.NetworkAddress) > 0 { + i -= len(x.NetworkAddress) + copy(dAtA[i:], x.NetworkAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NetworkAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateResourceNode) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateResourceNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateResourceNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pubkey == nil { + x.Pubkey = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pubkey); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Value == nil { + x.Value = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Value); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Description == nil { + x.Description = &Description{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Description); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) + } + x.NodeType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.NodeType |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BeneficiaryAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BeneficiaryAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCreateMetaNode protoreflect.MessageDescriptor + fd_MsgCreateMetaNode_network_address protoreflect.FieldDescriptor + fd_MsgCreateMetaNode_pubkey protoreflect.FieldDescriptor + fd_MsgCreateMetaNode_value protoreflect.FieldDescriptor + fd_MsgCreateMetaNode_owner_address protoreflect.FieldDescriptor + fd_MsgCreateMetaNode_description protoreflect.FieldDescriptor + fd_MsgCreateMetaNode_beneficiary_address protoreflect.FieldDescriptor +) + +func init() { + file_stratos_register_v1_1_tx_proto_init() + md_MsgCreateMetaNode = File_stratos_register_v1_1_tx_proto.Messages().ByName("MsgCreateMetaNode") + fd_MsgCreateMetaNode_network_address = md_MsgCreateMetaNode.Fields().ByName("network_address") + fd_MsgCreateMetaNode_pubkey = md_MsgCreateMetaNode.Fields().ByName("pubkey") + fd_MsgCreateMetaNode_value = md_MsgCreateMetaNode.Fields().ByName("value") + fd_MsgCreateMetaNode_owner_address = md_MsgCreateMetaNode.Fields().ByName("owner_address") + fd_MsgCreateMetaNode_description = md_MsgCreateMetaNode.Fields().ByName("description") + fd_MsgCreateMetaNode_beneficiary_address = md_MsgCreateMetaNode.Fields().ByName("beneficiary_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateMetaNode)(nil) + +type fastReflection_MsgCreateMetaNode MsgCreateMetaNode + +func (x *MsgCreateMetaNode) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateMetaNode)(x) +} + +func (x *MsgCreateMetaNode) slowProtoReflect() protoreflect.Message { + mi := &file_stratos_register_v1_1_tx_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCreateMetaNode_messageType fastReflection_MsgCreateMetaNode_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateMetaNode_messageType{} + +type fastReflection_MsgCreateMetaNode_messageType struct{} + +func (x fastReflection_MsgCreateMetaNode_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateMetaNode)(nil) +} +func (x fastReflection_MsgCreateMetaNode_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateMetaNode) +} +func (x fastReflection_MsgCreateMetaNode_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateMetaNode +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateMetaNode) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateMetaNode +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCreateMetaNode) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateMetaNode_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateMetaNode) New() protoreflect.Message { + return new(fastReflection_MsgCreateMetaNode) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateMetaNode) Interface() protoreflect.ProtoMessage { + return (*MsgCreateMetaNode)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCreateMetaNode) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.NetworkAddress != "" { + value := protoreflect.ValueOfString(x.NetworkAddress) + if !f(fd_MsgCreateMetaNode_network_address, value) { + return + } + } + if x.Pubkey != nil { + value := protoreflect.ValueOfMessage(x.Pubkey.ProtoReflect()) + if !f(fd_MsgCreateMetaNode_pubkey, value) { + return + } + } + if x.Value != nil { + value := protoreflect.ValueOfMessage(x.Value.ProtoReflect()) + if !f(fd_MsgCreateMetaNode_value, value) { + return + } + } + if x.OwnerAddress != "" { + value := protoreflect.ValueOfString(x.OwnerAddress) + if !f(fd_MsgCreateMetaNode_owner_address, value) { + return + } + } + if x.Description != nil { + value := protoreflect.ValueOfMessage(x.Description.ProtoReflect()) + if !f(fd_MsgCreateMetaNode_description, value) { + return + } + } + if x.BeneficiaryAddress != "" { + value := protoreflect.ValueOfString(x.BeneficiaryAddress) + if !f(fd_MsgCreateMetaNode_beneficiary_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCreateMetaNode) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "stratos.register.v1_1.MsgCreateMetaNode.network_address": + return x.NetworkAddress != "" + case "stratos.register.v1_1.MsgCreateMetaNode.pubkey": + return x.Pubkey != nil + case "stratos.register.v1_1.MsgCreateMetaNode.value": + return x.Value != nil + case "stratos.register.v1_1.MsgCreateMetaNode.owner_address": + return x.OwnerAddress != "" + case "stratos.register.v1_1.MsgCreateMetaNode.description": + return x.Description != nil + case "stratos.register.v1_1.MsgCreateMetaNode.beneficiary_address": + return x.BeneficiaryAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateMetaNode does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateMetaNode) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "stratos.register.v1_1.MsgCreateMetaNode.network_address": + x.NetworkAddress = "" + case "stratos.register.v1_1.MsgCreateMetaNode.pubkey": + x.Pubkey = nil + case "stratos.register.v1_1.MsgCreateMetaNode.value": + x.Value = nil + case "stratos.register.v1_1.MsgCreateMetaNode.owner_address": + x.OwnerAddress = "" + case "stratos.register.v1_1.MsgCreateMetaNode.description": + x.Description = nil + case "stratos.register.v1_1.MsgCreateMetaNode.beneficiary_address": + x.BeneficiaryAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateMetaNode does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCreateMetaNode) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "stratos.register.v1_1.MsgCreateMetaNode.network_address": + value := x.NetworkAddress + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.MsgCreateMetaNode.pubkey": + value := x.Pubkey + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateMetaNode.value": + value := x.Value + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateMetaNode.owner_address": + value := x.OwnerAddress + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.MsgCreateMetaNode.description": + value := x.Description + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateMetaNode.beneficiary_address": + value := x.BeneficiaryAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateMetaNode does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateMetaNode) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "stratos.register.v1_1.MsgCreateMetaNode.network_address": + x.NetworkAddress = value.Interface().(string) + case "stratos.register.v1_1.MsgCreateMetaNode.pubkey": + x.Pubkey = value.Message().Interface().(*anypb.Any) + case "stratos.register.v1_1.MsgCreateMetaNode.value": + x.Value = value.Message().Interface().(*v1beta1.Coin) + case "stratos.register.v1_1.MsgCreateMetaNode.owner_address": + x.OwnerAddress = value.Interface().(string) + case "stratos.register.v1_1.MsgCreateMetaNode.description": + x.Description = value.Message().Interface().(*Description) + case "stratos.register.v1_1.MsgCreateMetaNode.beneficiary_address": + x.BeneficiaryAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateMetaNode does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateMetaNode) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "stratos.register.v1_1.MsgCreateMetaNode.pubkey": + if x.Pubkey == nil { + x.Pubkey = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Pubkey.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateMetaNode.value": + if x.Value == nil { + x.Value = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Value.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateMetaNode.description": + if x.Description == nil { + x.Description = new(Description) + } + return protoreflect.ValueOfMessage(x.Description.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateMetaNode.network_address": + panic(fmt.Errorf("field network_address of message stratos.register.v1_1.MsgCreateMetaNode is not mutable")) + case "stratos.register.v1_1.MsgCreateMetaNode.owner_address": + panic(fmt.Errorf("field owner_address of message stratos.register.v1_1.MsgCreateMetaNode is not mutable")) + case "stratos.register.v1_1.MsgCreateMetaNode.beneficiary_address": + panic(fmt.Errorf("field beneficiary_address of message stratos.register.v1_1.MsgCreateMetaNode is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateMetaNode does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCreateMetaNode) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "stratos.register.v1_1.MsgCreateMetaNode.network_address": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.MsgCreateMetaNode.pubkey": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateMetaNode.value": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateMetaNode.owner_address": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.MsgCreateMetaNode.description": + m := new(Description) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "stratos.register.v1_1.MsgCreateMetaNode.beneficiary_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgCreateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgCreateMetaNode does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCreateMetaNode) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in stratos.register.v1_1.MsgCreateMetaNode", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCreateMetaNode) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateMetaNode) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCreateMetaNode) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCreateMetaNode) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateMetaNode) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.NetworkAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pubkey != nil { + l = options.Size(x.Pubkey) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Value != nil { + l = options.Size(x.Value) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OwnerAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Description != nil { + l = options.Size(x.Description) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.BeneficiaryAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateMetaNode) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.BeneficiaryAddress) > 0 { + i -= len(x.BeneficiaryAddress) + copy(dAtA[i:], x.BeneficiaryAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BeneficiaryAddress))) + i-- + dAtA[i] = 0x32 + } + if x.Description != nil { + encoded, err := options.Marshal(x.Description) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if len(x.OwnerAddress) > 0 { + i -= len(x.OwnerAddress) + copy(dAtA[i:], x.OwnerAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OwnerAddress))) + i-- + dAtA[i] = 0x22 + } + if x.Value != nil { + encoded, err := options.Marshal(x.Value) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.Pubkey != nil { + encoded, err := options.Marshal(x.Pubkey) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.NetworkAddress) > 0 { + i -= len(x.NetworkAddress) + copy(dAtA[i:], x.NetworkAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NetworkAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateMetaNode) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateMetaNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateMetaNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pubkey == nil { + x.Pubkey = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pubkey); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Value == nil { + x.Value = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Value); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Description == nil { + x.Description = &Description{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Description); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BeneficiaryAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BeneficiaryAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateResourceNode protoreflect.MessageDescriptor + fd_MsgUpdateResourceNode_description protoreflect.FieldDescriptor + fd_MsgUpdateResourceNode_network_address protoreflect.FieldDescriptor + fd_MsgUpdateResourceNode_owner_address protoreflect.FieldDescriptor + fd_MsgUpdateResourceNode_node_type protoreflect.FieldDescriptor + fd_MsgUpdateResourceNode_beneficiary_address protoreflect.FieldDescriptor +) + +func init() { + file_stratos_register_v1_1_tx_proto_init() + md_MsgUpdateResourceNode = File_stratos_register_v1_1_tx_proto.Messages().ByName("MsgUpdateResourceNode") + fd_MsgUpdateResourceNode_description = md_MsgUpdateResourceNode.Fields().ByName("description") + fd_MsgUpdateResourceNode_network_address = md_MsgUpdateResourceNode.Fields().ByName("network_address") + fd_MsgUpdateResourceNode_owner_address = md_MsgUpdateResourceNode.Fields().ByName("owner_address") + fd_MsgUpdateResourceNode_node_type = md_MsgUpdateResourceNode.Fields().ByName("node_type") + fd_MsgUpdateResourceNode_beneficiary_address = md_MsgUpdateResourceNode.Fields().ByName("beneficiary_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateResourceNode)(nil) + +type fastReflection_MsgUpdateResourceNode MsgUpdateResourceNode + +func (x *MsgUpdateResourceNode) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateResourceNode)(x) +} + +func (x *MsgUpdateResourceNode) slowProtoReflect() protoreflect.Message { + mi := &file_stratos_register_v1_1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateResourceNode_messageType fastReflection_MsgUpdateResourceNode_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateResourceNode_messageType{} + +type fastReflection_MsgUpdateResourceNode_messageType struct{} + +func (x fastReflection_MsgUpdateResourceNode_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateResourceNode)(nil) +} +func (x fastReflection_MsgUpdateResourceNode_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateResourceNode) +} +func (x fastReflection_MsgUpdateResourceNode_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateResourceNode +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateResourceNode) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateResourceNode +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateResourceNode) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateResourceNode_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateResourceNode) New() protoreflect.Message { + return new(fastReflection_MsgUpdateResourceNode) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateResourceNode) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateResourceNode)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateResourceNode) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Description != nil { + value := protoreflect.ValueOfMessage(x.Description.ProtoReflect()) + if !f(fd_MsgUpdateResourceNode_description, value) { + return + } + } + if x.NetworkAddress != "" { + value := protoreflect.ValueOfString(x.NetworkAddress) + if !f(fd_MsgUpdateResourceNode_network_address, value) { + return + } + } + if x.OwnerAddress != "" { + value := protoreflect.ValueOfString(x.OwnerAddress) + if !f(fd_MsgUpdateResourceNode_owner_address, value) { + return + } + } + if x.NodeType != uint32(0) { + value := protoreflect.ValueOfUint32(x.NodeType) + if !f(fd_MsgUpdateResourceNode_node_type, value) { + return + } + } + if x.BeneficiaryAddress != "" { + value := protoreflect.ValueOfString(x.BeneficiaryAddress) + if !f(fd_MsgUpdateResourceNode_beneficiary_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateResourceNode) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "stratos.register.v1_1.MsgUpdateResourceNode.description": + return x.Description != nil + case "stratos.register.v1_1.MsgUpdateResourceNode.network_address": + return x.NetworkAddress != "" + case "stratos.register.v1_1.MsgUpdateResourceNode.owner_address": + return x.OwnerAddress != "" + case "stratos.register.v1_1.MsgUpdateResourceNode.node_type": + return x.NodeType != uint32(0) + case "stratos.register.v1_1.MsgUpdateResourceNode.beneficiary_address": + return x.BeneficiaryAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateResourceNode does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateResourceNode) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "stratos.register.v1_1.MsgUpdateResourceNode.description": + x.Description = nil + case "stratos.register.v1_1.MsgUpdateResourceNode.network_address": + x.NetworkAddress = "" + case "stratos.register.v1_1.MsgUpdateResourceNode.owner_address": + x.OwnerAddress = "" + case "stratos.register.v1_1.MsgUpdateResourceNode.node_type": + x.NodeType = uint32(0) + case "stratos.register.v1_1.MsgUpdateResourceNode.beneficiary_address": + x.BeneficiaryAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateResourceNode does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateResourceNode) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "stratos.register.v1_1.MsgUpdateResourceNode.description": + value := x.Description + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "stratos.register.v1_1.MsgUpdateResourceNode.network_address": + value := x.NetworkAddress + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.MsgUpdateResourceNode.owner_address": + value := x.OwnerAddress + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.MsgUpdateResourceNode.node_type": + value := x.NodeType + return protoreflect.ValueOfUint32(value) + case "stratos.register.v1_1.MsgUpdateResourceNode.beneficiary_address": + value := x.BeneficiaryAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateResourceNode does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateResourceNode) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "stratos.register.v1_1.MsgUpdateResourceNode.description": + x.Description = value.Message().Interface().(*Description) + case "stratos.register.v1_1.MsgUpdateResourceNode.network_address": + x.NetworkAddress = value.Interface().(string) + case "stratos.register.v1_1.MsgUpdateResourceNode.owner_address": + x.OwnerAddress = value.Interface().(string) + case "stratos.register.v1_1.MsgUpdateResourceNode.node_type": + x.NodeType = uint32(value.Uint()) + case "stratos.register.v1_1.MsgUpdateResourceNode.beneficiary_address": + x.BeneficiaryAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateResourceNode does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateResourceNode) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "stratos.register.v1_1.MsgUpdateResourceNode.description": + if x.Description == nil { + x.Description = new(Description) + } + return protoreflect.ValueOfMessage(x.Description.ProtoReflect()) + case "stratos.register.v1_1.MsgUpdateResourceNode.network_address": + panic(fmt.Errorf("field network_address of message stratos.register.v1_1.MsgUpdateResourceNode is not mutable")) + case "stratos.register.v1_1.MsgUpdateResourceNode.owner_address": + panic(fmt.Errorf("field owner_address of message stratos.register.v1_1.MsgUpdateResourceNode is not mutable")) + case "stratos.register.v1_1.MsgUpdateResourceNode.node_type": + panic(fmt.Errorf("field node_type of message stratos.register.v1_1.MsgUpdateResourceNode is not mutable")) + case "stratos.register.v1_1.MsgUpdateResourceNode.beneficiary_address": + panic(fmt.Errorf("field beneficiary_address of message stratos.register.v1_1.MsgUpdateResourceNode is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateResourceNode does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateResourceNode) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "stratos.register.v1_1.MsgUpdateResourceNode.description": + m := new(Description) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "stratos.register.v1_1.MsgUpdateResourceNode.network_address": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.MsgUpdateResourceNode.owner_address": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.MsgUpdateResourceNode.node_type": + return protoreflect.ValueOfUint32(uint32(0)) + case "stratos.register.v1_1.MsgUpdateResourceNode.beneficiary_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateResourceNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateResourceNode does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateResourceNode) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in stratos.register.v1_1.MsgUpdateResourceNode", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateResourceNode) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateResourceNode) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateResourceNode) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateResourceNode) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateResourceNode) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Description != nil { + l = options.Size(x.Description) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.NetworkAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OwnerAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.NodeType != 0 { + n += 1 + runtime.Sov(uint64(x.NodeType)) + } + l = len(x.BeneficiaryAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateResourceNode) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.BeneficiaryAddress) > 0 { + i -= len(x.BeneficiaryAddress) + copy(dAtA[i:], x.BeneficiaryAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BeneficiaryAddress))) + i-- + dAtA[i] = 0x2a + } + if x.NodeType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NodeType)) + i-- + dAtA[i] = 0x20 + } + if len(x.OwnerAddress) > 0 { + i -= len(x.OwnerAddress) + copy(dAtA[i:], x.OwnerAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OwnerAddress))) + i-- + dAtA[i] = 0x1a + } + if len(x.NetworkAddress) > 0 { + i -= len(x.NetworkAddress) + copy(dAtA[i:], x.NetworkAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NetworkAddress))) + i-- + dAtA[i] = 0x12 + } + if x.Description != nil { + encoded, err := options.Marshal(x.Description) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateResourceNode) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateResourceNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateResourceNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Description == nil { + x.Description = &Description{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Description); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) + } + x.NodeType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.NodeType |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BeneficiaryAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BeneficiaryAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateMetaNode protoreflect.MessageDescriptor + fd_MsgUpdateMetaNode_description protoreflect.FieldDescriptor + fd_MsgUpdateMetaNode_network_address protoreflect.FieldDescriptor + fd_MsgUpdateMetaNode_owner_address protoreflect.FieldDescriptor + fd_MsgUpdateMetaNode_beneficiary_address protoreflect.FieldDescriptor +) + +func init() { + file_stratos_register_v1_1_tx_proto_init() + md_MsgUpdateMetaNode = File_stratos_register_v1_1_tx_proto.Messages().ByName("MsgUpdateMetaNode") + fd_MsgUpdateMetaNode_description = md_MsgUpdateMetaNode.Fields().ByName("description") + fd_MsgUpdateMetaNode_network_address = md_MsgUpdateMetaNode.Fields().ByName("network_address") + fd_MsgUpdateMetaNode_owner_address = md_MsgUpdateMetaNode.Fields().ByName("owner_address") + fd_MsgUpdateMetaNode_beneficiary_address = md_MsgUpdateMetaNode.Fields().ByName("beneficiary_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateMetaNode)(nil) + +type fastReflection_MsgUpdateMetaNode MsgUpdateMetaNode + +func (x *MsgUpdateMetaNode) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateMetaNode)(x) +} + +func (x *MsgUpdateMetaNode) slowProtoReflect() protoreflect.Message { + mi := &file_stratos_register_v1_1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateMetaNode_messageType fastReflection_MsgUpdateMetaNode_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateMetaNode_messageType{} + +type fastReflection_MsgUpdateMetaNode_messageType struct{} + +func (x fastReflection_MsgUpdateMetaNode_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateMetaNode)(nil) +} +func (x fastReflection_MsgUpdateMetaNode_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateMetaNode) +} +func (x fastReflection_MsgUpdateMetaNode_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateMetaNode +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateMetaNode) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateMetaNode +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateMetaNode) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateMetaNode_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateMetaNode) New() protoreflect.Message { + return new(fastReflection_MsgUpdateMetaNode) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateMetaNode) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateMetaNode)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateMetaNode) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Description != nil { + value := protoreflect.ValueOfMessage(x.Description.ProtoReflect()) + if !f(fd_MsgUpdateMetaNode_description, value) { + return + } + } + if x.NetworkAddress != "" { + value := protoreflect.ValueOfString(x.NetworkAddress) + if !f(fd_MsgUpdateMetaNode_network_address, value) { + return + } + } + if x.OwnerAddress != "" { + value := protoreflect.ValueOfString(x.OwnerAddress) + if !f(fd_MsgUpdateMetaNode_owner_address, value) { + return + } + } + if x.BeneficiaryAddress != "" { + value := protoreflect.ValueOfString(x.BeneficiaryAddress) + if !f(fd_MsgUpdateMetaNode_beneficiary_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateMetaNode) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "stratos.register.v1_1.MsgUpdateMetaNode.description": + return x.Description != nil + case "stratos.register.v1_1.MsgUpdateMetaNode.network_address": + return x.NetworkAddress != "" + case "stratos.register.v1_1.MsgUpdateMetaNode.owner_address": + return x.OwnerAddress != "" + case "stratos.register.v1_1.MsgUpdateMetaNode.beneficiary_address": + return x.BeneficiaryAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateMetaNode does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateMetaNode) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "stratos.register.v1_1.MsgUpdateMetaNode.description": + x.Description = nil + case "stratos.register.v1_1.MsgUpdateMetaNode.network_address": + x.NetworkAddress = "" + case "stratos.register.v1_1.MsgUpdateMetaNode.owner_address": + x.OwnerAddress = "" + case "stratos.register.v1_1.MsgUpdateMetaNode.beneficiary_address": + x.BeneficiaryAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateMetaNode does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateMetaNode) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "stratos.register.v1_1.MsgUpdateMetaNode.description": + value := x.Description + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "stratos.register.v1_1.MsgUpdateMetaNode.network_address": + value := x.NetworkAddress + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.MsgUpdateMetaNode.owner_address": + value := x.OwnerAddress + return protoreflect.ValueOfString(value) + case "stratos.register.v1_1.MsgUpdateMetaNode.beneficiary_address": + value := x.BeneficiaryAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateMetaNode does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateMetaNode) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "stratos.register.v1_1.MsgUpdateMetaNode.description": + x.Description = value.Message().Interface().(*Description) + case "stratos.register.v1_1.MsgUpdateMetaNode.network_address": + x.NetworkAddress = value.Interface().(string) + case "stratos.register.v1_1.MsgUpdateMetaNode.owner_address": + x.OwnerAddress = value.Interface().(string) + case "stratos.register.v1_1.MsgUpdateMetaNode.beneficiary_address": + x.BeneficiaryAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateMetaNode does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateMetaNode) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "stratos.register.v1_1.MsgUpdateMetaNode.description": + if x.Description == nil { + x.Description = new(Description) + } + return protoreflect.ValueOfMessage(x.Description.ProtoReflect()) + case "stratos.register.v1_1.MsgUpdateMetaNode.network_address": + panic(fmt.Errorf("field network_address of message stratos.register.v1_1.MsgUpdateMetaNode is not mutable")) + case "stratos.register.v1_1.MsgUpdateMetaNode.owner_address": + panic(fmt.Errorf("field owner_address of message stratos.register.v1_1.MsgUpdateMetaNode is not mutable")) + case "stratos.register.v1_1.MsgUpdateMetaNode.beneficiary_address": + panic(fmt.Errorf("field beneficiary_address of message stratos.register.v1_1.MsgUpdateMetaNode is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateMetaNode does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateMetaNode) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "stratos.register.v1_1.MsgUpdateMetaNode.description": + m := new(Description) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "stratos.register.v1_1.MsgUpdateMetaNode.network_address": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.MsgUpdateMetaNode.owner_address": + return protoreflect.ValueOfString("") + case "stratos.register.v1_1.MsgUpdateMetaNode.beneficiary_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1_1.MsgUpdateMetaNode")) + } + panic(fmt.Errorf("message stratos.register.v1_1.MsgUpdateMetaNode does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateMetaNode) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in stratos.register.v1_1.MsgUpdateMetaNode", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateMetaNode) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateMetaNode) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateMetaNode) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateMetaNode) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateMetaNode) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Description != nil { + l = options.Size(x.Description) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.NetworkAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OwnerAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.BeneficiaryAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateMetaNode) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.BeneficiaryAddress) > 0 { + i -= len(x.BeneficiaryAddress) + copy(dAtA[i:], x.BeneficiaryAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BeneficiaryAddress))) + i-- + dAtA[i] = 0x22 + } + if len(x.OwnerAddress) > 0 { + i -= len(x.OwnerAddress) + copy(dAtA[i:], x.OwnerAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OwnerAddress))) + i-- + dAtA[i] = 0x1a + } + if len(x.NetworkAddress) > 0 { + i -= len(x.NetworkAddress) + copy(dAtA[i:], x.NetworkAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NetworkAddress))) + i-- + dAtA[i] = 0x12 + } + if x.Description != nil { + encoded, err := options.Marshal(x.Description) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateMetaNode) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateMetaNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateMetaNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Description == nil { + x.Description = &Description{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Description); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BeneficiaryAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BeneficiaryAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: stratos/register/v1_1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgCreateResourceNode encapsulates an MsgCreateResourceNodeTx transaction as an SDK message. +type MsgCreateResourceNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address,omitempty"` + Pubkey *anypb.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + Value *v1beta1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + NodeType uint32 `protobuf:"varint,6,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"` + BeneficiaryAddress string `protobuf:"bytes,7,opt,name=beneficiary_address,json=beneficiaryAddress,proto3" json:"beneficiary_address,omitempty"` +} + +func (x *MsgCreateResourceNode) Reset() { + *x = MsgCreateResourceNode{} + if protoimpl.UnsafeEnabled { + mi := &file_stratos_register_v1_1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateResourceNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateResourceNode) ProtoMessage() {} + +// Deprecated: Use MsgCreateResourceNode.ProtoReflect.Descriptor instead. +func (*MsgCreateResourceNode) Descriptor() ([]byte, []int) { + return file_stratos_register_v1_1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgCreateResourceNode) GetNetworkAddress() string { + if x != nil { + return x.NetworkAddress + } + return "" +} + +func (x *MsgCreateResourceNode) GetPubkey() *anypb.Any { + if x != nil { + return x.Pubkey + } + return nil +} + +func (x *MsgCreateResourceNode) GetValue() *v1beta1.Coin { + if x != nil { + return x.Value + } + return nil +} + +func (x *MsgCreateResourceNode) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *MsgCreateResourceNode) GetDescription() *Description { + if x != nil { + return x.Description + } + return nil +} + +func (x *MsgCreateResourceNode) GetNodeType() uint32 { + if x != nil { + return x.NodeType + } + return 0 +} + +func (x *MsgCreateResourceNode) GetBeneficiaryAddress() string { + if x != nil { + return x.BeneficiaryAddress + } + return "" +} + +// MsgCreateMetaNode encapsulates an MsgCreateMetaNodeTx transaction as an SDK message. +type MsgCreateMetaNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address,omitempty"` + Pubkey *anypb.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + Value *v1beta1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + BeneficiaryAddress string `protobuf:"bytes,6,opt,name=beneficiary_address,json=beneficiaryAddress,proto3" json:"beneficiary_address,omitempty"` +} + +func (x *MsgCreateMetaNode) Reset() { + *x = MsgCreateMetaNode{} + if protoimpl.UnsafeEnabled { + mi := &file_stratos_register_v1_1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateMetaNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateMetaNode) ProtoMessage() {} + +// Deprecated: Use MsgCreateMetaNode.ProtoReflect.Descriptor instead. +func (*MsgCreateMetaNode) Descriptor() ([]byte, []int) { + return file_stratos_register_v1_1_tx_proto_rawDescGZIP(), []int{1} +} + +func (x *MsgCreateMetaNode) GetNetworkAddress() string { + if x != nil { + return x.NetworkAddress + } + return "" +} + +func (x *MsgCreateMetaNode) GetPubkey() *anypb.Any { + if x != nil { + return x.Pubkey + } + return nil +} + +func (x *MsgCreateMetaNode) GetValue() *v1beta1.Coin { + if x != nil { + return x.Value + } + return nil +} + +func (x *MsgCreateMetaNode) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *MsgCreateMetaNode) GetDescription() *Description { + if x != nil { + return x.Description + } + return nil +} + +func (x *MsgCreateMetaNode) GetBeneficiaryAddress() string { + if x != nil { + return x.BeneficiaryAddress + } + return "" +} + +// MsgUpdateResourceNode defines a SDK message for updating an existing resource node. +type MsgUpdateResourceNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Description *Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + NetworkAddress string `protobuf:"bytes,2,opt,name=network_address,json=networkAddress,proto3" json:"network_address,omitempty"` + OwnerAddress string `protobuf:"bytes,3,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + NodeType uint32 `protobuf:"varint,4,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"` + BeneficiaryAddress string `protobuf:"bytes,5,opt,name=beneficiary_address,json=beneficiaryAddress,proto3" json:"beneficiary_address,omitempty"` +} + +func (x *MsgUpdateResourceNode) Reset() { + *x = MsgUpdateResourceNode{} + if protoimpl.UnsafeEnabled { + mi := &file_stratos_register_v1_1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateResourceNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateResourceNode) ProtoMessage() {} + +// Deprecated: Use MsgUpdateResourceNode.ProtoReflect.Descriptor instead. +func (*MsgUpdateResourceNode) Descriptor() ([]byte, []int) { + return file_stratos_register_v1_1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgUpdateResourceNode) GetDescription() *Description { + if x != nil { + return x.Description + } + return nil +} + +func (x *MsgUpdateResourceNode) GetNetworkAddress() string { + if x != nil { + return x.NetworkAddress + } + return "" +} + +func (x *MsgUpdateResourceNode) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *MsgUpdateResourceNode) GetNodeType() uint32 { + if x != nil { + return x.NodeType + } + return 0 +} + +func (x *MsgUpdateResourceNode) GetBeneficiaryAddress() string { + if x != nil { + return x.BeneficiaryAddress + } + return "" +} + +// MsgUpdateMetaNode defines a SDK message for updating an existing meta node. +type MsgUpdateMetaNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Description *Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + NetworkAddress string `protobuf:"bytes,2,opt,name=network_address,json=networkAddress,proto3" json:"network_address,omitempty"` + OwnerAddress string `protobuf:"bytes,3,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + BeneficiaryAddress string `protobuf:"bytes,4,opt,name=beneficiary_address,json=beneficiaryAddress,proto3" json:"beneficiary_address,omitempty"` +} + +func (x *MsgUpdateMetaNode) Reset() { + *x = MsgUpdateMetaNode{} + if protoimpl.UnsafeEnabled { + mi := &file_stratos_register_v1_1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateMetaNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateMetaNode) ProtoMessage() {} + +// Deprecated: Use MsgUpdateMetaNode.ProtoReflect.Descriptor instead. +func (*MsgUpdateMetaNode) Descriptor() ([]byte, []int) { + return file_stratos_register_v1_1_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgUpdateMetaNode) GetDescription() *Description { + if x != nil { + return x.Description + } + return nil +} + +func (x *MsgUpdateMetaNode) GetNetworkAddress() string { + if x != nil { + return x.NetworkAddress + } + return "" +} + +func (x *MsgUpdateMetaNode) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *MsgUpdateMetaNode) GetBeneficiaryAddress() string { + if x != nil { + return x.BeneficiaryAddress + } + return "" +} + +var File_stratos_register_v1_1_tx_proto protoreflect.FileDescriptor + +var file_stratos_register_v1_1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x2f, 0x76, 0x31, 0x5f, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x15, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5f, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, + 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x24, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x2f, 0x76, 0x31, 0x5f, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x06, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x6e, 0x0a, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0xea, 0xde, 0x1f, 0x0f, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0xf2, 0xde, 0x1f, + 0x16, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x61, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x33, 0xea, 0xde, 0x1f, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, + 0x79, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x75, 0x62, 0x6b, 0x65, + 0x79, 0x22, 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x12, 0x53, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x22, 0xc8, 0xde, + 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0xf2, 0xde, 0x1f, 0x0c, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x66, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x41, + 0xea, 0xde, 0x1f, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0xf2, 0xde, 0x1f, 0x14, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x74, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5f, 0x31, 0x2e, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, + 0x1f, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0xf2, 0xde, 0x1f, + 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x21, 0xea, 0xde, 0x1f, 0x09, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x52, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x7e, 0x0a, 0x13, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, + 0x69, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x4d, 0xea, 0xde, 0x1f, 0x13, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, + 0x61, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0xf2, 0xde, 0x1f, 0x1a, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x12, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x34, 0x82, 0xe7, 0xb0, 0x2a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0xcb, 0x05, 0x0a, 0x11, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x6e, 0x0a, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0xea, 0xde, 0x1f, 0x0f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0xf2, + 0xde, 0x1f, 0x16, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x61, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x33, 0xea, 0xde, 0x1f, 0x06, 0x70, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x22, 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x12, 0x53, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x22, + 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0xf2, 0xde, 0x1f, + 0x0c, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x66, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x41, 0xea, 0xde, 0x1f, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0xf2, 0xde, 0x1f, 0x14, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x74, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, + 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5f, 0x31, 0x2e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, + 0xea, 0xde, 0x1f, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0xf2, + 0xde, 0x1f, 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x13, 0x62, 0x65, 0x6e, 0x65, 0x66, + 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x4d, 0xea, 0xde, 0x1f, 0x13, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, + 0x63, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0xf2, 0xde, 0x1f, + 0x1a, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, + 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x12, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x30, 0x82, 0xe7, 0xb0, 0x2a, 0x0d, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0xdb, 0x04, 0x0a, 0x15, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x74, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5f, 0x31, + 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, + 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6e, 0x0a, 0x0f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x45, 0xea, 0xde, 0x1f, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0xf2, 0xde, 0x1f, 0x16, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x22, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x41, 0xea, 0xde, 0x1f, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0xf2, 0xde, 0x1f, 0x14, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x42, 0x21, 0xea, 0xde, 0x1f, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x7e, 0x0a, 0x13, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4d, + 0xea, 0xde, 0x1f, 0x13, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0xf2, 0xde, 0x1f, 0x1a, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x22, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x62, + 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x3a, 0x34, 0x82, 0xe7, 0xb0, 0x2a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, + 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0x93, 0x04, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x74, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5f, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0xf2, 0xde, 0x1f, 0x12, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x6e, 0x0a, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0xea, 0xde, + 0x1f, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0xf2, 0xde, 0x1f, 0x16, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x41, 0xea, 0xde, 0x1f, 0x0d, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0xf2, 0xde, 0x1f, + 0x14, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x7e, 0x0a, 0x13, 0x62, + 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4d, 0xea, 0xde, 0x1f, 0x13, 0x62, 0x65, + 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0xf2, 0xde, 0x1f, 0x1a, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x65, 0x6e, 0x65, 0x66, + 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, + 0x69, 0x61, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x30, 0x82, 0xe7, 0xb0, + 0x2a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, + 0xe7, 0xb0, 0x2a, 0x19, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0xc2, 0x01, + 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5f, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, + 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x5f, 0x31, 0xa2, 0x02, + 0x03, 0x53, 0x52, 0x56, 0xaa, 0x02, 0x14, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x56, 0x31, 0x31, 0xca, 0x02, 0x14, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x56, + 0x31, 0x31, 0xe2, 0x02, 0x20, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x3a, + 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x31, 0xa8, 0xe2, + 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_stratos_register_v1_1_tx_proto_rawDescOnce sync.Once + file_stratos_register_v1_1_tx_proto_rawDescData = file_stratos_register_v1_1_tx_proto_rawDesc +) + +func file_stratos_register_v1_1_tx_proto_rawDescGZIP() []byte { + file_stratos_register_v1_1_tx_proto_rawDescOnce.Do(func() { + file_stratos_register_v1_1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_stratos_register_v1_1_tx_proto_rawDescData) + }) + return file_stratos_register_v1_1_tx_proto_rawDescData +} + +var file_stratos_register_v1_1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_stratos_register_v1_1_tx_proto_goTypes = []interface{}{ + (*MsgCreateResourceNode)(nil), // 0: stratos.register.v1_1.MsgCreateResourceNode + (*MsgCreateMetaNode)(nil), // 1: stratos.register.v1_1.MsgCreateMetaNode + (*MsgUpdateResourceNode)(nil), // 2: stratos.register.v1_1.MsgUpdateResourceNode + (*MsgUpdateMetaNode)(nil), // 3: stratos.register.v1_1.MsgUpdateMetaNode + (*anypb.Any)(nil), // 4: google.protobuf.Any + (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin + (*Description)(nil), // 6: stratos.register.v1_1.Description +} +var file_stratos_register_v1_1_tx_proto_depIdxs = []int32{ + 4, // 0: stratos.register.v1_1.MsgCreateResourceNode.pubkey:type_name -> google.protobuf.Any + 5, // 1: stratos.register.v1_1.MsgCreateResourceNode.value:type_name -> cosmos.base.v1beta1.Coin + 6, // 2: stratos.register.v1_1.MsgCreateResourceNode.description:type_name -> stratos.register.v1_1.Description + 4, // 3: stratos.register.v1_1.MsgCreateMetaNode.pubkey:type_name -> google.protobuf.Any + 5, // 4: stratos.register.v1_1.MsgCreateMetaNode.value:type_name -> cosmos.base.v1beta1.Coin + 6, // 5: stratos.register.v1_1.MsgCreateMetaNode.description:type_name -> stratos.register.v1_1.Description + 6, // 6: stratos.register.v1_1.MsgUpdateResourceNode.description:type_name -> stratos.register.v1_1.Description + 6, // 7: stratos.register.v1_1.MsgUpdateMetaNode.description:type_name -> stratos.register.v1_1.Description + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_stratos_register_v1_1_tx_proto_init() } +func file_stratos_register_v1_1_tx_proto_init() { + if File_stratos_register_v1_1_tx_proto != nil { + return + } + file_stratos_register_v1_1_register_proto_init() + if !protoimpl.UnsafeEnabled { + file_stratos_register_v1_1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateResourceNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stratos_register_v1_1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateMetaNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stratos_register_v1_1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateResourceNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stratos_register_v1_1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateMetaNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_stratos_register_v1_1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_stratos_register_v1_1_tx_proto_goTypes, + DependencyIndexes: file_stratos_register_v1_1_tx_proto_depIdxs, + MessageInfos: file_stratos_register_v1_1_tx_proto_msgTypes, + }.Build() + File_stratos_register_v1_1_tx_proto = out.File + file_stratos_register_v1_1_tx_proto_rawDesc = nil + file_stratos_register_v1_1_tx_proto_goTypes = nil + file_stratos_register_v1_1_tx_proto_depIdxs = nil +} diff --git a/go.mod b/go.mod index 72216da5..d7974a3a 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 - github.com/stratosnet/stratos-chain/api v0.0.0-20240318144156-bf3328f863f6 + github.com/stratosnet/stratos-chain/api v0.0.0-20240716160341-ec9024ef5de0 github.com/stretchr/testify v1.9.0 github.com/tyler-smith/go-bip39 v1.1.0 golang.org/x/crypto v0.21.0 @@ -243,7 +243,7 @@ replace ( // use stratos fork of cometbft: fork/v0.37.5 github.com/cometbft/cometbft => github.com/stratosnet/cometbft v0.37.6-0.20240620154138-dc955d478115 // use stratos fork of cosmos-sdk: v0.47.x-stratos - github.com/cosmos/cosmos-sdk => github.com/stratosnet/cosmos-sdk v0.47.12-0.20240521173001-c32cdc9a1e54 + github.com/cosmos/cosmos-sdk => github.com/stratosnet/cosmos-sdk v0.47.12-0.20240711204239-ae99645b490a // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 diff --git a/go.sum b/go.sum index 2f5d5e64..dc4419f5 100644 --- a/go.sum +++ b/go.sum @@ -1038,12 +1038,12 @@ github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/stratosnet/cometbft v0.37.6-0.20240620154138-dc955d478115 h1:Mc90IpZrL2Wd6zLMhK342kRysRbb0vMMKnO5ptDc5Yw= github.com/stratosnet/cometbft v0.37.6-0.20240620154138-dc955d478115/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= -github.com/stratosnet/cosmos-sdk v0.47.12-0.20240521173001-c32cdc9a1e54 h1:8uIe3hXJaPg/cgd6FqHSdiy8ntQQtzuA2C+3aFZTtkI= -github.com/stratosnet/cosmos-sdk v0.47.12-0.20240521173001-c32cdc9a1e54/go.mod h1:c7xno1ENztUrUOqZ70W5gi0pTh3pT/3C6O0y1WzHSwU= +github.com/stratosnet/cosmos-sdk v0.47.12-0.20240711204239-ae99645b490a h1:2wf/13Pu9ZYf7tlaVF1x8rvQisPbMOAqgbeH6WWavbo= +github.com/stratosnet/cosmos-sdk v0.47.12-0.20240711204239-ae99645b490a/go.mod h1:c7xno1ENztUrUOqZ70W5gi0pTh3pT/3C6O0y1WzHSwU= github.com/stratosnet/ledger-stratos-go v0.0.0-20230728214905-432bf09f4b6c h1:EuJdqCo1DYeKjkXaIYNnU7WIFmu+FzJwJtzYhY3sQpQ= github.com/stratosnet/ledger-stratos-go v0.0.0-20230728214905-432bf09f4b6c/go.mod h1:9T0Ii/AMWWnJRtvKYKB4kDdraaOP76J+K5/IbRXQgyc= -github.com/stratosnet/stratos-chain/api v0.0.0-20240318144156-bf3328f863f6 h1:xrwEM+1tq/DEuHQCKr83C40SX61DEUALaWq7YEpR/uM= -github.com/stratosnet/stratos-chain/api v0.0.0-20240318144156-bf3328f863f6/go.mod h1:FN6crwtoVjf2errz8Nsj0y/zRxuIRtxs5w8qLHKVBqA= +github.com/stratosnet/stratos-chain/api v0.0.0-20240716160341-ec9024ef5de0 h1:WtXepCWm3FFya8L19INO/0bSxlsNqYNgkn5v5d+XHQQ= +github.com/stratosnet/stratos-chain/api v0.0.0-20240716160341-ec9024ef5de0/go.mod h1:FN6crwtoVjf2errz8Nsj0y/zRxuIRtxs5w8qLHKVBqA= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= diff --git a/proto/buf.yaml b/proto/buf.yaml index 1144aacc..d6bce401 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -6,6 +6,7 @@ deps: - buf.build/cosmos/gogo-proto - buf.build/cosmos/ibc - buf.build/googleapis/googleapis + - buf.build/stratosnet/stratos-chain lint: use: - DEFAULT diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index f2ea8813..4bd08ceb 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -170,7 +170,7 @@ message MsgUpdateResourceNode { option (cosmos.msg.v1.signer) = "owner_address"; option (amino.name) = "stratos/MsgUpdateResourceNode"; - Description description = 1 [ + Description description = 1 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.jsontag) = "description", @@ -206,7 +206,7 @@ message MsgUpdateMetaNode { option (cosmos.msg.v1.signer) = "owner_address"; option (amino.name) = "stratos/MsgUpdateMetaNode"; - Description description = 1 [ + Description description = 1 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.jsontag) = "description", @@ -217,7 +217,7 @@ message MsgUpdateMetaNode { (gogoproto.jsontag) = "beneficiary_address", (gogoproto.moretags) = "yaml:\"beneficiary_address\"" ]; - string network_address = 3 [ + string network_address = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString", (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" diff --git a/proto/stratos/register/v1_1/register.proto b/proto/stratos/register/v1_1/register.proto new file mode 100644 index 00000000..2b56460b --- /dev/null +++ b/proto/stratos/register/v1_1/register.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package stratos.register.v1_1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; +import "amino/amino.proto"; + +option (gogoproto.equal_all) = true; +option go_package = "github.com/stratosnet/stratos-chain/x/register/types/v1_1"; + + +message Description { + option (gogoproto.goproto_stringer) = true; + + string moniker = 1 [ + (gogoproto.jsontag) = "moniker", + (gogoproto.moretags) = "yaml:\"moniker\"" + ]; + string identity = 2 [ + (gogoproto.jsontag) = "identity", + (gogoproto.moretags) = "yaml:\"identity\",omitempty" + ]; + string website = 3 [ + (gogoproto.jsontag) = "website", + (gogoproto.moretags) = "yaml:\"website\",omitempty" + ]; + string security_contact = 4 [ + (gogoproto.jsontag) = "security_contact", + (gogoproto.moretags) = "yaml:\"security_contact\",omitempty"]; + string details = 5 [ + (gogoproto.jsontag) = "details", + (gogoproto.moretags) = "yaml:\"details\",omitempty"]; +} \ No newline at end of file diff --git a/proto/stratos/register/v1_1/tx.proto b/proto/stratos/register/v1_1/tx.proto new file mode 100644 index 00000000..952da90f --- /dev/null +++ b/proto/stratos/register/v1_1/tx.proto @@ -0,0 +1,156 @@ +syntax = "proto3"; +package stratos.register.v1_1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "amino/amino.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "google/protobuf/any.proto"; +import "stratos/register/v1_1/register.proto"; + +option (gogoproto.equal_all) = true; +option go_package = "github.com/stratosnet/stratos-chain/x/register/types/v1_1"; + +// MsgCreateResourceNode encapsulates an MsgCreateResourceNodeTx transaction as an SDK message. +message MsgCreateResourceNode { + option (cosmos.msg.v1.signer) = "owner_address"; + option (amino.name) = "stratos/MsgCreateResourceNode"; + + string network_address = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "network_address", + (gogoproto.moretags) = "yaml:\"network_address\"" + ]; + google.protobuf.Any pubkey = 2 [ + (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", + (gogoproto.jsontag) = "pubkey", + (gogoproto.moretags) = "yaml:\"pubkey\"" + ]; + cosmos.base.v1beta1.Coin value = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.jsontag) = "value", + (gogoproto.moretags) = "yaml:\"value\"" + ]; + string owner_address = 4 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner_address", + (gogoproto.moretags) = "yaml:\"owner_address\"" + ]; + Description description = 5 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.jsontag) = "description", + (gogoproto.moretags) = "yaml:\"description\"" + ]; + uint32 node_type = 6 [ + (gogoproto.jsontag) = "node_type", + (gogoproto.moretags) = "yaml:\"node_type\"" + ]; + string beneficiary_address = 7 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "beneficiary_address", + (gogoproto.moretags) = "yaml:\"beneficiary_address\"" + ]; +} + +// MsgCreateMetaNode encapsulates an MsgCreateMetaNodeTx transaction as an SDK message. +message MsgCreateMetaNode { + option (cosmos.msg.v1.signer) = "owner_address"; + option (amino.name) = "stratos/MsgCreateMetaNode"; + + string network_address = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "network_address", + (gogoproto.moretags) = "yaml:\"network_address\"" + ]; + google.protobuf.Any pubkey = 2 [ + (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", + (gogoproto.jsontag) = "pubkey", + (gogoproto.moretags) = "yaml:\"pubkey\"" + ]; + cosmos.base.v1beta1.Coin value = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.jsontag) = "value", + (gogoproto.moretags) = "yaml:\"value\"" + ]; + string owner_address = 4 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner_address", + (gogoproto.moretags) = "yaml:\"owner_address\"" + ]; + Description description = 5 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.jsontag) = "description", + (gogoproto.moretags) = "yaml:\"description\"" + ]; + string beneficiary_address = 6 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "beneficiary_address", + (gogoproto.moretags) = "yaml:\"beneficiary_address\"" + ]; +} + +// MsgUpdateResourceNode defines a SDK message for updating an existing resource node. +message MsgUpdateResourceNode { + option (cosmos.msg.v1.signer) = "owner_address"; + option (amino.name) = "stratos/MsgUpdateResourceNode"; + + Description description = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.jsontag) = "description", + (gogoproto.moretags) = "yaml:\"description\"" + ]; + string network_address = 2 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "network_address", + (gogoproto.moretags) = "yaml:\"network_address\"" + ]; + string owner_address = 3 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner_address", + (gogoproto.moretags) = "yaml:\"owner_address\"" + ]; + uint32 node_type = 4 [ + (gogoproto.jsontag) = "node_type", + (gogoproto.moretags) = "yaml:\"node_type\"" + ]; + string beneficiary_address = 5 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "beneficiary_address", + (gogoproto.moretags) = "yaml:\"beneficiary_address\"" + ]; +} + +// MsgUpdateMetaNode defines a SDK message for updating an existing meta node. +message MsgUpdateMetaNode { + option (cosmos.msg.v1.signer) = "owner_address"; + option (amino.name) = "stratos/MsgUpdateMetaNode"; + + Description description = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.jsontag) = "description", + (gogoproto.moretags) = "yaml:\"description\"" + ]; + string network_address = 2 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "network_address", + (gogoproto.moretags) = "yaml:\"network_address\"" + ]; + string owner_address = 3 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner_address", + (gogoproto.moretags) = "yaml:\"owner_address\"" + ]; + string beneficiary_address = 4 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "beneficiary_address", + (gogoproto.moretags) = "yaml:\"beneficiary_address\"" + ]; +} + diff --git a/testutil/helpers.go b/testutil/helpers.go index 6bb47cfe..abf4d0ed 100644 --- a/testutil/helpers.go +++ b/testutil/helpers.go @@ -163,6 +163,9 @@ func SetupWithGenesisNodeSet(t *testing.T, initRemainingOzoneLimit, make([]registertypes.Slashing, 0), registertypes.DefaultDepositNozRate, + make([]registertypes.MetaNodeRegistrationVotePool, 0), + make([]registertypes.UnbondingNode, 0), + make([]registertypes.KickMetaNodeVotePool, 0), ) genesisState[registertypes.ModuleName] = app.AppCodec().MustMarshalJSON(registerGenesis) diff --git a/x/register/types/codec.go b/x/register/types/codec.go index 6af59123..64644bb5 100644 --- a/x/register/types/codec.go +++ b/x/register/types/codec.go @@ -10,6 +10,7 @@ import ( authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" groupcodec "github.com/cosmos/cosmos-sdk/x/group/codec" + "github.com/stratosnet/stratos-chain/x/register/types/v1_1" ) // RegisterLegacyAminoCodec registers concrete types on codec @@ -41,6 +42,10 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgUpdateMetaNodeDeposit{}, &MsgMetaNodeRegistrationVote{}, &MsgUpdateParams{}, + &v1_1.MsgCreateResourceNode{}, + &v1_1.MsgUpdateResourceNode{}, + &v1_1.MsgCreateMetaNode{}, + &v1_1.MsgUpdateMetaNode{}, ) registry.RegisterImplementations( (*authz.Authorization)(nil), diff --git a/x/register/types/v1_1/msg.go b/x/register/types/v1_1/msg.go new file mode 100644 index 00000000..70b97c1b --- /dev/null +++ b/x/register/types/v1_1/msg.go @@ -0,0 +1,82 @@ +package v1_1 + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + _ sdk.Msg = &MsgCreateResourceNode{} + _ sdk.Msg = &MsgUpdateResourceNode{} + _ sdk.Msg = &MsgCreateMetaNode{} + _ sdk.Msg = &MsgUpdateMetaNode{} +) + +// ValidateBasic validity check for the CreateResourceNode +func (msg MsgCreateResourceNode) ValidateBasic() error { + return nil +} + +func (msg MsgCreateResourceNode) GetSigners() []sdk.AccAddress { + // Owner pays the tx fees + addr, err := sdk.AccAddressFromBech32(msg.GetOwnerAddress()) + if err != nil { + panic(err) + } + return []sdk.AccAddress{addr.Bytes()} +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (msg MsgCreateResourceNode) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + var pk cryptotypes.PubKey + return unpacker.UnpackAny(msg.Pubkey, &pk) +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgUpdateResourceNode) ValidateBasic() error { + return nil +} + +// GetSigners implements the sdk.Msg interface. +func (msg MsgUpdateResourceNode) GetSigners() []sdk.AccAddress { + addr, err := sdk.AccAddressFromBech32(msg.OwnerAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{addr.Bytes()} +} + +func (msg MsgCreateMetaNode) ValidateBasic() error { + return nil +} + +func (msg MsgCreateMetaNode) GetSigners() []sdk.AccAddress { + // Owner pays the tx fees + addr, err := sdk.AccAddressFromBech32(msg.GetOwnerAddress()) + if err != nil { + panic(err) + } + return []sdk.AccAddress{addr.Bytes()} + +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (msg MsgCreateMetaNode) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + var pk cryptotypes.PubKey + return unpacker.UnpackAny(msg.Pubkey, &pk) +} + +// GetSigners implements the sdk.Msg interface. +func (msg MsgUpdateMetaNode) GetSigners() []sdk.AccAddress { + addr, err := sdk.AccAddressFromBech32(msg.OwnerAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{addr.Bytes()} +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgUpdateMetaNode) ValidateBasic() error { + return nil +} diff --git a/x/register/types/v1_1/register.pb.go b/x/register/types/v1_1/register.pb.go new file mode 100644 index 00000000..e41b5bae --- /dev/null +++ b/x/register/types/v1_1/register.pb.go @@ -0,0 +1,575 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: stratos/register/v1_1/register.proto + +package v1_1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Description struct { + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker" yaml:"moniker"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity" yaml:"identity",omitempty` + Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website" yaml:"website",omitempty` + SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact" yaml:"security_contact",omitempty` + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details" yaml:"details",omitempty` +} + +func (m *Description) Reset() { *m = Description{} } +func (m *Description) String() string { return proto.CompactTextString(m) } +func (*Description) ProtoMessage() {} +func (*Description) Descriptor() ([]byte, []int) { + return fileDescriptor_9b740b7b32b37484, []int{0} +} +func (m *Description) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Description) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Description.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 *Description) XXX_Merge(src proto.Message) { + xxx_messageInfo_Description.Merge(m, src) +} +func (m *Description) XXX_Size() int { + return m.Size() +} +func (m *Description) XXX_DiscardUnknown() { + xxx_messageInfo_Description.DiscardUnknown(m) +} + +var xxx_messageInfo_Description proto.InternalMessageInfo + +func (m *Description) GetMoniker() string { + if m != nil { + return m.Moniker + } + return "" +} + +func (m *Description) GetIdentity() string { + if m != nil { + return m.Identity + } + return "" +} + +func (m *Description) GetWebsite() string { + if m != nil { + return m.Website + } + return "" +} + +func (m *Description) GetSecurityContact() string { + if m != nil { + return m.SecurityContact + } + return "" +} + +func (m *Description) GetDetails() string { + if m != nil { + return m.Details + } + return "" +} + +func init() { + proto.RegisterType((*Description)(nil), "stratos.register.v1_1.Description") +} + +func init() { + proto.RegisterFile("stratos/register/v1_1/register.proto", fileDescriptor_9b740b7b32b37484) +} + +var fileDescriptor_9b740b7b32b37484 = []byte{ + // 395 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0xcf, 0x4e, 0xdb, 0x40, + 0x10, 0xc6, 0xe3, 0x34, 0x6d, 0x5a, 0x57, 0xea, 0x1f, 0xab, 0x95, 0x9c, 0x48, 0xf5, 0xb6, 0x56, + 0xa5, 0xb6, 0x52, 0xc9, 0x2a, 0xe2, 0x80, 0x92, 0x1b, 0x01, 0x5e, 0x20, 0x17, 0x24, 0x2e, 0x91, + 0xed, 0x2c, 0xce, 0x8a, 0x78, 0xd7, 0xf2, 0x4e, 0x00, 0xbf, 0x05, 0x47, 0x8e, 0x1c, 0x79, 0x14, + 0x8e, 0x39, 0x72, 0xb2, 0x90, 0x73, 0xcb, 0xd1, 0x2f, 0x00, 0xf2, 0xee, 0xda, 0x09, 0x70, 0xb1, + 0x66, 0x7e, 0xdf, 0x37, 0x9f, 0x47, 0xda, 0x31, 0x7f, 0x0b, 0x48, 0x3c, 0xe0, 0x02, 0x27, 0x24, + 0xa4, 0x02, 0x48, 0x82, 0xcf, 0xfb, 0x93, 0x7e, 0xdd, 0xf5, 0xe2, 0x84, 0x03, 0xb7, 0xbe, 0x6b, + 0x57, 0xaf, 0xe6, 0xa5, 0xab, 0xfb, 0x2d, 0xe4, 0x21, 0x97, 0x0e, 0x5c, 0x56, 0xca, 0xdc, 0xed, + 0x84, 0x9c, 0x87, 0x73, 0x82, 0x65, 0xe7, 0x2f, 0x4e, 0xb1, 0xc7, 0xd2, 0x4a, 0x0a, 0xb8, 0x88, + 0xb8, 0x98, 0xa8, 0x19, 0xd5, 0x68, 0xe9, 0xab, 0x17, 0x51, 0xc6, 0xb1, 0xfc, 0x2a, 0xe4, 0x3e, + 0x36, 0xcd, 0x8f, 0x87, 0x44, 0x04, 0x09, 0x8d, 0x81, 0x72, 0x66, 0xed, 0x99, 0xed, 0x88, 0x33, + 0x7a, 0x46, 0x12, 0xdb, 0xf8, 0x69, 0xfc, 0xfd, 0x30, 0xfa, 0xb1, 0xce, 0x50, 0x85, 0x8a, 0x0c, + 0x7d, 0x4a, 0xbd, 0x68, 0x3e, 0x74, 0x35, 0x70, 0xc7, 0x95, 0x64, 0x1d, 0x99, 0xef, 0xe9, 0x94, + 0x30, 0xa0, 0x90, 0xda, 0x4d, 0x39, 0xf9, 0x6f, 0x9d, 0xa1, 0x9a, 0x15, 0x19, 0xea, 0xa8, 0xd1, + 0x8a, 0xb8, 0xff, 0x79, 0x44, 0x81, 0x44, 0x31, 0xa4, 0xe3, 0xda, 0x66, 0xed, 0x9b, 0xed, 0x0b, + 0xe2, 0x0b, 0x0a, 0xc4, 0x7e, 0x23, 0x53, 0xfe, 0x94, 0xff, 0xd7, 0xa8, 0xc8, 0x90, 0xad, 0x42, + 0x34, 0xd8, 0xce, 0xa8, 0x4c, 0xd6, 0xd4, 0xfc, 0x22, 0x48, 0xb0, 0x48, 0x28, 0xa4, 0x93, 0x80, + 0x33, 0xf0, 0x02, 0xb0, 0x5b, 0x32, 0x6b, 0xb0, 0xce, 0xd0, 0x2b, 0xad, 0xc8, 0xd0, 0x2f, 0x15, + 0xfa, 0x52, 0xd9, 0x4e, 0xff, 0x5c, 0x89, 0x07, 0x4a, 0x2b, 0x17, 0x9d, 0x12, 0xf0, 0xe8, 0x5c, + 0xd8, 0x6f, 0x37, 0x8b, 0x6a, 0xb4, 0x59, 0x54, 0x83, 0x67, 0x8b, 0x6a, 0x36, 0x6c, 0x5d, 0xdf, + 0x20, 0x63, 0x74, 0x7c, 0x9b, 0x3b, 0xc6, 0x5d, 0xee, 0x18, 0xcb, 0xdc, 0x31, 0x1e, 0x72, 0xc7, + 0xb8, 0x5a, 0x39, 0x8d, 0xe5, 0xca, 0x69, 0xdc, 0xaf, 0x9c, 0xc6, 0xc9, 0x20, 0xa4, 0x30, 0x5b, + 0xf8, 0xbd, 0x80, 0x47, 0x58, 0x1f, 0x08, 0x23, 0x50, 0x95, 0x3b, 0xc1, 0xcc, 0xa3, 0x0c, 0x5f, + 0x6e, 0x2e, 0x0b, 0xd2, 0x98, 0x08, 0x79, 0x5f, 0xfe, 0x3b, 0xf9, 0xc2, 0xbb, 0x4f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0xd4, 0xbe, 0x94, 0x11, 0x7f, 0x02, 0x00, 0x00, +} + +func (this *Description) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Description) + if !ok { + that2, ok := that.(Description) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Moniker != that1.Moniker { + return false + } + if this.Identity != that1.Identity { + return false + } + if this.Website != that1.Website { + return false + } + if this.SecurityContact != that1.SecurityContact { + return false + } + if this.Details != that1.Details { + return false + } + return true +} +func (m *Description) 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 *Description) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Details) > 0 { + i -= len(m.Details) + copy(dAtA[i:], m.Details) + i = encodeVarintRegister(dAtA, i, uint64(len(m.Details))) + i-- + dAtA[i] = 0x2a + } + if len(m.SecurityContact) > 0 { + i -= len(m.SecurityContact) + copy(dAtA[i:], m.SecurityContact) + i = encodeVarintRegister(dAtA, i, uint64(len(m.SecurityContact))) + i-- + dAtA[i] = 0x22 + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintRegister(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x1a + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintRegister(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x12 + } + if len(m.Moniker) > 0 { + i -= len(m.Moniker) + copy(dAtA[i:], m.Moniker) + i = encodeVarintRegister(dAtA, i, uint64(len(m.Moniker))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintRegister(dAtA []byte, offset int, v uint64) int { + offset -= sovRegister(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Description) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Moniker) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) + } + l = len(m.SecurityContact) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) + } + l = len(m.Details) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) + } + return n +} + +func sovRegister(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRegister(x uint64) (n int) { + return sovRegister(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Description) 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 ErrIntOverflowRegister + } + 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: Description: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + 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 ErrInvalidLengthRegister + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Moniker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + 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 ErrInvalidLengthRegister + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + 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 ErrInvalidLengthRegister + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + 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 ErrInvalidLengthRegister + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SecurityContact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + 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 ErrInvalidLengthRegister + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Details = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRegister(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRegister + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRegister(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegister + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegister + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegister + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRegister + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRegister + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRegister + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRegister = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRegister = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRegister = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/register/types/v1_1/tx.pb.go b/x/register/types/v1_1/tx.pb.go new file mode 100644 index 00000000..520378a7 --- /dev/null +++ b/x/register/types/v1_1/tx.pb.go @@ -0,0 +1,1935 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: stratos/register/v1_1/tx.proto + +package v1_1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/codec/types" + types1 "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgCreateResourceNode encapsulates an MsgCreateResourceNodeTx transaction as an SDK message. +type MsgCreateResourceNode struct { + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` + NodeType uint32 `protobuf:"varint,6,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + BeneficiaryAddress string `protobuf:"bytes,7,opt,name=beneficiary_address,json=beneficiaryAddress,proto3" json:"beneficiary_address" yaml:"beneficiary_address"` +} + +func (m *MsgCreateResourceNode) Reset() { *m = MsgCreateResourceNode{} } +func (m *MsgCreateResourceNode) String() string { return proto.CompactTextString(m) } +func (*MsgCreateResourceNode) ProtoMessage() {} +func (*MsgCreateResourceNode) Descriptor() ([]byte, []int) { + return fileDescriptor_f8c1d106b648f05b, []int{0} +} +func (m *MsgCreateResourceNode) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateResourceNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateResourceNode.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 *MsgCreateResourceNode) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateResourceNode.Merge(m, src) +} +func (m *MsgCreateResourceNode) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateResourceNode) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateResourceNode.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateResourceNode proto.InternalMessageInfo + +func (m *MsgCreateResourceNode) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *MsgCreateResourceNode) GetPubkey() *types.Any { + if m != nil { + return m.Pubkey + } + return nil +} + +func (m *MsgCreateResourceNode) GetValue() types1.Coin { + if m != nil { + return m.Value + } + return types1.Coin{} +} + +func (m *MsgCreateResourceNode) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *MsgCreateResourceNode) GetDescription() Description { + if m != nil { + return m.Description + } + return Description{} +} + +func (m *MsgCreateResourceNode) GetNodeType() uint32 { + if m != nil { + return m.NodeType + } + return 0 +} + +func (m *MsgCreateResourceNode) GetBeneficiaryAddress() string { + if m != nil { + return m.BeneficiaryAddress + } + return "" +} + +// MsgCreateMetaNode encapsulates an MsgCreateMetaNodeTx transaction as an SDK message. +type MsgCreateMetaNode struct { + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` + BeneficiaryAddress string `protobuf:"bytes,6,opt,name=beneficiary_address,json=beneficiaryAddress,proto3" json:"beneficiary_address" yaml:"beneficiary_address"` +} + +func (m *MsgCreateMetaNode) Reset() { *m = MsgCreateMetaNode{} } +func (m *MsgCreateMetaNode) String() string { return proto.CompactTextString(m) } +func (*MsgCreateMetaNode) ProtoMessage() {} +func (*MsgCreateMetaNode) Descriptor() ([]byte, []int) { + return fileDescriptor_f8c1d106b648f05b, []int{1} +} +func (m *MsgCreateMetaNode) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateMetaNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateMetaNode.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 *MsgCreateMetaNode) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateMetaNode.Merge(m, src) +} +func (m *MsgCreateMetaNode) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateMetaNode) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateMetaNode.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateMetaNode proto.InternalMessageInfo + +func (m *MsgCreateMetaNode) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *MsgCreateMetaNode) GetPubkey() *types.Any { + if m != nil { + return m.Pubkey + } + return nil +} + +func (m *MsgCreateMetaNode) GetValue() types1.Coin { + if m != nil { + return m.Value + } + return types1.Coin{} +} + +func (m *MsgCreateMetaNode) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *MsgCreateMetaNode) GetDescription() Description { + if m != nil { + return m.Description + } + return Description{} +} + +func (m *MsgCreateMetaNode) GetBeneficiaryAddress() string { + if m != nil { + return m.BeneficiaryAddress + } + return "" +} + +// MsgUpdateResourceNode defines a SDK message for updating an existing resource node. +type MsgUpdateResourceNode struct { + Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description" yaml:"description"` + NetworkAddress string `protobuf:"bytes,2,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + OwnerAddress string `protobuf:"bytes,3,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + NodeType uint32 `protobuf:"varint,4,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + BeneficiaryAddress string `protobuf:"bytes,5,opt,name=beneficiary_address,json=beneficiaryAddress,proto3" json:"beneficiary_address" yaml:"beneficiary_address"` +} + +func (m *MsgUpdateResourceNode) Reset() { *m = MsgUpdateResourceNode{} } +func (m *MsgUpdateResourceNode) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateResourceNode) ProtoMessage() {} +func (*MsgUpdateResourceNode) Descriptor() ([]byte, []int) { + return fileDescriptor_f8c1d106b648f05b, []int{2} +} +func (m *MsgUpdateResourceNode) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateResourceNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateResourceNode.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 *MsgUpdateResourceNode) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateResourceNode.Merge(m, src) +} +func (m *MsgUpdateResourceNode) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateResourceNode) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateResourceNode.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateResourceNode proto.InternalMessageInfo + +func (m *MsgUpdateResourceNode) GetDescription() Description { + if m != nil { + return m.Description + } + return Description{} +} + +func (m *MsgUpdateResourceNode) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *MsgUpdateResourceNode) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *MsgUpdateResourceNode) GetNodeType() uint32 { + if m != nil { + return m.NodeType + } + return 0 +} + +func (m *MsgUpdateResourceNode) GetBeneficiaryAddress() string { + if m != nil { + return m.BeneficiaryAddress + } + return "" +} + +// MsgUpdateMetaNode defines a SDK message for updating an existing meta node. +type MsgUpdateMetaNode struct { + Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description" yaml:"description"` + NetworkAddress string `protobuf:"bytes,2,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + OwnerAddress string `protobuf:"bytes,3,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + BeneficiaryAddress string `protobuf:"bytes,4,opt,name=beneficiary_address,json=beneficiaryAddress,proto3" json:"beneficiary_address" yaml:"beneficiary_address"` +} + +func (m *MsgUpdateMetaNode) Reset() { *m = MsgUpdateMetaNode{} } +func (m *MsgUpdateMetaNode) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateMetaNode) ProtoMessage() {} +func (*MsgUpdateMetaNode) Descriptor() ([]byte, []int) { + return fileDescriptor_f8c1d106b648f05b, []int{3} +} +func (m *MsgUpdateMetaNode) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateMetaNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateMetaNode.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 *MsgUpdateMetaNode) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateMetaNode.Merge(m, src) +} +func (m *MsgUpdateMetaNode) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateMetaNode) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateMetaNode.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateMetaNode proto.InternalMessageInfo + +func (m *MsgUpdateMetaNode) GetDescription() Description { + if m != nil { + return m.Description + } + return Description{} +} + +func (m *MsgUpdateMetaNode) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *MsgUpdateMetaNode) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *MsgUpdateMetaNode) GetBeneficiaryAddress() string { + if m != nil { + return m.BeneficiaryAddress + } + return "" +} + +func init() { + proto.RegisterType((*MsgCreateResourceNode)(nil), "stratos.register.v1_1.MsgCreateResourceNode") + proto.RegisterType((*MsgCreateMetaNode)(nil), "stratos.register.v1_1.MsgCreateMetaNode") + proto.RegisterType((*MsgUpdateResourceNode)(nil), "stratos.register.v1_1.MsgUpdateResourceNode") + proto.RegisterType((*MsgUpdateMetaNode)(nil), "stratos.register.v1_1.MsgUpdateMetaNode") +} + +func init() { proto.RegisterFile("stratos/register/v1_1/tx.proto", fileDescriptor_f8c1d106b648f05b) } + +var fileDescriptor_f8c1d106b648f05b = []byte{ + // 716 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x3f, 0x4f, 0xdb, 0x4e, + 0x18, 0x8e, 0x21, 0xc9, 0xef, 0x87, 0x81, 0xb6, 0xb8, 0xa1, 0x0d, 0x48, 0xf5, 0x51, 0xab, 0x03, + 0x42, 0xe2, 0xdc, 0x94, 0x2e, 0x65, 0xa8, 0x44, 0x68, 0xa7, 0x8a, 0xaa, 0x0a, 0xad, 0x2a, 0x75, + 0x89, 0x6c, 0xe7, 0x30, 0x16, 0xe4, 0xce, 0xb2, 0x2f, 0x01, 0x2f, 0x1d, 0x3a, 0x76, 0xaa, 0xc4, + 0x97, 0x60, 0x64, 0xe8, 0x87, 0x40, 0xed, 0x82, 0x3a, 0x55, 0xaa, 0x74, 0xaa, 0xc2, 0x80, 0x94, + 0xd1, 0x9f, 0xa0, 0xca, 0xdd, 0x39, 0xff, 0x70, 0x36, 0x40, 0x0c, 0x59, 0xe0, 0xee, 0x7d, 0x1e, + 0xdf, 0xeb, 0xf7, 0xb9, 0xe7, 0x7d, 0x63, 0x55, 0x0f, 0x69, 0x60, 0x51, 0x12, 0x9a, 0x01, 0x72, + 0xbd, 0x90, 0xa2, 0xc0, 0x6c, 0x96, 0xaa, 0x25, 0x93, 0x1e, 0x42, 0x3f, 0x20, 0x94, 0x68, 0xf3, + 0x12, 0x87, 0x09, 0x0e, 0x3b, 0xf8, 0x62, 0xc1, 0x25, 0x2e, 0xe1, 0x0c, 0xb3, 0xb3, 0x12, 0xe4, + 0xc5, 0x05, 0x87, 0x84, 0x75, 0x12, 0x56, 0x05, 0x20, 0x36, 0x12, 0x9a, 0xb3, 0xea, 0x1e, 0x26, + 0x26, 0xff, 0x2b, 0x43, 0x0f, 0x05, 0xc1, 0xac, 0x87, 0xae, 0xd9, 0x2c, 0x75, 0xfe, 0x49, 0x40, + 0x97, 0x80, 0x6d, 0x85, 0xc8, 0x6c, 0x96, 0x6c, 0x44, 0xad, 0x92, 0xe9, 0x10, 0x0f, 0x27, 0x69, + 0x5c, 0x42, 0xdc, 0x7d, 0x64, 0xf2, 0x9d, 0xdd, 0xd8, 0x31, 0x2d, 0x1c, 0x49, 0xe8, 0x49, 0x7a, + 0x39, 0xdd, 0x97, 0xe7, 0x2c, 0xe3, 0x28, 0xaf, 0xce, 0x6f, 0x85, 0xee, 0x66, 0x80, 0x2c, 0x8a, + 0x2a, 0x28, 0x24, 0x8d, 0xc0, 0x41, 0x6f, 0x49, 0x0d, 0x69, 0x58, 0xbd, 0x8b, 0x11, 0x3d, 0x20, + 0xc1, 0x5e, 0xd5, 0xaa, 0xd5, 0x02, 0x14, 0x86, 0x45, 0x65, 0x49, 0x59, 0x9e, 0x2a, 0xbf, 0x6e, + 0x33, 0x30, 0x0c, 0xc5, 0x0c, 0x3c, 0x88, 0xac, 0xfa, 0xfe, 0xba, 0x31, 0x04, 0x18, 0xbf, 0xbe, + 0xaf, 0x16, 0x64, 0xf9, 0x1b, 0x22, 0xb4, 0x4d, 0x03, 0x0f, 0xbb, 0x95, 0x3b, 0x92, 0x29, 0xa3, + 0x9a, 0xa5, 0xe6, 0xfd, 0x86, 0xbd, 0x87, 0xa2, 0xe2, 0xc4, 0x92, 0xb2, 0x3c, 0xfd, 0xac, 0x00, + 0x45, 0x6d, 0x30, 0xa9, 0x0d, 0x6e, 0xe0, 0xa8, 0xbc, 0xd6, 0x66, 0x40, 0xf2, 0x62, 0x06, 0x66, + 0x45, 0x4e, 0xb1, 0x37, 0x7e, 0xf4, 0x52, 0x39, 0x41, 0xe4, 0x53, 0x02, 0xdf, 0x35, 0xec, 0x37, + 0x28, 0xaa, 0xc8, 0x07, 0xb4, 0x6d, 0x35, 0xd7, 0xb4, 0xf6, 0x1b, 0xa8, 0x38, 0xc9, 0x33, 0x2c, + 0x40, 0xc9, 0xee, 0xa8, 0x0b, 0xa5, 0xba, 0x70, 0x93, 0x78, 0xb8, 0x6c, 0x9c, 0x32, 0x90, 0x69, + 0x33, 0x20, 0xf8, 0x31, 0x03, 0x33, 0x22, 0x13, 0xdf, 0x1a, 0xc7, 0x17, 0x27, 0x2b, 0x4a, 0x45, + 0x60, 0xda, 0x8e, 0x3a, 0x4b, 0x0e, 0x30, 0x0a, 0xba, 0x2a, 0x65, 0xb9, 0x4a, 0x1b, 0x6d, 0x06, + 0x06, 0x81, 0x98, 0x81, 0x82, 0x38, 0x65, 0x20, 0x3c, 0x5a, 0xa1, 0x19, 0xce, 0x4b, 0xf4, 0xa1, + 0xea, 0x74, 0x0d, 0x85, 0x4e, 0xe0, 0xf9, 0xd4, 0x23, 0xb8, 0x98, 0xe3, 0x25, 0x18, 0x30, 0xd5, + 0x94, 0xf0, 0x55, 0x8f, 0x59, 0x86, 0xb2, 0x96, 0xfe, 0xc7, 0x63, 0x06, 0x34, 0xf1, 0x2e, 0x7d, + 0x41, 0x59, 0x57, 0x3f, 0x4f, 0x7b, 0xa9, 0x4e, 0x61, 0x52, 0x43, 0x55, 0x1a, 0xf9, 0xa8, 0x98, + 0x5f, 0x52, 0x96, 0x67, 0xcb, 0x8f, 0xdb, 0x0c, 0xf4, 0x82, 0x31, 0x03, 0xf7, 0xe4, 0xcd, 0x27, + 0x21, 0xa3, 0xf2, 0x7f, 0x67, 0xfd, 0x3e, 0xf2, 0x91, 0xf6, 0x59, 0xbd, 0x6f, 0x23, 0x8c, 0x76, + 0x3c, 0xc7, 0xb3, 0x82, 0xa8, 0xab, 0xd1, 0x7f, 0x5c, 0xa3, 0xad, 0x36, 0x03, 0x69, 0x70, 0xcc, + 0xc0, 0xa2, 0x38, 0x33, 0x05, 0x1c, 0xad, 0x97, 0xd6, 0xc7, 0x96, 0xc8, 0xfa, 0xf3, 0x2f, 0x17, + 0x27, 0x2b, 0x83, 0xf7, 0xf0, 0xf5, 0xe2, 0x64, 0xe5, 0x51, 0xd2, 0x1c, 0xa9, 0xde, 0x37, 0x7e, + 0xe6, 0xd4, 0xb9, 0x2e, 0xb2, 0x85, 0xa8, 0x35, 0xee, 0x88, 0x71, 0x47, 0xc8, 0x8e, 0x18, 0xe1, + 0xe8, 0xfc, 0x4d, 0x39, 0xfa, 0x69, 0xba, 0xa3, 0x17, 0x2e, 0x39, 0x3a, 0xf1, 0xad, 0xf1, 0x27, + 0xcb, 0x67, 0xfc, 0x07, 0xbf, 0x36, 0x3c, 0xe3, 0x87, 0x14, 0x54, 0x6e, 0x46, 0xc1, 0x94, 0x3e, + 0x9a, 0xb8, 0xce, 0x3e, 0xba, 0xe4, 0xc7, 0xc9, 0xeb, 0xf1, 0xe3, 0xc0, 0xac, 0xcc, 0x5e, 0xd9, + 0xac, 0xcc, 0xdd, 0xa2, 0x59, 0x79, 0xd9, 0x43, 0xc6, 0x51, 0x96, 0xcf, 0x4a, 0x81, 0x74, 0x67, + 0xe5, 0xd8, 0x59, 0x57, 0xe9, 0xac, 0x11, 0xce, 0xc8, 0xde, 0xa2, 0x99, 0x33, 0x78, 0xff, 0xe5, + 0x8f, 0xc7, 0x2d, 0x5d, 0x39, 0x6d, 0xe9, 0xca, 0x59, 0x4b, 0x57, 0xfe, 0xb6, 0x74, 0xe5, 0xdb, + 0xb9, 0x9e, 0x39, 0x3b, 0xd7, 0x33, 0xbf, 0xcf, 0xf5, 0xcc, 0xa7, 0x17, 0xae, 0x47, 0x77, 0x1b, + 0x36, 0x74, 0x48, 0xdd, 0x94, 0x67, 0x60, 0x44, 0x93, 0xe5, 0xaa, 0xb3, 0x6b, 0x79, 0xd8, 0x3c, + 0xec, 0x7d, 0xb9, 0x76, 0x3a, 0x25, 0xe4, 0xdf, 0xaf, 0x76, 0x9e, 0xff, 0xf8, 0xad, 0xfd, 0x0b, + 0x00, 0x00, 0xff, 0xff, 0xef, 0x11, 0xe2, 0x2f, 0xae, 0x0b, 0x00, 0x00, +} + +func (this *MsgCreateResourceNode) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgCreateResourceNode) + if !ok { + that2, ok := that.(MsgCreateResourceNode) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NetworkAddress != that1.NetworkAddress { + return false + } + if !this.Pubkey.Equal(that1.Pubkey) { + return false + } + if !this.Value.Equal(&that1.Value) { + return false + } + if this.OwnerAddress != that1.OwnerAddress { + return false + } + if !this.Description.Equal(&that1.Description) { + return false + } + if this.NodeType != that1.NodeType { + return false + } + if this.BeneficiaryAddress != that1.BeneficiaryAddress { + return false + } + return true +} +func (this *MsgCreateMetaNode) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgCreateMetaNode) + if !ok { + that2, ok := that.(MsgCreateMetaNode) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NetworkAddress != that1.NetworkAddress { + return false + } + if !this.Pubkey.Equal(that1.Pubkey) { + return false + } + if !this.Value.Equal(&that1.Value) { + return false + } + if this.OwnerAddress != that1.OwnerAddress { + return false + } + if !this.Description.Equal(&that1.Description) { + return false + } + if this.BeneficiaryAddress != that1.BeneficiaryAddress { + return false + } + return true +} +func (this *MsgUpdateResourceNode) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgUpdateResourceNode) + if !ok { + that2, ok := that.(MsgUpdateResourceNode) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Description.Equal(&that1.Description) { + return false + } + if this.NetworkAddress != that1.NetworkAddress { + return false + } + if this.OwnerAddress != that1.OwnerAddress { + return false + } + if this.NodeType != that1.NodeType { + return false + } + if this.BeneficiaryAddress != that1.BeneficiaryAddress { + return false + } + return true +} +func (this *MsgUpdateMetaNode) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgUpdateMetaNode) + if !ok { + that2, ok := that.(MsgUpdateMetaNode) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Description.Equal(&that1.Description) { + return false + } + if this.NetworkAddress != that1.NetworkAddress { + return false + } + if this.OwnerAddress != that1.OwnerAddress { + return false + } + if this.BeneficiaryAddress != that1.BeneficiaryAddress { + return false + } + return true +} +func (m *MsgCreateResourceNode) 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 *MsgCreateResourceNode) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BeneficiaryAddress) > 0 { + i -= len(m.BeneficiaryAddress) + copy(dAtA[i:], m.BeneficiaryAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.BeneficiaryAddress))) + i-- + dAtA[i] = 0x3a + } + if m.NodeType != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.NodeType)) + i-- + dAtA[i] = 0x30 + } + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0x22 + } + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Pubkey != nil { + { + size, err := m.Pubkey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.NetworkAddress) > 0 { + i -= len(m.NetworkAddress) + copy(dAtA[i:], m.NetworkAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.NetworkAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateMetaNode) 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 *MsgCreateMetaNode) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateMetaNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BeneficiaryAddress) > 0 { + i -= len(m.BeneficiaryAddress) + copy(dAtA[i:], m.BeneficiaryAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.BeneficiaryAddress))) + i-- + dAtA[i] = 0x32 + } + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0x22 + } + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Pubkey != nil { + { + size, err := m.Pubkey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.NetworkAddress) > 0 { + i -= len(m.NetworkAddress) + copy(dAtA[i:], m.NetworkAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.NetworkAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateResourceNode) 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 *MsgUpdateResourceNode) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BeneficiaryAddress) > 0 { + i -= len(m.BeneficiaryAddress) + copy(dAtA[i:], m.BeneficiaryAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.BeneficiaryAddress))) + i-- + dAtA[i] = 0x2a + } + if m.NodeType != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.NodeType)) + i-- + dAtA[i] = 0x20 + } + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.NetworkAddress) > 0 { + i -= len(m.NetworkAddress) + copy(dAtA[i:], m.NetworkAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.NetworkAddress))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgUpdateMetaNode) 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 *MsgUpdateMetaNode) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateMetaNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BeneficiaryAddress) > 0 { + i -= len(m.BeneficiaryAddress) + copy(dAtA[i:], m.BeneficiaryAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.BeneficiaryAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.NetworkAddress) > 0 { + i -= len(m.NetworkAddress) + copy(dAtA[i:], m.NetworkAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.NetworkAddress))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateResourceNode) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Pubkey != nil { + l = m.Pubkey.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = m.Value.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) + if m.NodeType != 0 { + n += 1 + sovTx(uint64(m.NodeType)) + } + l = len(m.BeneficiaryAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateMetaNode) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Pubkey != nil { + l = m.Pubkey.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = m.Value.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.BeneficiaryAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateResourceNode) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.NodeType != 0 { + n += 1 + sovTx(uint64(m.NodeType)) + } + l = len(m.BeneficiaryAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateMetaNode) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.BeneficiaryAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateResourceNode) 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: MsgCreateResourceNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateResourceNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", 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.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pubkey == nil { + m.Pubkey = &types.Any{} + } + if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", 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.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) + } + m.NodeType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NodeType |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BeneficiaryAddress", 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.BeneficiaryAddress = 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 *MsgCreateMetaNode) 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: MsgCreateMetaNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateMetaNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", 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.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pubkey == nil { + m.Pubkey = &types.Any{} + } + if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", 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.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BeneficiaryAddress", 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.BeneficiaryAddress = 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 *MsgUpdateResourceNode) 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: MsgUpdateResourceNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateResourceNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", 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.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", 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.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) + } + m.NodeType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NodeType |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BeneficiaryAddress", 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.BeneficiaryAddress = 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 *MsgUpdateMetaNode) 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: MsgUpdateMetaNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateMetaNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", 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.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", 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.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BeneficiaryAddress", 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.BeneficiaryAddress = 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 skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) From 45c8524af0655af28d3f63513de1fd6110c9f190 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Dumais <62179452+mdumais-stratos@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:30:54 -0400 Subject: [PATCH 4/5] fix/ST-396 prepay rejects 0 amount (#372) --- x/sds/types/msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/sds/types/msg.go b/x/sds/types/msg.go index 3b0767b8..7227a3bb 100644 --- a/x/sds/types/msg.go +++ b/x/sds/types/msg.go @@ -139,7 +139,7 @@ func (msg MsgPrepay) ValidateBasic() error { return ErrInvalidBeneficiaryAddr } - if msg.Amount.Empty() { + if msg.Amount.IsZero() { return errors.Wrap(sdkerrors.ErrInvalidCoins, "missing amount to send") } From 0fee93c77b5e91d4f73e01d8444683894a7deb40 Mon Sep 17 00:00:00 2001 From: alexstratos Date: Wed, 30 Oct 2024 10:21:49 -0400 Subject: [PATCH 5/5] bump version to v0.12.2 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b61d0505..79cb40b7 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ BUILDDIR ?= $(CURDIR)/build LEDGER_ENABLED ?= false -APP_VER := v0.12.1 +APP_VER := v0.12.2 COMMIT := $(GIT_COMMIT_HASH) TEST_DOCKER_REPO=stratos-chain-e2e